[dm-crypt] [ANNOUNCE] cryptsetup 1.6.0-rc1

Matthias Schniedermeyer ms at citd.de
Wed Jan 2 13:50:55 CET 2013


On 30.12.2012 00:31, Milan Broz wrote:
> On 12/30/2012 12:15 AM, Matthias Schniedermeyer wrote:
> 
> > Are you sure (about AES-NI)?
> 
> I meant difference in ecryption/decryption speed, not real
> numbers (it was an example from virtual machine and
> in 32bit mode in fact).
> 
> Yes, speed should be much higher on recent systems.
> 
> At least it motivates people to try it :)
> 
> When you are playing with it: you can try to
> unload/blackist various kernel modules
> (aesni_intel, aes_x86_64, ...) and check difference.


This was tested on:
Core i7 2600 (Sandy Bridge), 4 cores, HT, no Overclocking
Kernel 3.7.1

First run is with everyting at maxium:
aesni, twofish AVX, serpent AVX:
# Tests are approximate using memory only (no storage IO).
PBKDF2-sha1       371308 iterations per second
PBKDF2-sha256     215578 iterations per second
PBKDF2-sha512      88204 iterations per second
PBKDF2-ripemd160  355208 iterations per second
PBKDF2-whirlpool  147936 iterations per second
#  Algorithm | Key | Encryption | Decryption
     aes-cbc   128b  633,4 MiB/s  2172,0 MiB/s
 serpent-cbc   128b   80,2 MiB/s  301,7 MiB/s
 twofish-cbc   128b  181,8 MiB/s  336,7 MiB/s
     aes-cbc   256b  457,0 MiB/s  1639,0 MiB/s
 serpent-cbc   256b   78,7 MiB/s  301,0 MiB/s
 twofish-cbc   256b  181,8 MiB/s  332,3 MiB/s
     aes-xts   256b  1149,0 MiB/s  1160,0 MiB/s
 serpent-xts   256b  286,7 MiB/s  279,4 MiB/s
 twofish-xts   256b  298,4 MiB/s  301,4 MiB/s
     aes-xts   512b  1022,0 MiB/s  1020,0 MiB/s
 serpent-xts   512b  294,7 MiB/s  281,4 MiB/s
 twofish-xts   512b  304,0 MiB/s  303,4 MiB/s


Here are the differences after rmmod certain modules:

--- AES ---
aesni_intel:
#  Algorithm | Key | Encryption | Decryption
     aes-cbc   128b  633,4 MiB/s  2172,0 MiB/s
     aes-cbc   256b  457,0 MiB/s  1639,0 MiB/s
     aes-xts   256b  1149,0 MiB/s  1160,0 MiB/s
     aes-xts   512b  1022,0 MiB/s  1020,0 MiB/s

After rmmod aesni_intel:
aes_x86_64:
#  Algorithm | Key | Encryption | Decryption
     aes-cbc   128b  200,4 MiB/s  236,8 MiB/s
     aes-cbc   256b  157,7 MiB/s  178,6 MiB/s
     aes-xts   256b  230,3 MiB/s  231,8 MiB/s
     aes-xts   512b  175,1 MiB/s  175,6 MiB/s

After rmmod aes_x86_64
aes_generic:
#  Algorithm | Key | Encryption | Decryption
     aes-cbc   128b  194,6 MiB/s  228,8 MiB/s
     aes-cbc   256b  154,0 MiB/s  172,7 MiB/s
     aes-xts   256b  232,3 MiB/s  228,0 MiB/s
     aes-xts   512b  175,8 MiB/s  155,0 MiB/s

--- Twofish ---
twofish_avx_x86_64:
#  Algorithm | Key | Encryption | Decryption
 twofish-cbc   128b  181,8 MiB/s  336,7 MiB/s
 twofish-cbc   256b  181,8 MiB/s  332,3 MiB/s
 twofish-xts   256b  298,4 MiB/s  301,4 MiB/s
 twofish-xts   512b  304,0 MiB/s  303,4 MiB/s

After rmmod twofish_avx_x86_64
twofish_x86_64_3way:
#  Algorithm | Key | Encryption | Decryption
 twofish-cbc   128b  179,6 MiB/s  219,0 MiB/s
 twofish-cbc   256b  183,3 MiB/s  223,8 MiB/s
 twofish-xts   256b  207,0 MiB/s  208,6 MiB/s
 twofish-xts   512b  207,6 MiB/s  208,0 MiB/s

After rmmod twofish_x86_64_3way
twofish_x86_64:
#  Algorithm | Key | Encryption | Decryption
 twofish-cbc   128b  151,0 MiB/s  171,7 MiB/s
 twofish-cbc   256b  147,6 MiB/s  171,7 MiB/s
 twofish-xts   256b  170,8 MiB/s  173,1 MiB/s
 twofish-xts   512b  174,7 MiB/s  176,0 MiB/s

After rmmod twofish_x86_64
twofish_generic:
#  Algorithm | Key | Encryption | Decryption
 twofish-cbc   128b  143,6 MiB/s  163,2 MiB/s
 twofish-cbc   256b  144,0 MiB/s  161,4 MiB/s
 twofish-xts   256b  161,4 MiB/s  162,5 MiB/s
 twofish-xts   512b  163,8 MiB/s  162,5 MiB/s


--- Serpent ---
serpent_avx_x86_64:
#  Algorithm | Key | Encryption | Decryption
 serpent-cbc   128b   80,2 MiB/s  301,7 MiB/s
 serpent-cbc   256b   78,7 MiB/s  301,0 MiB/s
 serpent-xts   256b  286,7 MiB/s  279,4 MiB/s
 serpent-xts   512b  294,7 MiB/s  281,4 MiB/s

After rmmod serpent_avx_x86_64:
serpent_sse2_x86_64:
#  Algorithm | Key | Encryption | Decryption
 serpent-cbc   128b   80,7 MiB/s  298,4 MiB/s
 serpent-cbc   256b   80,8 MiB/s  302,7 MiB/s
 serpent-xts   256b  274,5 MiB/s  265,7 MiB/s
 serpent-xts   512b  271,0 MiB/s  273,7 MiB/s

After rmmod serpent_sse2_x86_64
serpent_generic:
#  Algorithm | Key | Encryption | Decryption
 serpent-cbc   128b   74,9 MiB/s   82,8 MiB/s
 serpent-cbc   256b   73,2 MiB/s   79,8 MiB/s
 serpent-xts   256b   78,4 MiB/s   83,2 MiB/s
 serpent-xts   512b   79,8 MiB/s   83,6 MiB/s


With serpent_avx_x86_64 loaded and serpent_sse2_x86_64 removed
#  Algorithm | Key | Encryption | Decryption
 serpent-cbc   128b   80,2 MiB/s  303,4 MiB/s
 serpent-cbc   256b   81,6 MiB/s  306,4 MiB/s
 serpent-xts   256b  289,0 MiB/s  278,7 MiB/s
 serpent-xts   512b  296,0 MiB/s  282,4 MiB/s

Seems the AVX version doesn't make much of a difference compared to the 
SSE version.




And last but not least the other benchmark mentioned:
cast5_avx_x86_64:
#  Algorithm | Key | Encryption | Decryption
   cast5-cbc   128b  103,3 MiB/s  302,0 MiB/s

After rmmod cast5_avx_x86_64
cast5_generic:
#  Algorithm | Key | Encryption | Decryption
   cast5-cbc   128b   95,1 MiB/s  107,5 MiB/s



I didn't average several runs, except for serpent the numbers differ 
enough that the accuracy is good enough(tm).
The few runs i tried had relativly stable numbers.


Btw. The encryption & decryption columns need to be 1 char wider, the 
aesni-numbers are too big. ;-)




-- 

Matthias


More information about the dm-crypt mailing list