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.
Utilities for testing

Traits

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 the bit_len (bit length) used.
Decomposes an immutable reference to a BigPrimeField element into number_of_limbs limbs of bit_len bits each and returns a Vec of BigPrimeField represented by those limbs.
Decomposes an immutable reference to a BigInt into num_limbs limbs of bit_len bits each and returns a Vec of BigPrimeField represented by those limbs.
Decomposes an immutable reference to a BigInt into num_limbs limbs of bit_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 of bit_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 of bit_len bits each and returns a Vec of u64 represented by those limbs.
Converts a BigPrimeField element into a BigInt element by sending fe in [0, F::modulus()) to
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.
Wraps the internal value of value in an Option. If the value is None, then the function returns None.

Trait Aliases