summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2011-02-16 17:17:49 +0100
committerWerner Koch <wk@gnupg.org>2011-02-16 17:17:49 +0100
commitd9795cfdd758e2aa22e7ab8a6790e2915d1f5334 (patch)
tree3529ce3d48631e33b56520e0bd876edebc334ef1 /compat
parentb825c5db17292988d261fefdc83cbc43d97d4b02 (diff)
downloadlibgcrypt-d9795cfdd758e2aa22e7ab8a6790e2915d1f5334.tar.gz
Improved AES-CFB performance using AES-NI insn.
There is also a new regression test which tests the bulk encryption methods we have for a few ciphers (namely AES). A bug in them could have slipped through because we only did encrypt-decrypt tests but didn't compared them to fixed vectors. Benchmarks using gcc 4.4 show a 7 fold speed improvement for CFB encryption and 14 for decryption. This is a bit strange; someone should check the code to see why we have this difference. Without AESNI (undef USE_AESNI in rijndael.c): $ ./benchmark --cipher-repetitions 100 --alignment 16 cipher aes aes256 Running each test 100 times. ECB/Stream CBC CFB OFB CTR --------------- --------------- --------------- --------------- --------------- AES 1370ms 1430ms 1140ms 1190ms 1120ms 1130ms 1520ms 1540ms 1780ms 1770ms AES256 1780ms 1850ms 1530ms 1610ms 1540ms 1530ms 1930ms 1960ms 2180ms 2180ms With AESNI: $ ./benchmark --cipher-repetitions 100 --alignment 16 cipher aes aes256 Running each test 100 times. ECB/Stream CBC CFB OFB CTR --------------- --------------- --------------- --------------- --------------- AES 80ms 100ms 240ms 220ms 140ms 70ms 300ms 290ms 490ms 510ms AES256 130ms 130ms 290ms 270ms 200ms 100ms 340ms 340ms 470ms 470ms $ ./benchmark --cipher-repetitions 100 --alignment 0 cipher aes aes256 Running each test 100 times. ECB/Stream CBC CFB OFB CTR --------------- --------------- --------------- --------------- --------------- AES 80ms 90ms 240ms 230ms 150ms 80ms 290ms 300ms 500ms 530ms AES256 130ms 130ms 290ms 260ms 190ms 110ms 340ms 340ms 470ms 490ms
Diffstat (limited to 'compat')
0 files changed, 0 insertions, 0 deletions