Module interpreter

Source

Constants§

LIMB_BITSIZE_LARGE
In FEC addition we use bigger limbs, of 75 bits, that are still nicely decomposable into smaller 15bit ones for range checking.
LIMB_BITSIZE_SMALL
Alias for LIMB_BITSIZE, used for convenience.
N_LIMBS_LARGE
N_LIMBS_SMALL
Alias for N_LIMBS, used for convenience.

Traits§

HybridSerHelpers

Functions§

bigint_to_biguint_f
Interprets bigint input as an element of a field modulo f_bi, converts it to [0,f_bi) range, and outptus a corresponding biguint representation.
build_selectors
Builds fixed selectors for serialization circuit.
combine_carry
Helper function for limb recombination for carry specifically. Each big carry limb is stored as 6 (not 5!) small elements. We accept 36 small limbs, and return 6 large ones.
combine_limbs_m_to_n
Helper function for limb recombination.
combine_small_to_large
Helper function for limb recombination.
constrain_multiplication
This constarins the multiplication part of the circuit.
deserialize_field_element
Deserialize a field element of the scalar field of Vesta or Pallas given as a sequence of 3 limbs of 88 bits. It will deserialize into limbs of 15 bits. Given a scalar field element of Vesta or Pallas, here the decomposition:
ff_modulus_highest_limb
Returns the highest limb of the foreign field modulus. Is used by the lookups.
fold_choice2
A convenience helper: given a list_len and n (arguments of choice2), it creates an array consisting of f(i,j) where i,j \in [0,list_len] such that i + j = n, and then sums all the elements in this array.
limb_decompose_biguint
Decompose biguint into N limbs of bit size B.
limb_decompose_ff
Decomposes a foreign field element into N limbs of bit size B.
multiplication_circuit
Multiplication sub-circuit of the serialization/bootstrap procedure. Takes challenge x_{log i} and coefficient c_prev_i as input, returns next coefficient c_i.
serialization_circuit
Full serialization circuit.