fawkes_crypto_phase2::keypair_assembly

Struct KeypairAssembly

Source
pub struct KeypairAssembly<E: Engine> {
    pub num_inputs: usize,
    pub num_aux: usize,
    pub num_constraints: usize,
    pub at_inputs: Vec<Vec<(E::Fr, usize)>>,
    pub bt_inputs: Vec<Vec<(E::Fr, usize)>>,
    pub ct_inputs: Vec<Vec<(E::Fr, usize)>>,
    pub at_aux: Vec<Vec<(E::Fr, usize)>>,
    pub bt_aux: Vec<Vec<(E::Fr, usize)>>,
    pub ct_aux: Vec<Vec<(E::Fr, usize)>>,
}
Expand description

This is our assembly structure that we’ll use to synthesize the circuit into a QAP.

Fields§

§num_inputs: usize§num_aux: usize§num_constraints: usize§at_inputs: Vec<Vec<(E::Fr, usize)>>§bt_inputs: Vec<Vec<(E::Fr, usize)>>§ct_inputs: Vec<Vec<(E::Fr, usize)>>§at_aux: Vec<Vec<(E::Fr, usize)>>§bt_aux: Vec<Vec<(E::Fr, usize)>>§ct_aux: Vec<Vec<(E::Fr, usize)>>

Trait Implementations§

Source§

impl<E: Engine> ConstraintSystem<E> for KeypairAssembly<E>

Source§

type Root = KeypairAssembly<E>

Represents the type of the “root” of this constraint system so that nested namespaces can minimize indirection.
Source§

fn alloc<F, A, AR>(&mut self, _: A, _: F) -> Result<Variable, SynthesisError>
where F: FnOnce() -> Result<E::Fr, SynthesisError>, A: FnOnce() -> AR, AR: Into<String>,

Allocate a private variable in the constraint system. The provided function is used to determine the assignment of the variable. The given annotation function is invoked in testing contexts in order to derive a unique name for this variable in the current namespace.
Source§

fn alloc_input<F, A, AR>( &mut self, _: A, _: F, ) -> Result<Variable, SynthesisError>
where F: FnOnce() -> Result<E::Fr, SynthesisError>, A: FnOnce() -> AR, AR: Into<String>,

Allocate a public variable in the constraint system. The provided function is used to determine the assignment of the variable.
Source§

fn enforce<A, AR, LA, LB, LC>(&mut self, _: A, a: LA, b: LB, c: LC)

Enforce that A * B = C. The annotation function is invoked in testing contexts in order to derive a unique name for the constraint in the current namespace.
Source§

fn push_namespace<NR, N>(&mut self, _: N)
where NR: Into<String>, N: FnOnce() -> NR,

Create a new (sub)namespace and enter into it. Not intended for downstream use; use namespace instead.
Source§

fn pop_namespace(&mut self)

Exit out of the existing namespace. Not intended for downstream use; use namespace instead.
Source§

fn get_root(&mut self) -> &mut Self::Root

Gets the “root” constraint system, bypassing the namespacing. Not intended for downstream use; use namespace instead.
Source§

fn one() -> Variable

Return the “one” input variable
Source§

fn namespace<'a, NR, N>( &'a mut self, name_fn: N, ) -> Namespace<'a, E, Self::Root>
where NR: Into<String>, N: FnOnce() -> NR,

Begin a namespace for this constraint system.

Auto Trait Implementations§

§

impl<E> Freeze for KeypairAssembly<E>

§

impl<E> RefUnwindSafe for KeypairAssembly<E>
where <E as ScalarEngine>::Fr: RefUnwindSafe,

§

impl<E> Send for KeypairAssembly<E>

§

impl<E> Sync for KeypairAssembly<E>

§

impl<E> Unpin for KeypairAssembly<E>
where <E as ScalarEngine>::Fr: Unpin,

§

impl<E> UnwindSafe for KeypairAssembly<E>
where <E as ScalarEngine>::Fr: UnwindSafe,

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, 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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.