Crate shared_types

Crate shared_types 

Source

Re-exports§

pub use halo2curves;

Modules§

circuit_hash
Defines the CircuitHashType enum, which is used to specify the type of hash is used for the circuit description.
config
curves
pedersen
transcript
Types for modeling and interacting with a transcript sponge when applying the Fiat-Shamir transformation on a an interactive protocol.
utils

Macros§

perform_function_under_expected_configs
This function will run the given function only under the given configs! It does this by first reading the global config and checking whether that config matches the expected configs which are passed in, then
perform_function_under_prover_config
Similar function to perform_function_under_expected_configs, but only checks against an expected GKRCircuitProverConfig.
perform_function_under_verifier_config
Similar function to perform_function_under_expected_configs, but only checks against an expected GKRCircuitVerifierConfig.

Structs§

Bn256Point
Fq
This represents an element of $\mathbb{F}_q$ where
Fr
This represents an element of $\mathbb{F}_r$ where
Poseidon
Poseidon hasher that maintains state and inputs and yields single element output when desired

Traits§

Field
The primary finite field used within a GKR circuit, as well as within sumcheck. Note that the field’s size should be large enough such that depth(C) * deg(C) / |F| bits of computational soundness is considered secure, where depth(C) is the depth of the GKR circuit and deg(C) is the maximum degree of any layerwise polynomial relationship.
Group
This trait represents an element of a cryptographic group.
Halo2FFTFriendlyField
A field which is FFT-friendly under Halo2’s EvaluationDomain-based algorithm. [WithSmallOrderMulGroup] – see associated trait documentation for more details. Our use-case is specifically for Halo2’s FFT implementation, which uses Halo2’s EvaluationDomain to compute extended evaluations of a power-of-two degree polynomial.
HasByteRepresentation
Simple trait which allows us to convert to and from a little-endian byte representation.
IntoVecF
Simple trait which allows for ease of converting e.g. a Vec<u64> into a Vec<F>.
Zeroizable
A trait which allows zeroizing of Field elements.
ff_field
This trait represents an element of a field.

Type Aliases§

Base
Scalar