Mercurial > dropbear
diff libtomcrypt/src/modes/xts/xts_mult_x.c @ 1511:5916af64acd4 fuzz
merge from main
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 17 Feb 2018 19:29:51 +0800 |
parents | 6dba84798cd5 |
children |
line wrap: on
line diff
--- a/libtomcrypt/src/modes/xts/xts_mult_x.c Tue Jan 23 23:27:40 2018 +0800 +++ b/libtomcrypt/src/modes/xts/xts_mult_x.c Sat Feb 17 19:29:51 2018 +0800 @@ -5,38 +5,35 @@ * * The library is free for all purposes without any express * guarantee it works. - * - * Tom St Denis, [email protected], http://libtom.org */ #include "tomcrypt.h" -/** +/** Source donated by Elliptic Semiconductor Inc (www.ellipticsemi.com) to the LibTom Projects */ #ifdef LTC_XTS_MODE -/** multiply by x +/** multiply by x @param I The value to multiply by x (LFSR shift) */ void xts_mult_x(unsigned char *I) { - int x; - unsigned char t, tt; + int x; + unsigned char t, tt; - for (x = t = 0; x < 16; x++) { - tt = I[x] >> 7; - I[x] = ((I[x] << 1) | t) & 0xFF; - t = tt; - } - if (tt) { - I[0] ^= 0x87; - } + for (x = t = 0; x < 16; x++) { + tt = I[x] >> 7; + I[x] = ((I[x] << 1) | t) & 0xFF; + t = tt; + } + if (tt) { + I[0] ^= 0x87; + } } #endif -/* $Source$ */ -/* $Revision$ */ -/* $Date$ */ - +/* ref: $Format:%D$ */ +/* git commit: $Format:%H$ */ +/* commit time: $Format:%ai$ */