Algorithms
SHA3-256
The NIST SHA-3 sponge at 32 bytes with HMAC. Nothing in common with SHA-2 inside
Hash / Cryptographic
SHA3-256
NIST's sponge, nothing in common with SHA-2.
- Digest
- 256-bit · 32 bytes
- HMAC
- takes a key
- Security
- 128-bit collision resistance
- Family
- 16 in cryptographic
2 options, 0 required
Sample
- hex
- 644bcc7e564373040999aac89e7622f3ca71fba1d972fd94a31c3bfbf24e3938
- base64
- ZEvMflZDcwQJmarInnYi88px+6HZcv2Uoxw7+/JOOTg=
Options
Access
- Create
create("sha3-256") - CLI
hashes sha3-256 'hello world' - Tryplayground with the sample above
- Kinsha256, sha384, sha512, sha512-half +11
Keccak's sponge as NIST standardised it in FIPS 202. A completely different design from SHA-2, which is the point: if SHA-2 ever falls, this doesn't fall with it.
create("sha3-256").hash("").digest;
// "a7ffc6f8bf1ed76651c14756a061d662f580ff4de43b49fa82d80a4b80f8434a"
create("keccak256").hash("").digest;
// "c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"
Same permutation, same rate, one different padding byte, two unrelated digests. Ethereum froze its choice before NIST changed that byte, so an Ethereum hash is Keccak-256, and calling it SHA3 is a bug report waiting to happen.