Skip to content

Commit

Permalink
poseidon: Clarify that R_F must be even
Browse files Browse the repository at this point in the history
  • Loading branch information
str4d committed Mar 15, 2021
1 parent 61c081e commit ccbe17e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/primitives/poseidon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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();

Expand Down

0 comments on commit ccbe17e

Please sign in to comment.