Expand description
This module includes the AND gadget implementation and the witness creation code. Note that this module does not need any new gate type for the AND operation.
Re-exportsยง
use alloc::vec;๐use alloc::vec;๐use alloc::vec::Vec;๐use core::array;๐use super::generic::GenericGateSpec;๐use super::xor::init_xor;๐use super::xor::num_xors;๐use crate::circuits::gate::CircuitGate;๐use crate::circuits::gate::Connect;๐use crate::circuits::lookup;๐use crate::circuits::lookup::tables::GateLookupTable;๐use crate::circuits::lookup::tables::LookupTable;๐use crate::circuits::polynomial::COLUMNS;๐use crate::circuits::wires::Wire;๐use ark_ff::PrimeField;๐use num_bigint::BigUint;๐use o1_utils::BigUintFieldHelpers;๐use o1_utils::BigUintHelpers;๐use o1_utils::BitwiseOps;๐use o1_utils::FieldHelpers;๐use o1_utils::Two;๐
Functionsยง
- create_
and_ witness - Create a And for inputs as field elements starting at row 0 Input: first input, second input, and desired byte length Panics if the input is too large for the chosen number of bytes
- extend_
and_ witness - Extends an AND witness to the whole witness Input: first input, second input, and desired byte length Panics if the input is too large for the chosen number of bytes
- lookup_
table - Get the AND lookup table