Open SuperFluffy opened 4 years ago
Hi @debris , would you be open to providing a reset
method on Keccak
so that we can zero out the buffer there?
One thing to note: cSHAKE, and all cSHAKE-based functions, cannot straightly expose the reset
method, because cSHAKE has a process of initialization based on name
and custom_string
, in other words the "initial" Buffer
state is not all zero. You can refer to RustCrypto's cSHAKE implementation. However, Keccak, SHA3 and SHAKE do not have an initialization process, so you can straightly expose the reset
method.
I would like to be able to reset the internal
KeccakState
of aKeccak
instance so that its buffer and offset are zeroed out. I can see that there is a methodreset
onKeccakState
, which however is only ever called fromKangarooTwelve
.It is possible to provide a
reset
method onKeccak
callingKeccakState:reset
? Is there maybe a reason why there is no such method? I can otherwise provide a PR, but I wanted to ask first.