go-ethereum/crypto/keccak
Daniel Liu ad0eea0f07
refactor(crypto): vendor in golang.org/x/crypto/sha3 #33323 (#2046)
The upstream libray has removed the assembly-based implementation of
keccak. We need to maintain our own library to avoid a peformance
regression.

---------

Co-authored-by: Felix Lange <fjl@twurst.com>
Co-authored-by: lightclient <lightclient@protonmail.com>
2026-02-28 17:23:57 +04:00
..
testdata refactor(crypto): vendor in golang.org/x/crypto/sha3 #33323 (#2046) 2026-02-28 17:23:57 +04:00
hashes.go refactor(crypto): vendor in golang.org/x/crypto/sha3 #33323 (#2046) 2026-02-28 17:23:57 +04:00
keccakf.go refactor(crypto): vendor in golang.org/x/crypto/sha3 #33323 (#2046) 2026-02-28 17:23:57 +04:00
keccakf_amd64.go refactor(crypto): vendor in golang.org/x/crypto/sha3 #33323 (#2046) 2026-02-28 17:23:57 +04:00
keccakf_amd64.s refactor(crypto): vendor in golang.org/x/crypto/sha3 #33323 (#2046) 2026-02-28 17:23:57 +04:00
LICENSE refactor(crypto): vendor in golang.org/x/crypto/sha3 #33323 (#2046) 2026-02-28 17:23:57 +04:00
README.md refactor(crypto): vendor in golang.org/x/crypto/sha3 #33323 (#2046) 2026-02-28 17:23:57 +04:00
sha3.go refactor(crypto): vendor in golang.org/x/crypto/sha3 #33323 (#2046) 2026-02-28 17:23:57 +04:00
sha3_test.go refactor(crypto): vendor in golang.org/x/crypto/sha3 #33323 (#2046) 2026-02-28 17:23:57 +04:00

This is a vendored and modified copy of golang.org/x/crypto/sha3, with an assembly implementation of keccak256. We wish to retain the assembly implementation, which was removed in v0.44.0.

Ethereum uses a 'legacy' variant of Keccak, which was defined before it became SHA3. As such, we cannot use the standard library crypto/sha3 package.