Skip to content

Conversation

@jedisct1
Copy link
Contributor

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

They are the fastest options in Zig for securely hashing large inputs.

@jedisct1 jedisct1 requested a review from andrewrk November 22, 2025 07:03
Copy link
Member

@andrewrk andrewrk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! You already addressed both issues I had here:

  • using std.testing.random_seed rather than std.crypto.random
  • avoiding getCpuCount()

Remaining merge blocker is only the CI failures.

KangarooTwelve is a family of two fast and secure extendable-output
functions (XOFs): KT128 and KT256. These functions generalize
traditional hash functions by allowing arbitrary output lengths.

KangarooTwelve was designed by SHA-3 authors. It aims to deliver
higher performance than the SHA-3 and SHAKE functions defined in
FIPS 202, while preserving their flexibility and core security
principles.

On high-end platforms, it can take advantage of parallelism,
whether through multiple CPU cores or SIMD instructions.

As modern SHA-3 constructions, KT128 and KT256 can serve as
general-purpose hash functions and can be used, for example, in
key-derivation, and with arbitrarily large inputs.

RFC9861: https://datatracker.ietf.org/doc/rfc9861/
Allow KT128 and KT256 to use multiple threads to quickly process
very large inputs.
@jedisct1 jedisct1 enabled auto-merge (rebase) November 26, 2025 09:15
@alexrp alexrp disabled auto-merge November 26, 2025 15:30
@alexrp alexrp enabled auto-merge November 26, 2025 15:30
@alexrp alexrp merged commit 2e328be into ziglang:master Nov 26, 2025
9 checks passed
@andrewrk
Copy link
Member

What ended up being the cause of the CI failures?

@jedisct1
Copy link
Contributor Author

What ended up being the cause of the CI failures?

Tests using too much memory for the qemu environment.

@jedisct1 jedisct1 deleted the kt128r branch November 26, 2025 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants