Struct ocelot::edabits::FComProver

source ·
pub struct FComProver<FE: FiniteField> { /* private fields */ }
Expand description

F_com protocol for the Prover

Implementations§

source§

impl<FE: FiniteField> FComProver<FE>

source

pub fn init<C: AbstractChannel, RNG: CryptoRng + Rng>( channel: &mut C, rng: &mut RNG, lpn_setup: LpnParams, lpn_extend: LpnParams ) -> Result<Self, Error>

Initialize the functionality.

source

pub fn duplicate<C: AbstractChannel, RNG: CryptoRng + Rng>( &mut self, channel: &mut C, rng: &mut RNG ) -> Result<Self, Error>

Duplicate the functionality.

source

pub fn random<C: AbstractChannel, RNG: CryptoRng + Rng>( &mut self, channel: &mut C, rng: &mut RNG ) -> Result<MacProver<FE>, Error>

Returns a random mac.

source

pub fn input<C: AbstractChannel, RNG: CryptoRng + Rng>( &mut self, channel: &mut C, rng: &mut RNG, x: &[FE::PrimeField] ) -> Result<Vec<FE>, Error>

Input a slice of values and returns a vector of its macs.

source

pub fn input_low_level<C: AbstractChannel, RNG: CryptoRng + Rng>( &mut self, channel: &mut C, rng: &mut RNG, x: &[FE::PrimeField], out: &mut Vec<FE> ) -> Result<(), Error>

lower level implementation of input with pre-defined out vector.

source

pub fn input1<C: AbstractChannel, RNG: CryptoRng + Rng>( &mut self, channel: &mut C, rng: &mut RNG, x: FE::PrimeField ) -> Result<FE, Error>

Input a single value and returns its mac.

source

pub fn affine_add_cst( &self, cst: FE::PrimeField, x: MacProver<FE> ) -> MacProver<FE>

Add a constant to a Mac.

source

pub fn affine_mult_cst( &self, cst: FE::PrimeField, x: MacProver<FE> ) -> MacProver<FE>

Multiply by a constant a Mac.

source

pub fn add(&self, a: MacProver<FE>, b: MacProver<FE>) -> MacProver<FE>

Add two Macs.

source

pub fn neg(&self, a: MacProver<FE>) -> MacProver<FE>

Negative Mac.

source

pub fn sub(&self, a: MacProver<FE>, b: MacProver<FE>) -> MacProver<FE>

Subtraction of two Macs.

source

pub fn check_zero<C: AbstractChannel>( &mut self, channel: &mut C, x_mac_batch: &[MacProver<FE>] ) -> Result<(), Error>

Check that a batch of Macs are zero.

source

pub fn open<C: AbstractChannel>( &mut self, channel: &mut C, batch: &[MacProver<FE>] ) -> Result<(), Error>

Open Macs.

source

pub fn quicksilver_check_multiply<C: AbstractChannel, RNG: CryptoRng + Rng>( &mut self, channel: &mut C, rng: &mut RNG, triples: &[(MacProver<FE>, MacProver<FE>, MacProver<FE>)] ) -> Result<(), Error>

Quicksilver multiplication check.

source

pub fn wolverine_check_multiply<C: AbstractChannel>( &mut self, channel: &mut C, triples: &[(MacProver<FE>, MacProver<FE>, MacProver<FE>)], aux: &[(MacProver<FE>, MacProver<FE>, MacProver<FE>)] ) -> Result<(), Error>

Wolverine multiplication check.

Auto Trait Implementations§

§

impl<FE> Freeze for FComProver<FE>
where <<<<FE as FiniteField>::PrimeField as IsSubFieldOf<FE>>::DegreeModulo as AnyArrayLength>::OutputArrayLength<FE> as ArrayLength<FE>>::ArrayType: Freeze,

§

impl<FE> RefUnwindSafe for FComProver<FE>
where FE: RefUnwindSafe, <<<<FE as FiniteField>::PrimeField as IsSubFieldOf<FE>>::DegreeModulo as AnyArrayLength>::OutputArrayLength<FE> as ArrayLength<FE>>::ArrayType: RefUnwindSafe, <FE as FiniteField>::PrimeField: RefUnwindSafe,

§

impl<FE> Send for FComProver<FE>

§

impl<FE> Sync for FComProver<FE>

§

impl<FE> Unpin for FComProver<FE>
where FE: Unpin, <<<<FE as FiniteField>::PrimeField as IsSubFieldOf<FE>>::DegreeModulo as AnyArrayLength>::OutputArrayLength<FE> as ArrayLength<FE>>::ArrayType: Unpin, <FE as FiniteField>::PrimeField: Unpin,

§

impl<FE> UnwindSafe for FComProver<FE>
where FE: UnwindSafe, <<<<FE as FiniteField>::PrimeField as IsSubFieldOf<FE>>::DegreeModulo as AnyArrayLength>::OutputArrayLength<FE> as ArrayLength<FE>>::ArrayType: UnwindSafe, <FE as FiniteField>::PrimeField: 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> Same for T

§

type Output = T

Should always be Self
source§

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

§

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>,

§

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.
§

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

§

fn vzip(self) -> V