# Add std.crypto.hash.sha3\.\{KT128,KT256\} \- RFC 9861\. \(\#25593\) · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/95c76b1b4aa7302966281c6b9b7f6cadea3cf7a6)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 95c76b1b4aa7302966281c6b9b7f6cadea3cf7a6

Requested commit: 95c76b1b4aa7302966281c6b9b7f6cadea3cf7a6

Commit: 95c76b1b4aa7302966281c6b9b7f6cadea3cf7a6

Tree: ce61f52851efb5aa96d0beb349db996a51179340

Author: Frank Denis

Committer: GitHub

## Message

```
Add std.crypto.hash.sha3.{KT128,KT256} - RFC 9861. (#25593)

KT128 and KT256 are fast, secure cryptographic hash functions based on Keccak (SHA-3).

They can be seen as the modern version of SHA-3, and evolution of SHAKE, with better performance.

After the SHA-3 competition, the Keccak team proposed these variants in 2016, and the constructions underwent 8 years of public scrutiny before being standardized in October 2025 as RFC 9861.

They uses a tree-hashing mode on top of TurboSHAKE, providing both high security and excellent performance, especially on large inputs.

They support arbitrary-length output and optional customization strings.

Hashing of very large inputs can be done using multiple threads, for high throughput.

KT128 provides 128-bit security strength, equivalent to AES-128 and SHAKE128, which is sufficient for virtually all applications.

KT256 provides 256-bit security strength, equivalent to SHA-512. For virtually all applications, KT128 is enough (equivalent to SHA-256 or BLAKE3).

For small inputs, TurboSHAKE128 and TurboSHAKE256 (which KT128 and KT256 are based on) can be used instead as they have less overhead.

```

## Parents

- [4e943fc847befb477fbb76e42b199e1f61868a4a](https://git.cafe/gitcafe/zig/commit/4e943fc847befb477fbb76e42b199e1f61868a4a?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/95c76b1b4aa7302966281c6b9b7f6cadea3cf7a6?format=markdown)
