diff --git a/plonky2/src/plonk/config.rs b/plonky2/src/plonk/config.rs index 36d29cff..cacc8421 100644 --- a/plonky2/src/plonk/config.rs +++ b/plonky2/src/plonk/config.rs @@ -53,7 +53,7 @@ pub trait Hasher: Sized + Clone + Debug + Eq + PartialEq { /// Hash the slice if necessary to reduce its length to ~256 bits. If it already fits, this is a /// no-op. fn hash_or_noop(inputs: &[F]) -> Self::Hash { - if inputs.len() <= 4 { + if inputs.len() * 8 <= Self::HASH_SIZE { let mut inputs_bytes = vec![0u8; Self::HASH_SIZE]; for i in 0..inputs.len() { inputs_bytes[i * 8..(i + 1) * 8]