Skip to content

Commit 61047cd

Browse files
authored
Add ArraySize impls for Classic McEliece (#66) (#220)
These missing constants appear as [number of bytes for the public key, secret key, and ciphertext. <https://docs.rs/crate/classic-mceliece-rust/3.1.0/source/src/api.rs>
1 parent bd89049 commit 61047cd

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

src/sizes.rs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1176,4 +1176,30 @@ mod extra_sizes {
11761176
8978 => U8978,
11771177
14421 => U14421,
11781178
}
1179+
1180+
// Classic McEliece sizes
1181+
pub type U6492 = uint!(0 0 1 1 1 0 1 0 1 0 0 1 1);
1182+
pub type U13608 = uint!(0 0 0 1 0 1 0 0 1 0 1 0 1 1);
1183+
pub type U13932 = uint!(0 0 1 1 0 1 1 0 0 1 1 0 1 1);
1184+
pub type U13948 = uint!(0 0 1 1 1 1 1 0 0 1 1 0 1 1);
1185+
pub type U14120 = uint!(0 0 0 1 0 1 0 0 1 1 1 0 1 1);
1186+
pub type U261120 = uint!(0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1);
1187+
pub type U524160 = uint!(0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1);
1188+
pub type U1044992 = uint!(0 0 0 0 0 0 0 0 0 1 0 0 1 1 1 1 1 1 1 1);
1189+
pub type U1047319 = uint!(1 1 1 0 1 0 0 0 1 1 0 1 1 1 1 1 1 1 1 1);
1190+
pub type U1357824 = uint!(0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 0 0 1 0 1);
1191+
1192+
impl_array_sizes! {
1193+
classic_mceliece,
1194+
6492 => U6492,
1195+
13608 => U13608,
1196+
13932 => U13932,
1197+
13948 => U13948,
1198+
14120 => U14120,
1199+
261120 => U261120,
1200+
524160 => U524160,
1201+
1044992 => U1044992,
1202+
1047319 => U1047319,
1203+
1357824 => U1357824,
1204+
}
11791205
}

0 commit comments

Comments
 (0)