GPG Bench Cipher

I benchmarked a few of the gpg ciphers. I created a 1GB file from /dev/urandom with dd. Running “gpg –version” gives a list of available ciphers. I then ran “time cat test | gpg –symmetric –cipher-algo TWOFISH > test.enc” for each cipher to see how fast they all were. It’s not amazingly accurate but it gave a good indication which one to avoid! I ran this on my “Intel(R) Core(TM)2 CPU 6400 @ 2.13GHz”, 2.6.30 gives this 4256 bogomips for what its worth. Anyway, on with the results.

CipherTime
3DES2m26.740s
CAST51m29.993s
BLOWFISH1m31.629s
AES1m26.921s
AES1921m31.041s
AES2561m33.717s
TWOFISH1m28.190s

I also ran a new file of the same size but just zeros. The results were all more or less the same, I’m not sure why the times are so much sorter, I guess all the algorithms are good at optimizing zeros. Also dd takes about 15 seconds to write a 1G file “time echo $(dd if=/dev/zero bs=1M count=1024 of=test; sync)”, this equates to about 70MB/s write speed which sounds in the right ball park.

CipherTime
3DES0m25.998s
CAST50m26.112s
BLOWFISH0m25.927s
AES0m27.275s
AES1920m27.265s
AES2560m26.926s
TWOFISH0m27.481s

So don’t use 3DES, otherwise they are all pretty much the same. To improve it more I should probably make an effort to the idle the cpu and make the file a lot bigger or store the file in ram, but I can’t be bothered.

Computer enthusiast and sysadmin