Expand description
Utility functions for converting between different types of field elements.
Modules§
- Module for reading parameters for Halo2 proving system from the file system.
- Helper functions for raw halo2 operations to unify slight differences in API for halo2-axiom and halo2-pse
Traits§
- Helper trait to convert to and from a BigPrimeField by converting a list of u64 digits
- Helper trait to represent a field element that can be converted into u64 limbs.
Functions§
- Converts an immutable reference to BigInt to a BigPrimeField.
- Converts an immutable reference to BigUint to a BigPrimeField.
- Returns the number of bits needed to represent the value of
x
. - Computes the value of an integer by passing as
input
a Vec of its limb values and thebit_len
(bit length) used. - Decomposes an immutable reference to a BigPrimeField element into
number_of_limbs
limbs ofbit_len
bits each and returns a Vec of BigPrimeField represented by those limbs. - Decomposes an immutable reference to a BigInt into
num_limbs
limbs ofbit_len
bits each and returns a Vec of BigPrimeField represented by those limbs. - Decomposes an immutable reference to a BigInt into
num_limbs
limbs ofbit_len
bits each and returns a Vec of BigPrimeField represented by those limbs wrapped in Value. - Decomposes an immutable reference to a BigUint into
num_limbs
limbs ofbit_len
bits each and returns a Vec of BigPrimeField represented by those limbs. - Decomposes an immutable reference to a ScalarField element into
number_of_limbs
limbs ofbit_len
bits each and returns a Vec of u64 represented by those limbs. - Converts an immutable reference to an PrimeField element into a BigUint element.
- Returns the ceiling of the base 2 logarithm of
x
. - Returns the modulus of BigPrimeField.
- Returns the BigPrimeField element of 2n.