Skip to content

Commit 51addcb

Browse files
author
Ahmed
committed
Add Array sizes required for NTRU-Prime
1 parent 390b3e4 commit 51addcb

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/sizes.rs

+13-1
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ mod extra_sizes {
602602
use super::{ArraySize, AssocArraySize};
603603
use typenum::{
604604
consts::{B0, B1},
605-
UInt, UTerm,
605+
UInt, UTerm, U1013, U653, U761, U857, U953,
606606
};
607607

608608
// This macro constructs a UInt type from a sequence of bits. The bits are interpreted as the
@@ -805,6 +805,9 @@ mod extra_sizes {
805805
pub type U4064 = uint!(0 0 0 0 0 1 1 1 1 1 1 1);
806806
pub type U4080 = uint!(0 0 0 0 1 1 1 1 1 1 1 1);
807807

808+
//NTRU-PRIME sizes
809+
pub type U1277 = uint!(1 0 0 1 1 1 1 1 1 0 1);
810+
808811
// ML-DSA sizes
809812
pub type U2420 = uint!(0 0 1 0 1 1 1 0 1 0 0 1);
810813
pub type U3293 = uint!(1 0 1 1 1 0 1 1 0 0 1 1);
@@ -1011,6 +1014,15 @@ mod extra_sizes {
10111014
4080 => U4080,
10121015
}
10131016

1017+
// NTRU-Prime sizes
1018+
impl_array_sizes! {
1019+
653 => U653,
1020+
761 => U761,
1021+
857 => U857,
1022+
953 => U953,
1023+
1013 => U1013,
1024+
1277 => U1277,
1025+
}
10141026
// ML-DSA sizes
10151027
impl_array_sizes! {
10161028
2420 => U2420,

0 commit comments

Comments
 (0)