Skip to content

Commit

Permalink
Pad according to RATE rather than WIDTH (#1299)
Browse files Browse the repository at this point in the history
  • Loading branch information
LindaGuiga authored Oct 21, 2023
1 parent 49976ea commit 05006de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plonky2/src/plonk/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub trait Hasher<F: RichField>: Sized + Copy + Debug + Eq + PartialEq {
fn hash_pad(input: &[F]) -> Self::Hash {
let mut padded_input = input.to_vec();
padded_input.push(F::ONE);
while (padded_input.len() + 1) % Self::Permutation::WIDTH != 0 {
while (padded_input.len() + 1) % Self::Permutation::RATE != 0 {
padded_input.push(F::ZERO);
}
padded_input.push(F::ONE);
Expand Down

0 comments on commit 05006de

Please sign in to comment.