Skip to content

ascon-hash256: refactor code and split XOF into ascon-xof128 crate#841

Merged
newpavlov merged 5 commits intomasterfrom
ascon_refactor
Apr 24, 2026
Merged

ascon-hash256: refactor code and split XOF into ascon-xof128 crate#841
newpavlov merged 5 commits intomasterfrom
ascon_refactor

Conversation

@newpavlov
Copy link
Copy Markdown
Member

@newpavlov newpavlov commented Apr 22, 2026

Additionally, implements Ascon-CXOF128 as part of the new ascon-xof128 crate.

@newpavlov newpavlov changed the title ascon-hash256: refactor code and split XOF into separate crate ascon-hash256: refactor code and split XOF into ascon-xof128 crate Apr 23, 2026
@newpavlov newpavlov requested a review from tarcieri April 23, 2026 01:01
Comment thread ascon-xof128/src/block_api/cxof.rs Outdated
#[inline]
fn new_customized(customization: &[u8]) -> Self {
let bit_len = 8 * customization.len();
assert!(bit_len < MAX_CUSTOM_LEN);
Copy link
Copy Markdown
Member Author

@newpavlov newpavlov Apr 23, 2026

Choose a reason for hiding this comment

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

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.

@newpavlov newpavlov merged commit fbf73b0 into master Apr 24, 2026
261 checks passed
@newpavlov newpavlov deleted the ascon_refactor branch April 24, 2026 14:49
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.

1 participant