sha3: tweak comments and indentation

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2014-07-30 16:26:09 +02:00
parent 4ff933c0e7
commit 09a0e2223f

View File

@ -1174,12 +1174,13 @@ static void sha3_process_block72(uint64_t *state)
combine_halves(state);
#else
/* Elements should be 64-bit, but top half is always zero or 0x80000000.
* We encode 63rd bits in a separate word below.
* Same is true for 31th bits, which lets us use 16-bit table instead of 64-bit.
* The speed penalty is lost in the noise.
*/
/* Native 64-bit algorithm */
static const uint16_t IOTA_CONST[NROUNDS] = {
/* Elements should be 64-bit, but top half is always zero
* or 0x80000000. We encode 63rd bits in a separate word below.
* Same is true for 31th bits, which lets us use 16-bit table
* instead of 64-bit. The speed penalty is lost in the noise.
*/
0x0001,
0x8082,
0x808a,
@ -1337,7 +1338,7 @@ static void sha3_process_block72(uint64_t *state)
x += 9;
# endif
}
#endif
# endif /* long is 32-bit */
/* Iota */
state[0] ^= IOTA_CONST[round]
| (uint32_t)((IOTA_CONST_bit31 << round) & 0x80000000)