poseidon: Clarify that R_F must be even

This commit is contained in:
Jack Grigg 2021-03-16 09:47:23 +13:00
parent 4c3e20535d
commit 1ceb60379f
1 changed files with 2 additions and 1 deletions

View File

@ -29,6 +29,8 @@ pub trait Spec<F: FieldExt> {
fn width() -> usize;
/// The number of full rounds for this specification.
///
/// This must be an even number.
fn full_rounds() -> usize;
/// The number of partial rounds for this specification.
@ -99,7 +101,6 @@ fn permute<F: FieldExt, S: Spec<F>>(
mds: &[S::State],
round_constants: &[S::State],
) {
// TODO: Check what should happen for odd number of full rounds.
let r_f = S::full_rounds() / 2;
let r_p = S::partial_rounds();