Joined: 27 Aug 2013
|Posted: Wed Jul 01, 2015 6:52 pm Post subject: cryptsetup benchmark all chiphers and their implementations
|I'm playing with disk encryption and I noticed that cryptsetup benchmark only tests a few algorithms instead of all chiphers available.
Is there any way to force cryptsetup to benchmark all chiphers kernel provides?
Is there any way to test different implementations?
|# cryptsetup benchmark
# Tests are approximate using memory only (no storage IO).
PBKDF2-sha1 327680 iterations per second
PBKDF2-sha256 189959 iterations per second
PBKDF2-sha512 128501 iterations per second
PBKDF2-ripemd160 273066 iterations per second
PBKDF2-whirlpool 123652 iterations per second
# Algorithm | Key | Encryption | Decryption
aes-cbc 128b 141.2 MiB/s 167.0 MiB/s
serpent-cbc 128b 60.4 MiB/s 150.6 MiB/s
twofish-cbc 128b 123.2 MiB/s 136.8 MiB/s
aes-cbc 256b 114.7 MiB/s 121.7 MiB/s
serpent-cbc 256b 58.8 MiB/s 154.2 MiB/s
twofish-cbc 256b 120.3 MiB/s 143.7 MiB/s
aes-xts 256b 158.2 MiB/s 170.2 MiB/s
serpent-xts 256b 141.6 MiB/s 139.4 MiB/s
twofish-xts 256b 132.3 MiB/s 138.8 MiB/s
aes-xts 512b 129.4 MiB/s 123.5 MiB/s
serpent-xts 512b 147.9 MiB/s 143.7 MiB/s
twofish-xts 512b 134.4 MiB/s 118.9 MiB/s
Only 3 algorithms in 2 modes. What about tea, xtea, salsa20, blowfish, etc? I have those and more available. I can run for example xtea benchmark manualy, but I would like to have some way to test everything in a batch so I can easily collect results. Also, there are more modes available, I could use ctr or lrw for example. (and if I try to test salsa20, it says there is no such chipher available)
Now, I have e.g.
name : cbc(serpent)
driver : cbc-serpent-sse2
name : cbc(serpent)
driver : cbc(serpent-generic)
in my /proc/crypto, how can I test them both to compare the speed?
Oh, and before someone says blowfish is old, rc4 sucks and aes is the way to go, let me remind you that links weaker than chipher exist in security chain. And I know rc4 sucks.