Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

KT128

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.

kangarootwelve.KT128
pub const KT128 = KTHash(KT128Variant, turboShake128MultiSliceToBuffer)

File

lib/std/crypto/kangarootwelve.zig:1297

Code

pub const KT128 = KTHash(KT128Variant, turboShake128MultiSliceToBuffer)