diff --git a/kimchi/src/linearization.rs b/kimchi/src/linearization.rs index ca75cb7f3d..4b9472e90b 100644 --- a/kimchi/src/linearization.rs +++ b/kimchi/src/linearization.rs @@ -10,15 +10,15 @@ use crate::circuits::lookup::{ constraints::LookupConfiguration, lookups::{LookupFeatures, LookupInfo, LookupPattern, LookupPatterns}, }; -use crate::circuits::polynomials::keccak; -use crate::circuits::polynomials::keccak::circuitgates::{KeccakRound, KeccakSponge}; use crate::circuits::polynomials::{ complete_add::CompleteAdd, endomul_scalar::EndomulScalar, endosclmul::EndosclMul, foreign_field_add::circuitgates::ForeignFieldAdd, foreign_field_mul::circuitgates::ForeignFieldMul, - generic, permutation, + generic, + keccak::circuitgates::{KeccakRound, KeccakSponge}, + permutation, poseidon::Poseidon, range_check::circuitgates::{RangeCheck0, RangeCheck1}, rot, @@ -164,9 +164,8 @@ pub fn constraints_expr( } { - let mut keccak_round_expr = || { - keccak::circuitgates::KeccakRound::combined_constraints(&powers_of_alpha, &mut cache) - }; + let mut keccak_round_expr = + || KeccakRound::combined_constraints(&powers_of_alpha, &mut cache); if let Some(feature_flags) = feature_flags { if feature_flags.keccak { expr += keccak_round_expr(); @@ -181,9 +180,8 @@ pub fn constraints_expr( } { - let mut keccak_sponge_expr = || { - keccak::circuitgates::KeccakSponge::combined_constraints(&powers_of_alpha, &mut cache) - }; + let mut keccak_sponge_expr = + || KeccakSponge::combined_constraints(&powers_of_alpha, &mut cache); if let Some(feature_flags) = feature_flags { if feature_flags.keccak { expr += keccak_sponge_expr(); diff --git a/kimchi/src/prover.rs b/kimchi/src/prover.rs index 38f03c81c5..3e03cfb32e 100644 --- a/kimchi/src/prover.rs +++ b/kimchi/src/prover.rs @@ -1407,6 +1407,24 @@ where non_hiding(num_chunks), )); } + if let Some(keccak_round_selector8) = + index.column_evaluations.keccak_round_selector8.as_ref() + { + polynomials.push(( + evaluations_form(keccak_round_selector8), + None, + non_hiding(num_chunks), + )); + } + if let Some(keccak_sponge_selector8) = + index.column_evaluations.keccak_sponge_selector8.as_ref() + { + polynomials.push(( + evaluations_form(keccak_sponge_selector8), + None, + non_hiding(num_chunks), + )); + } //~~ * optionally, the runtime table //~ 1. if using lookup: @@ -1493,6 +1511,22 @@ where non_hiding(1), )) } + /* + if let Some(keccak_round_lookup_selector) = lcs.lookup_selectors.keccak_round.as_ref() { + polynomials.push(( + evaluations_form(keccak_round_lookup_selector), + None, + non_hiding(1), + )) + } + if let Some(keccak_sponge_lookup_selector) = lcs.lookup_selectors.keccak_sponge.as_ref() + { + polynomials.push(( + evaluations_form(keccak_sponge_lookup_selector), + None, + non_hiding(1), + )) + }*/ } //~ 1. Create an aggregated evaluation proof for all of these polynomials at $\zeta$ and $\zeta\omega$ using $u$ and $v$. diff --git a/kimchi/src/verifier_index.rs b/kimchi/src/verifier_index.rs index 0b9982ce5a..bc915c7935 100644 --- a/kimchi/src/verifier_index.rs +++ b/kimchi/src/verifier_index.rs @@ -557,6 +557,14 @@ impl, const COLUMNS: usize> if let Some(ffmul) = ffmul { fq_sponge.absorb_g(&ffmul.unshifted); } + /* + if let Some(keccak_round) = keccak_round { + fq_sponge.absorb_g(&keccak_round.unshifted); + } + if let Some(keccak_sponge) = keccak_sponge { + fq_sponge.absorb_g(&keccak_sponge.unshifted); + } + */ } fq_sponge.digest_fq() }