Add std.crypto.hash.sha3.{KT128,KT256} - RFC 9861. (#25593)#26005
Merged
alexrp merged 2 commits intoziglang:masterfrom Nov 26, 2025
Merged
Add std.crypto.hash.sha3.{KT128,KT256} - RFC 9861. (#25593)#26005alexrp merged 2 commits intoziglang:masterfrom
alexrp merged 2 commits intoziglang:masterfrom
Conversation
andrewrk
approved these changes
Nov 23, 2025
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.
Member
|
What ended up being the cause of the CI failures? |
Contributor
Author
Tests using too much memory for the qemu environment. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.