Skip to content

Update ML-DSA sizes #108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/sizes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -806,9 +806,20 @@ mod extra_sizes {
pub type U4080 = uint!(0 0 0 0 1 1 1 1 1 1 1 1);

// ML-DSA sizes
//
// Includes the public key, private key, and signature sizes not covered elsewhere, as well as
// some intermediate value sizes.
//
// U3293 is not required for ML-DSA, but was included in an early iteration of this section
// (before the `ml_dsa` crate was created). So it is included here for backward compatibility.
pub type U2420 = uint!(0 0 1 0 1 1 1 0 1 0 0 1);
pub type U3293 = uint!(1 0 1 1 1 0 1 1 0 0 1 1);
pub type U3309 = uint!(1 0 1 1 0 1 1 1 0 0 1 1);
pub type U4480 = uint!(0 0 0 0 0 0 0 1 1 0 0 0 1);
pub type U4544 = uint!(0 0 0 0 0 0 1 1 1 0 0 0 1);
pub type U4595 = uint!(1 1 0 0 1 1 1 1 1 0 0 0 1);
pub type U4627 = uint!(1 1 0 0 1 0 0 0 0 1 0 0 1);
pub type U4896 = uint!(0 0 0 0 0 1 0 0 1 1 0 0 1);

// SLH-DSA sizes
pub type U7856 = uint!(0 0 0 0 1 1 0 1 0 1 1 1 1);
Expand Down Expand Up @@ -1051,7 +1062,12 @@ mod extra_sizes {
impl_array_sizes! {
2420 => U2420,
3293 => U3293,
3309 => U3309,
4480 => U4480,
4544 => U4544,
4595 => U4595,
4627 => U4627,
4896 => U4896,
}

// SLH-DSA sizes
Expand Down
Loading