From 1ceb60379fa4ab62c961dfe8f44ff5b3d2c6cc51 Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Tue, 16 Mar 2021 09:47:23 +1300 Subject: [PATCH] poseidon: Clarify that R_F must be even --- src/primitives/poseidon.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/primitives/poseidon.rs b/src/primitives/poseidon.rs index ac5b5975..f2e04935 100644 --- a/src/primitives/poseidon.rs +++ b/src/primitives/poseidon.rs @@ -29,6 +29,8 @@ pub trait Spec { 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>( 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();