The cryptonote whitepaper says
First, the input is hashed using Keccak [KECCAK] with parameters b = 1600 and c = 512. [..]
That's nothing else as hashing the input with SHA3. The size of a SHA3 hash is 512 bit = 64 byte. The paper continues
[..] The bytes 64..191 are extracted from the Keccak final state and split into 8 blocks of 16 bytes each.
How can I extract the bytes from 64 to 191 when the size of the hash is only 64 byte?
Edit: Does Keccak final state refer to the internal state of the SHA3 algorithm and not to the output? If yes that leads to the question how can I get this value when I use a normal SHA3 hashing function that just returns the output. Or - oh my gosh - do I need to implement SHA3 by my own?
src/crypto/keccak.c
code. – Marki555 Jul 16 '18 at 20:10keccakf(st,KECCAK_ROUNDS)
in keccak.c? – Marki555 Jul 17 '18 at 08:25for
loop (firstkeccakf
), then the remaining bytes of the message are padded and hashed (secondkeccakf
). In mininero's Keccak.py, the message is padded first, then the padded message is hashed completely (firstkeccakf
in thefor
loop). The secondkeccakf
(in the "squeezing phase") will never be called given the parameters used for monero (n = 256, r = 1088). – glv Jul 17 '18 at 08:43