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.

KT256

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.

KT256 provides 256-bit security strength and achieves NIST post-quantum security level 2 when using at least 256-bit outputs. Like KT128, it uses Keccak-p[1600,12] with 12 rounds, offering a deliberate trade-off between conservative margin and significantly better performance while maintaining strong practical security.

Use KT256 when you need extra conservative margins. For most applications, KT128 offers better performance with adequate security.

kangarootwelve.KT256
pub const KT256 = KTHash(KT256Variant, turboShake256MultiSliceToBuffer)

File

lib/std/crypto/kangarootwelve.zig:1311

Code

pub const KT256 = KTHash(KT256Variant, turboShake256MultiSliceToBuffer)