fix: bug in Falcon secret key basis order (#305)

This commit is contained in:
Al-Kindi-0
2024-04-21 09:48:40 +02:00
committed by Bobbin Threadbare
parent 2a0ae70645
commit bb42388827
3 changed files with 8 additions and 7 deletions

View File

@@ -96,10 +96,10 @@ pub(crate) fn ntru_gen<R: Rng>(n: usize, rng: &mut R) -> [Polynomial<i16>; 4] {
ntru_solve(&f.map(|&i| i.into()), &g.map(|&i| i.into()))
{
return [
f,
g,
capital_f.map(|i| i.try_into().unwrap()),
-f,
capital_g.map(|i| i.try_into().unwrap()),
-capital_f.map(|i| i.try_into().unwrap()),
];
}
}