KangarooTwelve
A fast tree-hashing XOF over 12-round Keccak, standardised in RFC 9861
Overview
KangarooTwelve (K12) is an extendable-output function from the Keccak team that uses a 12-round Keccak permutation and a tree mode for long inputs. It offers 128-bit security at several times the speed of SHAKE128.
K12 is built on TurboSHAKE128, which is SHAKE128 with the Keccak permutation reduced from 24 to 12 rounds. Inputs up to 8 KiB are hashed directly. Longer inputs are split into 8 KiB chunks; every chunk after the first is hashed independently into a 256-bit chaining value, and these values are appended to the first chunk and hashed in a final node. The chunks can be processed in parallel with SIMD or multiple cores.
K12 was introduced in 2016 and standardised, together with TurboSHAKE and the 256-bit-security KT256, in RFC 9861. It takes an optional customisation string. NextSSL includes KangarooTwelve (KT128). KT128 provides 128-bit security against all attacks, with output of any length. Its speed comes from both the reduced round count and the ability to process several chunks at once using vector instructions.
History
2016–2025KangarooTwelve published by the Keccak team
Specified in RFC 9861
Security notes
The 12-round Keccak permutation retains a large security margin: the best published attacks on Keccak reach about six rounds. No weaknesses specific to K12 are known.
Typical uses
Variants in NextSSL
1| Algorithm | Tier | Sizes (bytes) | Standards | API |
|---|---|---|---|---|
| Kangarootwelve kangarootwelve |
standard | — | RFC 9861 | safe |
Frequently asked questions
Which KangarooTwelve variants does NextSSL include?
NextSSL registers 1 KangarooTwelve variant: kangarootwelve.
Other extendable-output functions
All 8Related
A Merkle-tree hash over BLAKE2s rounds, designed for parallel speed and unlimited output
SHA-3 and KeccakThe Keccak sponge, standardised by NIST in FIPS 202 as a structural alternative to SHA-2
BLAKE3A Merkle-tree hash over BLAKE2s rounds, designed for parallel speed and unlimited output
SHA-3 and KeccakThe Keccak sponge, standardised by NIST in FIPS 202 as a structural alternative to SHA-2
SHAKEThe extendable-output functions of FIPS 202, producing any length of output from Keccak
TurboSHAKESHAKE with the Keccak permutation reduced to 12 rounds, standardised in RFC 9861