KangarooTwelve is a fast, secure cryptographic hash function that uses tree-hashing on top of TurboSHAKE. It is built on the Keccak permutation, the same primitive underlying SHA-3, which has undergone over 15 years of intensive cryptanalysis since the SHA-3 competition (2008-2012) and remains secure.
K12 uses Keccak-p[1600,12] with 12 rounds (half of SHA-3's 24 rounds), providing 128-bit security strength equivalent to AES-128 and SHAKE128. While this offers less conservative margin than SHA-3, current cryptanalysis reaches only 6 rounds, leaving a substantial security margin. This deliberate trade-off delivers significantly better performance while maintaining strong practical security.
Standardized as RFC 9861 after 8 years of public scrutiny. Supports arbitrary-length output and optional customization strings for domain separation.
pub const KT128 = KTHash(KT128Variant, turboShake128MultiSliceToBuffer)
pub const KT128 = KTHash(KT128Variant, turboShake128MultiSliceToBuffer)