AES-NI + compression

Chris Adamson chris.adamson at mcri.edu.au
Fri Nov 23 00:35:10 CET 2012


Hello list,

I am very keen for when AES-NI is implemented in a released 64-bit
version of libgcrypt. I decided to test the i386 AES-NI and compare it
to the i386 software implementation as well as the x86_64 software
implementation. I also tested the effect of adding compression, which is
important to me since I'm using gpg for backup. I took 895M of fairly
compressible DICOM data in a tar file (bz2 compresses to 168M) and ran
gpg2 on a i7-980. The table below shows seconds of CPU time. I included
some non AES ciphers as well. The 64-bit software version performs
better than the i386 software version in all cases of no compression,
not surprising. But for AES the 64-bit software version outperforms the
i386 AES-NI implementation when compression is used. At high levels of
compression AES-NI has little effect for the i386 version. i.e. the
compression part must also be faster in the 64-bit version, which is
unexpected. 

My immediate questions: i386 AES-NI gives a 50% reduction when compared
to the i386 software version, is this expected or should it be a greater
reduction? I did see some x86_64 AES-NI patches released on the list,
will these be put into a released version or backported?

Thank you.

32-bit		32-bit		64-bit
AES-NI ON	AES-NI OFF	AES-NI NOT SUPPORTED
no compression	no compression	no compression
CAST5 18.01	CAST5 17.80	CAST5 16.46
BLOWFISH 18.42	BLOWFISH 18.28	BLOWFISH 17.59
AES 6.60	AES 14.35	AES 9.89
AES192 6.81	AES192 16.10	AES192 11.22
AES256 6.96	AES256 17.16	AES256 12.54
TWOFISH 15.52	TWOFISH 15.57	TWOFISH 11.47
zlib 1	zlib 1	zlib 1
CAST5 20.34	CAST5 20.08	CAST5 17.04
BLOWFISH 20.65	BLOWFISH 20.26	BLOWFISH 17.42
AES 16.98	AES 18.95	AES 15.01
AES192 16.78	AES192 19.76	AES192 15.38
AES256 16.85	AES256 20.08	AES256 15.79
TWOFISH 19.55	TWOFISH 19.69	TWOFISH 15.45
zlib 3	zlib 3	zlib 3
CAST5 25.62	CAST5 25.64	CAST5 21.27
BLOWFISH 25.70	BLOWFISH 25.44	BLOWFISH 21.92
AES 22.10	AES 24.06	AES 19.51
AES192 22.01	AES192 24.84	AES192 19.87
AES256 22.21	AES256 25.41	AES256 20.40
TWOFISH 25.04	TWOFISH 24.88	TWOFISH 19.96
zlib 6	zlib 6	zlib 6
CAST5 52.85	CAST5 52.84	CAST5 45.97
BLOWFISH 53.37	BLOWFISH 52.75	BLOWFISH 44.66
AES 50.57	AES 51.54	AES 43.27
AES192 49.92	AES192 51.95	AES192 42.88
AES256 49.76	AES256 53.19	AES256 43.11
TWOFISH 52.29	TWOFISH 52.08	TWOFISH 42.82
zlib 9	zlib 9	zlib 9
CAST5 181.82	CAST5 180.99	CAST5 146.81
BLOWFISH 181.42	BLOWFISH 180.89	BLOWFISH 147.51
AES 177.44	AES 182.09	AES 146.40
AES192 178.21	AES192 181.00	AES192 156.41
AES256 182.53	AES256 180.27	AES256 147.48
TWOFISH 179.54	TWOFISH 179.92	TWOFISH 147.64

-- 
Dr Christopher Adamson, PhD (Melb.), B Software Engineering (Hons.,
Monash)
Research Officer
Developmental Imaging, Critical Care and Neurosciences

Murdoch Childrens Research Institute
The Royal Children’s Hospital
Flemington Road Parkville Victoria 3052 Australia
T 9906 6780
M XXXX XXX XXX
E chris.adamson at mcri.edu.au
www.mcri.edu.au

______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________



More information about the Gcrypt-devel mailing list