sha3: tweak comments and indentation
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
4ff933c0e7
commit
09a0e2223f
@ -1174,12 +1174,13 @@ static void sha3_process_block72(uint64_t *state)
|
|||||||
|
|
||||||
combine_halves(state);
|
combine_halves(state);
|
||||||
#else
|
#else
|
||||||
/* Elements should be 64-bit, but top half is always zero or 0x80000000.
|
/* Native 64-bit algorithm */
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
static const uint16_t IOTA_CONST[NROUNDS] = {
|
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,
|
0x0001,
|
||||||
0x8082,
|
0x8082,
|
||||||
0x808a,
|
0x808a,
|
||||||
@ -1337,7 +1338,7 @@ static void sha3_process_block72(uint64_t *state)
|
|||||||
x += 9;
|
x += 9;
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
#endif
|
# endif /* long is 32-bit */
|
||||||
/* Iota */
|
/* Iota */
|
||||||
state[0] ^= IOTA_CONST[round]
|
state[0] ^= IOTA_CONST[round]
|
||||||
| (uint32_t)((IOTA_CONST_bit31 << round) & 0x80000000)
|
| (uint32_t)((IOTA_CONST_bit31 << round) & 0x80000000)
|
||||||
|
Loading…
Reference in New Issue
Block a user