diff options
author | Jussi Kivilinna <jussi.kivilinna@mbnet.fi> | 2012-11-16 10:45:43 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2012-11-21 11:52:33 +0100 |
commit | 8afabc2813948778a3db52d9dee9a041a3dd50d4 (patch) | |
tree | 2687114669064d67bceea84752f1287677711c46 /AUTHORS | |
parent | d8bdfa42ed582655c180e7db9b16d4e756a12a6e (diff) | |
download | libgcrypt-8afabc2813948778a3db52d9dee9a041a3dd50d4.tar.gz |
Fix too large burn_stack in camellia-glue.c
* cipher/camellia-glue.c (camellia_encrypt, camellia_decrypt): Do not
take full array size of KEY_TABLE_TYPE, but argument size instead.
--
KEY_TABLE_TYPE is array type, and sizeof(KEY_TABLE_TYPE) gives full
size of array. However what is wanted here is size of array argument
in stack, so change sizeof(KEY_TABLE_TYPE) to sizeof(void*). This
gives boost in speed for camellia cipher.
On AMD Phenom II, x86-64:
Before:
$ tests/benchmark --cipher-repetitions 10 cipher camellia128
Running each test 10 times.
ECB/Stream CBC CFB OFB CTR
--------------- --------------- --------------- --------------- ---------------
CAMELLIA128 250ms 240ms 270ms 260ms 250ms 250ms 260ms 250ms 340ms 330ms
After:
$ tests/benchmark --cipher-repetitions 10 cipher camellia128
Running each test 10 times.
ECB/Stream CBC CFB OFB CTR
--------------- --------------- --------------- --------------- ---------------
CAMELLIA128 140ms 130ms 150ms 160ms 150ms 150ms 150ms 140ms 220ms 220ms
[v2]
- Add GNU style changelog
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Diffstat (limited to 'AUTHORS')
0 files changed, 0 insertions, 0 deletions