Re: Trying to understand performance differences

2013-11-12 Thread Dr. Stephen Henson
On Wed, Nov 13, 2013, Vuille, Martin (Martin) wrote:

> Collected performance numbers using "openssl speed" for two copies of OpenSSL 
> 1.0.1e,
> one built as FIPS-capable, the other not, running on an ARMv6. I am having a 
> hard time
> understanding the differences I observed and would appreciate any insight.
> 
[snip results]
> 
> I don't understand why non-EVP and EVP results are practically the same with 
> the non-
> FIPS capable library, but the EVP results are significantly faster than the 
> non-EVP results
> on the FIPS-capable one.
> 

For the non-FIPS capable EVP calls the low level implementations for that
version of OpenSSL. So, other than EVP overheads you get similar results.

For the FIPS capable version EVP calls the FIPS module implementations of the
algorithms while the low level calls still call the OpenSSL versions. So
you're comparing two different implementations.

So for some reason the implementations in OpenSSL aren't as fast as those in
the FIPS module for your setup.

Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org


Trying to understand performance differences

2013-11-12 Thread Vuille, Martin (Martin)
Collected performance numbers using "openssl speed" for two copies of OpenSSL 
1.0.1e,
one built as FIPS-capable, the other not, running on an ARMv6. I am having a 
hard time
understanding the differences I observed and would appreciate any insight.

Non-FIPS Capable

# openssl speed aes
Type16 bytes64 bytes256 bytes   1024 bytes  
8192 bytes
aes-128 cbc 2345.03k2627.50k2708.99k2739.11k
2730.67k
aes-192 cbc 2029.69k2236.10k2293.85k2316.84k
2310.14k
aes-256 cbc 1782.30k1943.21k1988.52k2000.21k
1994.93k
#openssl speed -evp aes-128-cbc
aes-128-cbc 2234.73k2591.72k2698.50k2726.91k
2733.40k
#openssl speed -evp aes-192-cbc
aes-192-cbc 1941.83k2206.61k2284.12k2304.68k
2310.14k
#openssl speed -evp aes-256-cbc
aes-256-cbc 1719.65k1923.88k1982.21k1997.82k
2001.58k

FIPS Capable

# openssl speed aes
Type16 bytes64 bytes256 bytes   1024 bytes  
8192 bytes
aes-128 cbc 2540.86k2846.65k2923.78k2946.73k
2951.85k
aes-192 cbc 2193.64k2416.26k2478.85k2503.15k
2501.29k
aes-256 cbc 1933.31k2103.79k2150.57k2163.37k
2160.95k
#openssl speed -evp aes-128-cbc
aes-128-cbc 4370.26k6091.88k6787.25k6981.69k
7009.62k
#openssl speed -evp aes-192-cbc
aes-192-cbc 3992.79k5353.26k5865.22k6010.54k
6048.43k
#openssl speed -evp aes-256-cbc
aes-256-cbc 3650.15k4773.53k5176.66k5307.68k
5339.87k

I don't understand why non-EVP and EVP results are practically the same with 
the non-
FIPS capable library, but the EVP results are significantly faster than the 
non-EVP results
on the FIPS-capable one.

MV
__
OpenSSL Project http://www.openssl.org
User Support Mailing Listopenssl-users@openssl.org
Automated List Manager   majord...@openssl.org