Closed heri16 closed 2 years ago
The Minor Difference: https://ethereum.stackexchange.com/a/554 (Slight difference in the padding)
SHA3 visualized: https://codesigningstore.com/hash-algorithm-comparison
We can see it's just changing the pad
from 0x06
to 0x01
:
Elixir
Go
rate_pad
is the same at 0x80
.
Kindly review #15 which addresses this issue.
@heri16 This is supported now in libdecaf 2.1.0, see this section of the README for example usage.
Is there support for
LegacyKeccak256
as implemented by Ethereum?Golang stdlib has it: https://pkg.go.dev/golang.org/x/crypto/sha3#NewLegacyKeccak256
If no, what would be a good PR to make it work?
https://github.com/potatosalad/erlang-libdecaf/blob/ef040752a02e32d90aa0639a5e9a02406b8d634c/c_deps/ed448goldilocks/src/include/keccak_internal.h#L27-L29
https://github.com/potatosalad/erlang-libdecaf/blob/ef040752a02e32d90aa0639a5e9a02406b8d634c/c_deps/ed448goldilocks/src/shake.c#L213-L215
Defined here: https://github.com/potatosalad/erlang-libdecaf/blob/ef040752a02e32d90aa0639a5e9a02406b8d634c/c_deps/ed448goldilocks/src/public_include/decaf/shake.h#L272
https://github.com/potatosalad/erlang-libdecaf/blob/ef040752a02e32d90aa0639a5e9a02406b8d634c/c_deps/ed448goldilocks/src/shake.c#L236