MCPcopy Create free account

hub / github.com/axiom-crypto/halo2-lib / functions

Functions889 in github.com/axiom-crypto/halo2-lib

↓ 343 callersMethodclone
(&self)
halo2-ecc/src/ecc/mod.rs:32
↓ 304 callersMethodmap
Map the word to other types
hashes/zkevm/src/util/word.rs:122
↓ 175 callersMethodlen
Returns the length of the byte array.
halo2-base/src/safe_types/bytes.rs:135
↓ 141 callersMethodvalue
Return values in little-endian.
halo2-base/src/safe_types/mod.rs:70
↓ 134 callersMethodinto_iter
(self)
halo2-ecc/src/fields/vector.rs:63
↓ 88 callersFunctionbase_test
Creates a [`BaseTester`]
halo2-base/src/utils/testing.rs:119
↓ 73 callersMethodgate
(&self)
halo2-ecc/src/fields/vector.rs:85
↓ 65 callersMethodexpr
(&self)
hashes/zkevm/src/util/expression.rs:185
↓ 63 callersMethodquery_advice
Query advice of WordLibs of columns advice
hashes/zkevm/src/util/word.rs:48
↓ 56 callersMethodexpr
(&self)
hashes/zkevm/src/keccak/vanilla/cell_manager.rs:69
↓ 55 callersFunctionexpr
(bits: &[Expression<F>])
hashes/zkevm/src/sha256/vanilla/util.rs:25
↓ 55 callersMethodk
Changes the number of rows in the circuit to 2<sup>k</sup>. By default it will also set lookup bits as large as possible, to `k - 1`.
halo2-base/src/utils/testing.rs:126
↓ 53 callersMethodget
Returns the [AssignedValue] of the cell at the given `offset` in the `advice` column of [Context] `offset`: the offset of the cell to be fetched `offs
halo2-base/src/lib.rs:291
↓ 43 callersMethodmain
Returns a mutable reference to the [Context] of a gate thread. Spawns a new thread for the given phase, if none exists. `phase`: The challenge phase (
halo2-base/src/gates/circuit/builder.rs:229
↓ 39 callersMethodsub_no_carry
( &self, ctx: &mut Context<F>, a: impl IntoIterator<Item = A>, b: impl IntoIte
halo2-ecc/src/fields/vector.rs:176
↓ 38 callersMethodload_witness
Assigns a witness value and returns the corresponding assigned cell. `witness`: the witness value to be assigned
halo2-base/src/lib.rs:447
↓ 38 callersMethodmul
If using `UnsafeFieldPoint`, make sure multiplication does not cause overflow.
halo2-ecc/src/fields/mod.rs:188
↓ 36 callersMethodrun_gate
Run a mock test by providing a closure that uses a `ctx` and `GateChip`. - `expect_satisfied`: flag for whether you expect the test to pass or fail. F
halo2-base/src/utils/testing.rs:159
↓ 35 callersMethodassign_witnesses
Assigns a region of witness cells in an iterator and returns a [Vec] of assigned cells. `witnesses`: Iterator that specifies the cells to be assigned
halo2-base/src/lib.rs:425
↓ 34 callersMethodcondition
( &mut self, condition: Expression<F>, constraint: impl FnOnce(&mut Self) -> R, )
hashes/zkevm/src/util/constraint_builder.rs:45
↓ 34 callersMethodmul_no_carry
( &self, ctx: &mut Context<F>, a: impl Into<CRTInteger<F>>, b: impl Into<CRTIn
halo2-ecc/src/fields/fp.rs:262
↓ 34 callersMethodrequire_equal
( &mut self, name: &'static str, lhs: Expression<F>, rhs: Expression<F>, )
hashes/zkevm/src/util/constraint_builder.rs:32
↓ 34 callersMethodrun
Run a mock test by providing a closure that uses a `ctx` and `RangeChip`. - `expect_satisfied`: flag for whether you expect the test to pass or fail.
halo2-base/src/utils/testing.rs:153
↓ 33 callersMethodstart_region
(&mut self)
hashes/zkevm/src/keccak/vanilla/cell_manager.rs:186
↓ 31 callersMethodlookup_bits
Sets the size of the lookup table used for range checks to [0, 2<sup>lookup_bits</sup>)
halo2-base/src/utils/testing.rs:133
↓ 30 callersMethodgate
(&self, selector: Expression<F>)
hashes/zkevm/src/util/constraint_builder.rs:78
↓ 29 callersMethodassign_region
Pushes multiple advice cells to the `advice` column of [Context] and enables them by enabling the corresponding selector specified in `gate_offset`.
halo2-base/src/lib.rs:325
↓ 29 callersMethodlast
Returns the [AssignedValue] of the last cell in the `advice` column of [Context] or [None] if `advice` is empty
halo2-base/src/lib.rs:279
↓ 27 callersMethodcreate_gate
Wrapper for [ConstraintSystem].create_gate(name, meta) creates a gate form [q * (a + b * c - out)]. `meta`: [ConstraintSystem] used for the gate
halo2-base/src/gates/flex_gate/mod.rs:79
↓ 27 callersFunctionexpr
(expressions: &[Expression<F>], r: F)
hashes/zkevm/src/keccak/vanilla/util.rs:196
↓ 24 callersMethodgate
Returns the inner [`FlexGateConfig`]
halo2-base/src/gates/circuit/mod.rs:98
↓ 24 callersMethodlookup_bits
Returns the number of bits represented in the lookup table [0,2^<sup>lookup_bits</sup>).
halo2-base/src/gates/range/mod.rs:112
↓ 23 callersMethodload_constant
Assigns a constant value and returns the corresponding assigned cell. `c`: the constant value to be assigned
halo2-base/src/lib.rs:457
↓ 22 callersMethodadd
Constrains and returns `a + b * 1 = out`. Defines a vertical gate of form | a | b | 1 | a + b | where (a + b) = out. `ctx`: [Context] to add the cons
halo2-base/src/gates/flex_gate/mod.rs:157
↓ 20 callersMethodadd_no_carry
signed overflow BigInt functions
halo2-ecc/src/fields/vector.rs:142
↓ 19 callersFunctionfe_to_biguint
Converts an immutable reference to an PrimeField element into a [BigUint] element. `fe`: immutable reference to PrimeField element to convert
halo2-base/src/utils/mod.rs:221
↓ 19 callersMethodscalar_mul_no_carry
( &self, ctx: &mut Context<F>, a: impl IntoIterator<Item = A>, c: i64, )
halo2-ecc/src/fields/vector.rs:199
↓ 19 callersMethodvalue
(&self)
halo2-ecc/src/bigint/mod.rs:262
↓ 17 callersMethodcarry_mod
( &self, ctx: &mut Context<F>, a: impl IntoIterator<Item = FpChip::UnsafeFieldPoint>,
halo2-ecc/src/fields/vector.rs:240
↓ 17 callersFunctionvalue
(bits: &[u8])
hashes/zkevm/src/keccak/vanilla/util.rs:228
↓ 16 callersMethodrange
(&self)
halo2-ecc/src/fields/fp.rs:159
↓ 15 callersMethodinner_product
Constrains and returns the inner product of `<a, b>`. If the first element of `b` is `Constant(F::ONE)`, then an optimization is performed to save 3 c
halo2-base/src/gates/flex_gate/mod.rs:993
↓ 15 callersMethodload_constant
( &self, ctx: &mut Context<F>, c: FieldExt, )
halo2-ecc/src/fields/vector.rs:130
↓ 15 callersMethodpow
exp is in little-endian # Assumptions `a` is nonzero field point
halo2-ecc/src/bn254/final_exp.rs:73
↓ 14 callersMethodand
Constrains and returns `a & b`, assumeing `a` and `b` are boolean. Defines a vertical gate of form | 0 | a | b | out |, where out = a * b. `ctx`: [Co
halo2-base/src/gates/flex_gate/mod.rs:554
↓ 14 callersMethodbench_builder
Runs keygen, real prover, and verifier by providing a closure that uses a `builder` and `RangeChip`. Must provide `init_input` for use during key gen
halo2-base/src/utils/testing.rs:198
↓ 14 callersMethodcalculate_params
Auto-calculates configuration parameters for the circuit and sets them. `k`: The number of in the circuit (i.e. numeber of rows = 2<sup>k</sup>) `min
halo2-base/src/gates/circuit/builder.rs:260
↓ 14 callersMethodrange_check
Checks and constrains that `a` lies in the range [0, 2<sup>range_bits</sup>). This is done by decomposing `a` into `num_limbs` limbs, where `num_limb
halo2-base/src/gates/range/mod.rs:563
↓ 13 callersMethodassert_is_const
Constrains that `a` is equal to `constant` value. `ctx`: [Context] to add the constraints to `a`: [QuantumCell] value `constant`: constant value to co
halo2-base/src/gates/flex_gate/mod.rs:333
↓ 13 callersFunctionec_double
we precompute lambda and constrain (2y) * lambda = 3 x^2 (mod p) then we compute x_3 = lambda^2 - 2 x (mod p) y_3 = lambda (x - x_3) - y (mod p) # Ass
halo2-ecc/src/ecc/mod.rs:302
↓ 13 callersMethodenforce_less_than
( &self, ctx: &mut Context<F>, a: impl IntoIterator<Item = FpChip::FieldPoint>, )
halo2-ecc/src/fields/vector.rs:264
↓ 13 callersMethodfield_chip
(&self)
halo2-ecc/src/ecc/mod.rs:825
↓ 13 callersMethodhi
The high 128 bits limb
hashes/zkevm/src/util/word.rs:93
↓ 13 callersMethodis_zero
( &self, ctx: &mut Context<F>, a: impl IntoIterator<Item = FpChip::FieldPoint>, )
halo2-ecc/src/fields/vector.rs:308
↓ 13 callersMethodlo
the low 128 bits limb
hashes/zkevm/src/util/word.rs:97
↓ 13 callersMethodrequire_zero
(&mut self, name: &'static str, constraint: Expression<F>)
hashes/zkevm/src/util/constraint_builder.rs:16
↓ 13 callersMethodsub
Constrains and returns `a + b * (-1) = out`. Defines a vertical gate of form | a - b | b | 1 | a |, where (a - b) = out. `ctx`: [Context] to add the
halo2-base/src/gates/flex_gate/mod.rs:183
↓ 13 callersMethoduse_k
Returns new with `k` set
halo2-base/src/gates/circuit/builder.rs:148
↓ 13 callersFunctionvalue
(bits: &[u8])
hashes/zkevm/src/sha256/vanilla/util.rs:35
↓ 12 callersMethodas_ref
(&self)
halo2-base/src/poseidon/hasher/mds.rs:42
↓ 12 callersMethoddivide_unsafe
Returns `a / b` without constraining `b` to be nonzero. Warning: undefined behavior when `b` is zero. `a, b` must be such that `quot * b - a` withou
halo2-ecc/src/fields/mod.rs:217
↓ 12 callersMethodfp_chip
(&self)
halo2-ecc/src/fields/fp2.rs:39
↓ 12 callersFunctiongen_proof
For testing use only: Helper function to generate a proof **without public instances** with real prover using SHPLONK KZG multi-open polynomical commi
halo2-base/src/utils/testing.rs:54
↓ 12 callersMethodidx_to_indicator
Constrains and returns a [Vec] `indicator` of length `len`, where `indicator[i] == 1 if i == idx otherwise 0`, if `idx >= len` then `indicator` is all
halo2-base/src/gates/flex_gate/mod.rs:663
↓ 12 callersMethodpermutation
Perform permutation on this state. ATTETION: inputs.len() needs to be fixed at compile time. Assume len <= inputs.len(). `inputs` is right padded. If
halo2-base/src/poseidon/hasher/state.rs:35
↓ 11 callersMethodassign_cell
Virtually assigns the `input` within the current [Context], with different handling depending on the [QuantumCell] variant.
halo2-base/src/lib.rs:246
↓ 11 callersMethodassign_region_last
Pushes multiple advice cells to the `advice` column of [Context] and enables them by enabling the corresponding selector specified in `gate_offset` an
halo2-base/src/lib.rs:360
↓ 11 callersMethodbreak_points
The break points of the circuit.
halo2-base/src/gates/circuit/builder.rs:181
↓ 11 callersFunctioncheck_proof
For testing only: Helper function to verify a proof (generated using [`gen_proof`]) without public instances using SHPLONK KZG multi-open polynomical
halo2-base/src/utils/testing.rs:92
↓ 11 callersFunctionec_add_unequal
Implements: Given P = (x_1, y_1) and Q = (x_2, y_2), ecc points over the field F_p assume x_1 != x_2 Find ec addition P + Q = (x_3, y_3) By solving: l
halo2-ecc/src/ecc/mod.rs:153
↓ 11 callersMethodload_zero
Assigns the 0 value to a new cell or returns a previously assigned zero cell from `zero_cell`.
halo2-base/src/lib.rs:472
↓ 11 callersMethodmul
Constrains and returns `0 + a * b = out`. Defines a vertical gate of form | 0 | a | b | a * b |, where (a * b) = out. `ctx`: [Context] to add the co
halo2-base/src/gates/flex_gate/mod.rs:245
↓ 11 callersMethodx
(&self)
halo2-ecc/src/ecc/mod.rs:51
↓ 10 callersMethodconjugate
( &self, ctx: &mut Context<F>, a: FieldVector<FpChip::FieldPoint>, )
halo2-ecc/src/fields/fp2.rs:43
↓ 10 callersMethodconstrain_equal
Creates an equality constraint between two `advice` cells. `a`: the first `advice` cell to be constrained equal `b`: the second `advice` cell to be co
halo2-base/src/lib.rs:310
↓ 10 callersFunctioncrt
returns (a-b, underflow), where underflow is nonzero iff a < b # Assumptions `a, b` are proper CRT representations of integers with the same number of
halo2-ecc/src/bigint/sub.rs:65
↓ 10 callersMethodexpect_satisfied
Specify whether you expect this test to pass or fail. Default: pass
halo2-base/src/utils/testing.rs:140
↓ 10 callersMethodload_private
Load affine point as private witness. Constrains witness to lie on curve. Does not allow (0, 0) point,
halo2-ecc/src/ecc/mod.rs:830
↓ 10 callersMethodload_private
( &self, ctx: &mut Context<F>, fe: FieldExt, )
halo2-ecc/src/fields/vector.rs:119
↓ 10 callersMethodquery_cell
(&mut self, meta: &mut ConstraintSystem<F>)
hashes/zkevm/src/keccak/vanilla/cell_manager.rs:111
↓ 10 callersMethodquery_cell_value
(&mut self)
hashes/zkevm/src/keccak/vanilla/cell_manager.rs:156
↓ 10 callersFunctionraw_assign_advice
( region: &mut Region<F>, column: Column<Advice>, offset: usize, value: Value<impl Into<Assign
halo2-base/src/utils/halo2.rs:20
↓ 9 callersFunctionec_sub_unequal
Implements: Given P = (x_1, y_1) and Q = (x_2, y_2), ecc points over the field F_p Find ecc subtraction P - Q = (x_3, y_3) -Q = (x_2, -y_2) lambda = -
halo2-ecc/src/ecc/mod.rs:219
↓ 9 callersFunctioninto_strict_point
( chip: &FC, ctx: &mut Context<F>, pt: EcPoint<F, FC::FieldPoint>, )
halo2-ecc/src/ecc/mod.rs:622
↓ 9 callersMethodis_less_than
Constrains whether `a` is in `[0, b)`, and returns 1 if `a` < `b`, otherwise 0. a: first [QuantumCell] to compare b: second [QuantumCell] to compare
halo2-base/src/gates/range/mod.rs:613
↓ 9 callersMethodload_private_unchecked
Does not constrain witness to lie on curve
halo2-ecc/src/ecc/mod.rs:844
↓ 9 callersMethodrange_chip
Creates a new [RangeChip] sharing the same [LookupAnyManager]s as `self`.
halo2-base/src/gates/circuit/builder.rs:312
↓ 9 callersMethodsqueeze
Consume buffer and perform permutation, then output second element of state.
halo2-base/src/poseidon/hasher/mod.rs:331
↓ 8 callersMethodas_ref
(&self)
halo2-ecc/src/bigint/mod.rs:185
↓ 8 callersMethodassign
Returns vector of `is_final`, `length`, `hash.lo`, `hash.hi` for assigned rows
hashes/zkevm/src/keccak/vanilla/mod.rs:819
↓ 8 callersMethodat_offset
(&self, meta: &mut ConstraintSystem<F>, offset: i32)
hashes/zkevm/src/keccak/vanilla/cell_manager.rs:47
↓ 8 callersMethodclear
Clear all consts.
halo2-base/src/poseidon/hasher/mod.rs:134
↓ 8 callersMethoddebug_prank
Debug helper function for writing negative tests. This will change the **witness** value in `ctx` corresponding to `self.offset`. This assumes that `c
halo2-base/src/lib.rs:156
↓ 8 callersMethodfrobenius_map
computes a ** (p ** power) only works for p = 3 (mod 4) and p = 1 (mod 6)
halo2-ecc/src/bn254/final_exp.rs:23
↓ 8 callersMethodinitialize_consts
Initialize necessary consts of hasher. Must be called before any computation.
halo2-base/src/poseidon/hasher/mod.rs:129
↓ 8 callersMethodis_zero
Constrains that a cell is equal to 0 and returns `1` if `a = 0`, otherwise `0`. Defines a vertical gate of form `| out | a | inv | 1 | 0 | a | out |
halo2-base/src/gates/flex_gate/mod.rs:788
↓ 8 callersMethodmul_add
Constrains and returns `a * b + c = out`. Defines a vertical gate of form | c | a | b | a * b + c |, where (a * b + c) = out. `ctx`: [Context] to ad
halo2-base/src/gates/flex_gate/mod.rs:264
↓ 8 callersMethodnum_to_bits
Constrains and returns little-endian bit vector representation of `a`. Assumes `range_bits >= number of bits in a`. `a`: [QuantumCell] of the value t
halo2-base/src/gates/flex_gate/mod.rs:1214
↓ 8 callersMethodrequire_boolean
(&mut self, name: &'static str, value: Expression<F>)
hashes/zkevm/src/util/constraint_builder.rs:41
↓ 8 callersMethodselect
Constrains and set self to a specific state if `selector` is true.
halo2-base/src/poseidon/hasher/state.rs:85
next →1–100 of 889, ranked by callers