diff --git a/src/gates/poseidon.rs b/src/gates/poseidon.rs index b7e3ff7b..279ffbbd 100644 --- a/src/gates/poseidon.rs +++ b/src/gates/poseidon.rs @@ -202,14 +202,14 @@ where // First set of full rounds. for r in 0..poseidon::HALF_N_FULL_ROUNDS { - >::constant_layer_field(&mut state, round_ctr); + >::constant_layer(&mut state, round_ctr); for i in 0..WIDTH { let sbox_in = vars.local_wires[Self::wire_full_sbox_0(r, i)]; constraints.push(state[i] - sbox_in); state[i] = sbox_in; } - >::sbox_layer_field(&mut state); - state = >::mds_layer_field(&state); + >::sbox_layer(&mut state); + state = >::mds_layer(&state); round_ctr += 1; } @@ -222,27 +222,25 @@ where state[0] = >::sbox_monomial(sbox_in); state[0] += F::from_canonical_u64(>::FAST_PARTIAL_ROUND_CONSTANTS[r]); - state = >::mds_partial_layer_fast_field(&state, r); + state = >::mds_partial_layer_fast(&state, r); } let sbox_in = vars.local_wires[Self::wire_partial_sbox(poseidon::N_PARTIAL_ROUNDS - 1)]; constraints.push(state[0] - sbox_in); state[0] = >::sbox_monomial(sbox_in); - state = >::mds_partial_layer_fast_field( - &state, - poseidon::N_PARTIAL_ROUNDS - 1, - ); + state = + >::mds_partial_layer_fast(&state, poseidon::N_PARTIAL_ROUNDS - 1); round_ctr += poseidon::N_PARTIAL_ROUNDS; // Second set of full rounds. for r in 0..poseidon::HALF_N_FULL_ROUNDS { - >::constant_layer_field(&mut state, round_ctr); + >::constant_layer(&mut state, round_ctr); for i in 0..WIDTH { let sbox_in = vars.local_wires[Self::wire_full_sbox_1(r, i)]; constraints.push(state[i] - sbox_in); state[i] = sbox_in; } - >::sbox_layer_field(&mut state); - state = >::mds_layer_field(&state); + >::sbox_layer(&mut state); + state = >::mds_layer(&state); round_ctr += 1; }