Skip to content

Commit

Permalink
Correct misunderstanding about bit direction for extra sizes (#89)
Browse files Browse the repository at this point in the history
In a previous pull request #84 I added several sizes, but mistook the
direction of the binary representation of the added values. Along with
that one of the sizes was calculated incorrectly. (My apologies!)

This corrects both of those errors, successfully tested using the
downstream library. Also I checked (via script) all of the other binary
representations and and they all match the assigned values.

Co-authored-by: jmwample <[email protected]>
  • Loading branch information
jmwample and jmwample authored Sep 15, 2024
1 parent 3df563c commit f6fd208
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/sizes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -819,15 +819,15 @@ mod extra_sizes {
pub type U49856 = uint!(0 0 0 0 0 0 1 1 0 1 0 0 0 0 1 1);

// Kemeleon ML-KEM Encoding sizes
pub type U749 = uint!(0 0 1 0 1 1 1 0 1 1 0 1);
pub type U781 = uint!(0 0 1 1 0 0 0 0 1 1 0 1);
pub type U877 = uint!(0 0 1 1 0 1 1 0 1 1 0 1);
pub type U1124 = uint!(0 1 0 0 0 1 1 0 0 1 0 0);
pub type U1156 = uint!(0 1 0 0 1 0 0 0 0 1 0 0);
pub type U1252 = uint!(0 1 0 0 1 1 1 0 0 1 0 0);
pub type U1498 = uint!(0 1 0 1 1 1 0 1 1 0 1 0);
pub type U1530 = uint!(0 1 0 1 1 1 1 1 1 0 1 0);
pub type U1626 = uint!(0 1 1 0 0 1 0 1 1 0 1 0);
pub type U749 = uint!(1 0 1 1 0 1 1 1 0 1);
pub type U781 = uint!(1 0 1 1 0 0 0 0 1 1);
pub type U877 = uint!(1 0 1 1 0 1 1 0 1 1);
pub type U1124 = uint!(0 0 1 0 0 1 1 0 0 0 1);
pub type U1156 = uint!(0 0 1 0 0 0 0 1 0 0 1);
pub type U1252 = uint!(0 0 1 0 0 1 1 1 0 0 1);
pub type U1498 = uint!(0 1 0 1 1 0 1 1 1 0 1);
pub type U1530 = uint!(0 1 0 1 1 1 1 1 1 0 1);
pub type U1658 = uint!(0 1 0 1 1 1 1 0 0 1 1);

impl_array_sizes! {
1040 => U1040,
Expand Down Expand Up @@ -1049,6 +1049,6 @@ mod extra_sizes {
1252 => U1252,
1498 => U1498,
1530 => U1530,
1626 => U1626,
1658 => U1658,
}
}

0 comments on commit f6fd208

Please sign in to comment.