diff --git a/ChangeLog b/ChangeLog index 5e89a119a4ca03d1d2853f49c709418394472040..a8ecc958eb387a0c324db160e150b7d19c8edec2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2011-02-07 Niels M�ller <nisse@lysator.liu.se> + * gcm.c (gcm_gf_shift_chunk) : Bug fix for little-endian 8-bit + tables. + * gcm.c (gcm_gf_mul_chunk): Special case first and last iteration. (gcm_gf_add): New function, a special case of memxor. Use it for all memxor calls with word-aligned 16 byte blocks. Improves diff --git a/gcm.c b/gcm.c index cea7da32cd8654773817399b56a657b6b8c77637..70598d44a7c90f7cb776f952eb4f3d782629e903 100644 --- a/gcm.c +++ b/gcm.c @@ -283,8 +283,7 @@ gcm_gf_shift_chunk(uint8_t *x) #endif #else /* ! WORDS_BIGENDIAN */ # if SIZEOF_LONG == 4 -#define RSHIFT_WORD(x) \ - reduce = shift_table[(w[3] >> 56) & 0xff]; + reduce = shift_table[(w[3] >> 24) & 0xff]; w[3] = (w[3] << 8) | (w[2] >> 24); w[2] = (w[2] << 8) | (w[1] >> 24); w[1] = (w[1] << 8) | (w[0] >> 24);