Skip to main content

HashPreimageAir

Struct HashPreimageAir 

Source
pub struct HashPreimageAir { /* private fields */ }
Expand description

AIR for proving knowledge of hash preimage

We prove: “I know secret_key such that hash(secret_key XOR event_hash) = pubkey_hash”

Trait Implementations§

Source§

impl Air for HashPreimageAir

Source§

type BaseField = BaseElement

Base field for the computation described by this AIR. STARK protocol for this computation may be executed in the base field, or in an extension of the base fields as specified by ProofOptions struct.
Source§

type PublicInputs = HashPreimagePublicInputs

A type defining shape of public inputs for the computation described by this protocol. This could be any type as long as it can be serialized into a sequence of field elements.
Source§

type GkrProof = ()

An GKR proof object. If not needed, set to ().
Source§

type GkrVerifier = ()

A verifier for verifying GKR proofs. If not needed, set to ().
Source§

fn new( trace_info: TraceInfo, pub_inputs: Self::PublicInputs, options: ProofOptions, ) -> Self

Returns new instance of AIR for this computation instantiated from the provided parameters, which have the following meaning: Read more
Source§

fn context(&self) -> &AirContext<Self::BaseField>

Returns context for this instance of the computation.
Source§

fn evaluate_transition<E: FieldElement + From<Self::BaseField>>( &self, frame: &EvaluationFrame<E>, _periodic_values: &[E], result: &mut [E], )

Evaluates transition constraints over the specified evaluation frame. Read more
Source§

fn get_assertions(&self) -> Vec<Assertion<Self::BaseField>>

Returns a set of assertions against a concrete execution trace of this computation.
Source§

fn evaluate_aux_transition<F, E>( &self, main_frame: &EvaluationFrame<F>, aux_frame: &EvaluationFrame<E>, periodic_values: &[F], aux_rand_elements: &AuxRandElements<E>, result: &mut [E], )
where F: FieldElement<BaseField = Self::BaseField>, E: FieldElement<BaseField = Self::BaseField> + ExtensionOf<F>,

Evaluates transition constraints over the specified evaluation frames for the main and auxiliary trace segment. Read more
Source§

fn get_aux_assertions<E>( &self, aux_rand_elements: &AuxRandElements<E>, ) -> Vec<Assertion<E>>
where E: FieldElement<BaseField = Self::BaseField>,

Returns a set of assertions placed against the auxiliary trace segment. Read more
Source§

fn get_gkr_proof_verifier<E>(&self) -> Self::GkrVerifier
where E: FieldElement<BaseField = Self::BaseField>,

Returns the GkrVerifier to be used to verify the GKR proof. Read more
Source§

fn get_aux_rand_elements<E, R>( &self, public_coin: &mut R, ) -> Result<Vec<E>, RandomCoinError>
where E: FieldElement<BaseField = Self::BaseField>, R: RandomCoin<BaseField = Self::BaseField>,

Returns a vector of field elements required for construction of the auxiliary trace segment (except the Lagrange kernel column, if any). Read more
Source§

fn get_lagrange_kernel_constraints<E>( &self, lagrange_composition_coefficients: LagrangeConstraintsCompositionCoefficients<E>, lagrange_kernel_rand_elements: &LagrangeKernelRandElements<E>, ) -> Option<LagrangeKernelConstraints<E>>
where E: FieldElement<BaseField = Self::BaseField>,

Returns a new LagrangeKernelConstraints if a Lagrange kernel auxiliary column is present in the trace, or None otherwise.
Source§

fn get_periodic_column_values(&self) -> Vec<Vec<Self::BaseField>>

Returns values for all periodic columns used in the computation. Read more
Source§

fn get_periodic_column_polys(&self) -> Vec<Vec<Self::BaseField>>

Returns polynomial for all periodic columns. Read more
Source§

fn get_transition_constraints<E>( &self, composition_coefficients: &[E], ) -> TransitionConstraints<E>
where E: FieldElement<BaseField = Self::BaseField>,

Groups transition constraints together by their degree. Read more
Source§

fn get_boundary_constraints<E>( &self, aux_rand_elements: Option<&AuxRandElements<E>>, composition_coefficients: &[E], ) -> BoundaryConstraints<E>
where E: FieldElement<BaseField = Self::BaseField>,

Convert assertions returned from get_assertions() and get_aux_assertions() methods into boundary constraints. Read more
Source§

fn options(&self) -> &ProofOptions

Returns options which specify STARK protocol parameters for an instance of the computation described by this AIR.
Source§

fn trace_info(&self) -> &TraceInfo

Returns info of the execution trace for an instance of the computation described by this AIR.
Source§

fn trace_length(&self) -> usize

Returns length of the execution trace for an instance of the computation described by this AIR.
Source§

fn trace_poly_degree(&self) -> usize

Returns degree of trace polynomials for an instance of the computation described by this AIR. Read more
Source§

fn trace_domain_generator(&self) -> Self::BaseField

Returns the generator of the trace domain for an instance of the computation described by this AIR. Read more
Source§

fn ce_blowup_factor(&self) -> usize

Returns constraint evaluation domain blowup factor for the computation described by this AIR. Read more
Source§

fn ce_domain_size(&self) -> usize

Returns size of the constraint evaluation domain. Read more
Source§

fn lde_blowup_factor(&self) -> usize

Returns low-degree extension domain blowup factor for the computation described by this AIR. This is guaranteed to be a power of two, and is always either equal to or greater than ce_blowup_factor.
Source§

fn lde_domain_size(&self) -> usize

Returns the size of the low-degree extension domain. Read more
Source§

fn lde_domain_generator(&self) -> Self::BaseField

Returns the generator of the low-degree extension domain for an instance of the computation described by this AIR. Read more
Source§

fn domain_offset(&self) -> Self::BaseField

Returns the offset by which the domain for low-degree extension is shifted in relation to the execution trace domain.
Source§

fn get_constraint_composition_coefficients<E, R>( &self, public_coin: &mut R, ) -> Result<ConstraintCompositionCoefficients<E>, RandomCoinError>
where E: FieldElement<BaseField = Self::BaseField>, R: RandomCoin<BaseField = Self::BaseField>,

Returns coefficients needed for random linear combination during construction of constraint composition polynomial.
Source§

fn get_deep_composition_coefficients<E, R>( &self, public_coin: &mut R, ) -> Result<DeepCompositionCoefficients<E>, RandomCoinError>
where E: FieldElement<BaseField = Self::BaseField>, R: RandomCoin<BaseField = Self::BaseField>,

Returns coefficients needed for random linear combinations during construction of DEEP composition polynomial.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more