diff --git a/kimchi/src/circuits/polynomials/keccak/witness.rs b/kimchi/src/circuits/polynomials/keccak/witness.rs index 59212d411a..b8c9ca6d74 100644 --- a/kimchi/src/circuits/polynomials/keccak/witness.rs +++ b/kimchi/src/circuits/polynomials/keccak/witness.rs @@ -1,53 +1,45 @@ //! Foreign field multiplication witness computation -use crate::{ - auto_clone_array, - circuits::{ - polynomial::COLUMNS, - polynomials::{foreign_field_add, range_check}, - witness::{self, ConstantCell, VariableBitsCell, VariableCell, Variables, WitnessCell}, - }, - variable_map, -}; +use crate::circuits::witness::{IndexCell, WitnessCell}; use ark_ff::PrimeField; -use num_bigint::BigUint; -use num_integer::Integer; -use num_traits::One; -use o1_utils::foreign_field::{ - BigUintArrayFieldHelpers, BigUintForeignFieldHelpers, FieldArrayBigUintHelpers, - ForeignFieldHelpers, -}; -use std::{array, ops::Div}; +use super::KECCAK_COLS; -use super::circuitgates; +type _Layout = Vec>>>; -const ROUND_COLS: usize = 2344; -const SPONGE_COLS: usize = 312; -/* -fn create_layout_round() -> [[Box>; ROUND_COLS]; 1] { - [ArrayCell::create("state_a") - ArrayCell::create("state_c") - ArrayCell::create("reset_c") - ArrayCell::create("dense_c") - ArrayCell::create("quotient_c") - ArrayCell::create("remainder_c") - ArrayCell::create("bound_c") - ArrayCell::create("dense_rot_c") - ArrayCell::create("expand_rot_c") - ArrayCell::create("state_d") - ArrayCell::create("state_e") - ArrayCell::create("reset_e") - ArrayCell::create("dense_e") - ArrayCell::create("quotient_e") - ArrayCell::create("remainder_e") - ArrayCell::create("bound_e") - ArrayCell::create("dense_rot_e") - ArrayCell::create("expand_rot_e") - ArrayCell::create("state_b") - ArrayCell::create("reset_b") - ArrayCell::create("reset_sum") - ArrayCell::create("f00") +fn _layout_round() -> _Layout { + vec![ + IndexCell::create("state_a", 0, 100), + IndexCell::create("state_c", 100, 120), + IndexCell::create("shifts_c", 120, 200), + IndexCell::create("dense_c", 200, 220), + IndexCell::create("quotient_c", 220, 240), + IndexCell::create("remainder_c", 240, 260), + IndexCell::create("bound_c", 260, 280), + IndexCell::create("dense_rot_c", 280, 300), + IndexCell::create("expand_rot_c", 300, 320), + IndexCell::create("state_d", 320, 340), + IndexCell::create("state_e", 340, 440), + IndexCell::create("shifts_e", 440, 840), + IndexCell::create("dense_e", 840, 940), + IndexCell::create("quotient_e", 940, 1040), + IndexCell::create("remainder_e", 1040, 1140), + IndexCell::create("bound_e", 1140, 1240), + IndexCell::create("dense_rot_e", 1240, 1340), + IndexCell::create("expand_rot_e", 1340, 1440), + IndexCell::create("state_b", 1440, 1540), + IndexCell::create("shifts_b", 1540, 1940), + IndexCell::create("shifts_sum", 1940, 2340), + IndexCell::create("f00", 2340, 2344), + ] +} + +fn _layout_sponge() -> _Layout { + vec![ + IndexCell::create("old_state", 0, 100), + IndexCell::create("new_state", 100, 200), + IndexCell::create("dense", 200, 300), + IndexCell::create("bytes", 300, 500), + IndexCell::create("shifts", 500, 900), ] } -*/