1

i'm trying to implement SHA3-512 in c++, and i've found this PDF where the state is printed at the end of every function.
The first iteration, before theta function:

line[0-4, 0] = A3A3A3A3A3A3A3A3(hex)
line[0-3, 1] = A3A3A3A3A3A3A3A3(hex)
line[4, 1] = 00000000(hex)
line[0-4, 2-4] = 00000000(hex)

so:

col[2, 0] = 11000(bin)
col[3, 0] = 11000(bin)
col[4, 63] = 10000(bin)

In theta function you set bit[3, 0 ,0] to be equal:

bit[3, 0, 0] = xor_bit(col[2, 0]) xor xor_bit(col[4, 63]) xor bit[3, 0, 0]
bit[3, 0, 0] = 0 xor 1 xor 1
bit[3, 0, 0] = 0

where xor_bit return the xor result of every bit in the number you pass
but int the PDF they set the first byte of line[3, 0] to be = E4(hex) = 11100100(bin), so bit[3, 0, 0] = 1.

Obviously i don't think that those who wrote this PDF have been wrong, but i don't know how to explain this.
thank you very much in advance if anyone can help me understand.

Cammo
  • 11
  • 3

0 Answers0