Keccak256
The Keccak sponge, standardised by NIST in FIPS 202 as a structural alternative to SHA-2
Old but not broken. Kept for interoperability; root API only. Reach it with NextSSL(root=True) in Python or the nextssl_root_* functions in C.
About Keccak256
Keccak256 is one of 6 SHA-3 and Keccak variants in the NextSSL registry, a cryptographic hash function. It produces a 32-byte (256-bit) output. Its registry entry cites Keccak submission v3 (pre-FIPS 202 padding 0x01). NextSSL lists it in the legacy tier and exposes it through the root API only (NextSSL(root=True) in Python, nextssl_root_* in C).
Overview
SHA-3 is the hash family derived from Keccak, the winner of NIST's 2007–2012 hash competition. It uses a sponge construction over a 1600-bit permutation, which makes it structurally independent of SHA-2 and immune to length-extension.
Keccak absorbs input into a 1600-bit state by XORing message blocks into its first r bits, the rate, and applying the Keccak-f[1600] permutation after each block. The remaining c bits, the capacity, are never directly exposed and determine the security level. Once all input is absorbed, output is squeezed out of the rate portion. The permutation itself uses 24 rounds of five simple steps (theta, rho, pi, chi, iota) on 64-bit lanes.
NextSSL includes SHA3-224, SHA3-256, SHA3-384 and SHA3-512 as specified in FIPS 202, together with Keccak-256 and Keccak-512 using the original submission padding (0x01 instead of the FIPS 202 domain-separation byte 0x06). Keccak-256 is the variant used by Ethereum, and its outputs differ from SHA3-256 for the same input. The SHAKE256 extendable-output function, also defined in FIPS 202, shares this family.
Keccak was designed by Guido Bertoni, Joan Daemen, Michaël Peeters and Gilles Van Assche and selected as SHA-3 in October 2012. FIPS 202 was published in August 2015. NIST positioned SHA-3 as a complement to SHA-2 rather than a replacement. Adoption has grown slowly, but SHA-3 and its SHAKE functions are now central to the NIST post-quantum standards, which use them for hashing and seed expansion throughout.
History
2007–2015NIST announces a public competition for a new hash standard, SHA-3
NIST SHA-3 competitionKeccak submitted to the SHA-3 competition
14 designs advance to round 2
NIST SHA-3 competitionFive finalists named: BLAKE, Grøstl, JH, Keccak and Skein
NIST SHA-3 competitionKeccak selected as SHA-3
SHA-3 and SHAKE published in FIPS 202
How it works
- Pad the input and split it into rate-sized blocks
- XOR each block into the 1600-bit state
- Apply Keccak-f[1600] (24 rounds) after each block
- Squeeze output from the rate portion of the state
Security notes
No practical attacks are known on full-round Keccak or SHA-3; the best published results reach well under half of the 24 rounds. The legacy Keccak-256/512 variants are as strong as SHA-3 but are not interoperable with it, so the two must not be confused.
Typical uses
Sizes
| Field | Bytes | Meaning |
|---|---|---|
| out | 32 | Output |
Use it
from nextssl_demo import NextSSL
root = NextSSL(root=True) # tier 'legacy' is reachable from the root API only
digest = root.call("hash_with", "keccak256", None, b"abc")[0]
nextssl_root_hash_with("keccak256", NULL, data, out);
use nextssl_core::Params;
use nextssl_registry::{self as reg, Policy};
let digest = reg::hash_in(reg::all(), Policy::Any, "keccak256", &Params::new(), b"abc")?;
Calls follow the NextSSL C ABI and its language bindings. Buffer sizes are validated against the sizes above.
Other SHA-3 and Keccak variants
5Similar names
Looking for something else?More hash functions
All 424Frequently asked questions
What is Keccak256?
Keccak256 is a hash in the SHA-3 and Keccak family. SHA-3 is the hash family derived from Keccak, the winner of NIST's 2007–2012 hash competition.
What are the Keccak256 sizes?
In NextSSL, Keccak256 uses: output 32 bytes.
Who designed Keccak256 and when?
Keccak256 belongs to the SHA-3 and Keccak family, first published in 2015 by Guido Bertoni, Joan Daemen, Michaël Peeters, Gilles Van Assche. Its origin: SHA-3 competition winner (FIPS 202).
Which standards define Keccak256?
Keccak256 is referenced by Keccak submission v3 (pre-FIPS 202 padding 0x01).
Is Keccak256 safe to use?
Keccak256 is in the legacy tier. Old but not broken. Kept for interoperability; root API only. It is only reachable through the root API (NextSSL(root=True) in Python, nextssl_root_* in C).
What other SHA-3 and Keccak variants are there?
NextSSL also registers keccak512, sha3-224, sha3-256, sha3-384, sha3-512 in the SHA-3 and Keccak family.
Related families
The NIST Merkle–Damgård hash family behind most of today's TLS, signatures and software
ML-KEMNIST's primary post-quantum key encapsulation mechanism, standardised in FIPS 203
KMACNIST's Keccak-based MAC from SP 800-185, with optional arbitrary-length output
ML-DSANIST's primary post-quantum signature scheme, standardised in FIPS 204
cSHAKECustomisable SHAKE from SP 800-185, adding function-name and customisation strings
KangarooTwelveA fast tree-hashing XOF over 12-round Keccak, standardised in RFC 9861