I am reading the monero's implementation of Keccak (used as first part of slow_hash) in src/crypto/keccak.c
I have found that it is a Keccak-256 (with b=1600, c=512, r=1088) and "output" of 1600 bits (is this really keccak's output or only internal state?).
I tried to compare it with simple Python implementation Keccak.py, but the final result is not the same (in fact, first 136 bytes of output are the same, they differ only in the remaining 64). I used myKeccak.Keccak((len(s)*4,s),1088,512,1600,True)
command. However the state after "Value after absorption" is correct! It is the same as output from monero's keccak1600()
function.
Looking at the Keccak.py
sources, does this mean that monero's implementation omits the squeezing part of Keccak? I don't think so as I can see invocation of keccakf()
on 2 places in keccak.c
. Then how is it possible that the final result of python implementation is not correct, but the state before squeezing is?
EDIT: I am asking about the Keccak implementation which is used as first part of slow_hash (during mining), which produces 1600 bits of output.