From 05006deb44eac3f8dfb26cf7bbd158975c8e9b56 Mon Sep 17 00:00:00 2001 From: Linda Guiga <101227802+LindaGuiga@users.noreply.github.com> Date: Sat, 21 Oct 2023 07:51:26 -0400 Subject: [PATCH] Pad according to RATE rather than WIDTH (#1299) --- plonky2/src/plonk/config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plonky2/src/plonk/config.rs b/plonky2/src/plonk/config.rs index 04df1ba70c..2391ef6cef 100644 --- a/plonky2/src/plonk/config.rs +++ b/plonky2/src/plonk/config.rs @@ -43,7 +43,7 @@ pub trait Hasher: 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);