x86_64/SSE2 optimized Serpent cipher algorithm: 3x faster

Yesterday linux 3.3.0 has been released, one of the less talked features is the new assembly optimized Serpent cipher algorithm.

Serpent is a symmetric keyblock cipher which was a finalist in the Advanced Encryption Standard (AES) contest, where it came second to Rijndael. Serpent was designed by Ross Anderson, Eli Biham, and Lars Knudsen.
Source: Wikipedia

My laptop’s root is Serpent encrypted, so this is an awesome news for me. If you have an encrypted root you can easily benchmark the cipher performance with

hdparm -t /dev/mapper/vg-root

while you can see the potential of the disk with

hdparm -t /dev/sda /dev/sda:
Timing buffered disk reads: 750 MB in 3.00 seconds = 249.75 MB/sec

The new assembly optimized cipher proved to be 3x times faster on my laptop, you can find the commits here:
http://git.kernel.org/?p=linux/kernel/git/herbert/crypto-2.6.git;a=commit;
h=937c30d7f560210b0163035edd42b2aef78fed9e

http://git.kernel.org/?p=linux/kernel/git/herbert/crypto-2.6.git;a=commit;
h=251496dbfc1be38bc43b49651f3d33c02faccc47

Also, linux 3.2 carries an SSSE3 based SHA1 implementation for x86-64 (up to 2.3x faster). I’m pretty sure it is of much more interest because it is widely used in ipsec tunnels.

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>