ascon-hash256: refactor code and split XOF into ascon-xof128 crate#841
Merged
ascon-hash256: refactor code and split XOF into ascon-xof128 crate#841
ascon-xof128 crate#841Conversation
8920934 to
b1c295f
Compare
ascon-xof128 crate
newpavlov
commented
Apr 23, 2026
| #[inline] | ||
| fn new_customized(customization: &[u8]) -> Self { | ||
| let bit_len = 8 * customization.len(); | ||
| assert!(bit_len < MAX_CUSTOM_LEN); |
Member
Author
There was a problem hiding this comment.
I am not sure about this panic. The NIST states:
The length of the customization string shall be at most 2048 bits (i.e., 256 bytes).
Where shall is defined as:
Term used to express a requirement that needs to be fulfilled to claim conformance to this standard.
Technically, the algorithm is able to work with longer customization strings (up to 2^64 bits), so we could skip this check and document it as a user's responsibility.
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.
Additionally, implements Ascon-CXOF128 as part of the new
ascon-xof128crate.