Struct AuthenticatedScalarResult

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

A maliciously secure wrapper around an MpcScalarResult, includes a MAC as per the SPDZ protocol: https://eprint.iacr.org/2011/535.pdf that ensures security against a malicious adversary

Implementations§

Source§

impl AuthenticatedScalarResult

Source

pub fn new_shared(value: ScalarResult) -> Self

Create a new result from the given shared value

Source

pub fn new_shared_batch(values: &[ScalarResult]) -> Vec<Self>

Create a new batch of shared values

Source

pub fn new_shared_from_batch_result( values: BatchScalarResult, n: usize, ) -> Vec<AuthenticatedScalarResult>

Create a nwe shared batch of values from a batch network result

The batch result combines the batch into one result, so it must be split out first before creating the AuthenticatedScalarResults

Source

pub fn share(&self) -> ScalarResult

Get the raw share as a ScalarResult

Source

pub fn fabric(&self) -> &MpcFabric

Get a reference to the underlying MPC fabric

Source

pub fn ids(&self) -> Vec<ResultId>

Get the ids of the results that must be awaited before the value is ready

Source

pub fn open(&self) -> ScalarResult

Open the value without checking its MAC

Source

pub fn open_batch(values: &[Self]) -> Vec<ScalarResult>

Open a batch of values without checking their MACs

Source

pub fn from_flattened_iterator<I>(iter: I) -> Vec<Self>
where I: Iterator<Item = ResultHandle<Scalar>>,

Convert a flattened iterator into a batch of AuthenticatedScalarResults

We assume that the iterator has been flattened in the same way order that Self::ids returns the AuthenticatedScalar’s values: [share, mac, public_modifier]

Source

pub fn verify_mac_check( my_mac_share: Scalar, peer_mac_share: Scalar, peer_mac_commitment: StarkPoint, peer_commitment_blinder: Scalar, ) -> bool

Check the commitment to a MAC check and that the MAC checks sum to zero

Source

pub fn open_authenticated(&self) -> AuthenticatedScalarOpenResult

Open the value and check its MAC

This follows the protocol detailed in: https://securecomputation.org/docs/pragmaticmpc.pdf Section 6.6.2

Source

pub fn open_authenticated_batch( values: &[Self], ) -> Vec<AuthenticatedScalarOpenResult>

Open a batch of values and check their MACs

Source§

impl AuthenticatedScalarResult

Source

pub fn batch_add( a: &[AuthenticatedScalarResult], b: &[AuthenticatedScalarResult], ) -> Vec<AuthenticatedScalarResult>

Add two batches of AuthenticatedScalarResults

Source

pub fn batch_add_public( a: &[AuthenticatedScalarResult], b: &[ScalarResult], ) -> Vec<AuthenticatedScalarResult>

Add a batch of AuthenticatedScalarResults to a batch of ScalarResults

Source§

impl AuthenticatedScalarResult

Source

pub fn batch_sub( a: &[AuthenticatedScalarResult], b: &[AuthenticatedScalarResult], ) -> Vec<AuthenticatedScalarResult>

Add two batches of AuthenticatedScalarResults

Source

pub fn batch_sub_public( a: &[AuthenticatedScalarResult], b: &[ScalarResult], ) -> Vec<AuthenticatedScalarResult>

Subtract a batch of ScalarResults from a batch of AuthenticatedScalarResults

Source§

impl AuthenticatedScalarResult

Source

pub fn batch_neg( a: &[AuthenticatedScalarResult], ) -> Vec<AuthenticatedScalarResult>

Negate a batch of AuthenticatedScalarResults

Source§

impl AuthenticatedScalarResult

Source

pub fn batch_mul( a: &[AuthenticatedScalarResult], b: &[AuthenticatedScalarResult], ) -> Vec<AuthenticatedScalarResult>

Multiply a batch of values using the Beaver trick

Source

pub fn batch_mul_public( a: &[AuthenticatedScalarResult], b: &[ScalarResult], ) -> Vec<AuthenticatedScalarResult>

Multiply a batch of AuthenticatedScalarResults by a batch of ScalarResults

Trait Implementations§

Source§

impl Add<&AuthenticatedScalarResult> for &AuthenticatedScalarResult

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &AuthenticatedScalarResult) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a> Add<&'a AuthenticatedScalarResult> for &'a ScalarResult

lhs borrowed, rhs borrowed

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &'a AuthenticatedScalarResult) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a> Add<&'a AuthenticatedScalarResult> for &'a Scalar

lhs borrowed, rhs borrowed

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &'a AuthenticatedScalarResult) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a> Add<&'a AuthenticatedScalarResult> for AuthenticatedScalarResult

lhs owned, rhs borrowed

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &'a AuthenticatedScalarResult) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a> Add<&'a AuthenticatedScalarResult> for ScalarResult

lhs owned, rhs borrowed

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &'a AuthenticatedScalarResult) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a> Add<&'a AuthenticatedScalarResult> for Scalar

lhs owned, rhs borrowed

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &'a AuthenticatedScalarResult) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<&ResultHandle<Scalar>> for &AuthenticatedScalarResult

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &ScalarResult) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a> Add<&'a ResultHandle<Scalar>> for AuthenticatedScalarResult

lhs owned, rhs borrowed

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &'a ScalarResult) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<&Scalar> for &AuthenticatedScalarResult

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Scalar) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a> Add<&'a Scalar> for AuthenticatedScalarResult

lhs owned, rhs borrowed

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &'a Scalar) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a> Add<AuthenticatedScalarResult> for &'a AuthenticatedScalarResult

lhs borrowed, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the + operator.
Source§

fn add(self, rhs: AuthenticatedScalarResult) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a> Add<AuthenticatedScalarResult> for &'a ScalarResult

lhs borrowed, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the + operator.
Source§

fn add(self, rhs: AuthenticatedScalarResult) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a> Add<AuthenticatedScalarResult> for &'a Scalar

lhs borrowed, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the + operator.
Source§

fn add(self, rhs: AuthenticatedScalarResult) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<AuthenticatedScalarResult> for ScalarResult

lhs owned, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the + operator.
Source§

fn add(self, rhs: AuthenticatedScalarResult) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<AuthenticatedScalarResult> for Scalar

lhs owned, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the + operator.
Source§

fn add(self, rhs: AuthenticatedScalarResult) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a> Add<ResultHandle<Scalar>> for &'a AuthenticatedScalarResult

lhs borrowed, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the + operator.
Source§

fn add(self, rhs: ScalarResult) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<ResultHandle<Scalar>> for AuthenticatedScalarResult

lhs owned, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the + operator.
Source§

fn add(self, rhs: ScalarResult) -> Self::Output

Performs the + operation. Read more
Source§

impl<'a> Add<Scalar> for &'a AuthenticatedScalarResult

lhs borrowed, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Scalar) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<Scalar> for AuthenticatedScalarResult

lhs owned, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Scalar) -> Self::Output

Performs the + operation. Read more
Source§

impl Add for AuthenticatedScalarResult

lhs owned, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the + operator.
Source§

fn add(self, rhs: AuthenticatedScalarResult) -> Self::Output

Performs the + operation. Read more
Source§

impl Clone for AuthenticatedScalarResult

Source§

fn clone(&self) -> AuthenticatedScalarResult

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AuthenticatedScalarResult

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Mul<&AuthenticatedScalarResult> for &AuthenticatedScalarResult

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &AuthenticatedScalarResult) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&AuthenticatedScalarResult> for &AuthenticatedStarkPointResult

Source§

type Output = AuthenticatedStarkPointResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &AuthenticatedScalarResult) -> AuthenticatedStarkPointResult

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a AuthenticatedScalarResult> for &'a ScalarResult

lhs borrowed, rhs borrowed

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a AuthenticatedScalarResult) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&AuthenticatedScalarResult> for &StarkPointResult

Source§

type Output = AuthenticatedStarkPointResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &AuthenticatedScalarResult) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a AuthenticatedScalarResult> for &'a Scalar

lhs borrowed, rhs borrowed

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a AuthenticatedScalarResult) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&AuthenticatedScalarResult> for &StarkPoint

Source§

type Output = AuthenticatedStarkPointResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &AuthenticatedScalarResult) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a AuthenticatedScalarResult> for AuthenticatedScalarResult

lhs owned, rhs borrowed

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a AuthenticatedScalarResult) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a AuthenticatedScalarResult> for AuthenticatedStarkPointResult

lhs owned, rhs borrowed

Source§

type Output = AuthenticatedStarkPointResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a AuthenticatedScalarResult) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a AuthenticatedScalarResult> for ScalarResult

lhs owned, rhs borrowed

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a AuthenticatedScalarResult) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a AuthenticatedScalarResult> for StarkPointResult

lhs owned, rhs borrowed

Source§

type Output = AuthenticatedStarkPointResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a AuthenticatedScalarResult) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a AuthenticatedScalarResult> for Scalar

lhs owned, rhs borrowed

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a AuthenticatedScalarResult) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a AuthenticatedStarkPointResult> for &'a AuthenticatedScalarResult

lhs borrowed, rhs borrowed

Source§

type Output = AuthenticatedStarkPointResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a AuthenticatedStarkPointResult) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a AuthenticatedStarkPointResult> for AuthenticatedScalarResult

lhs owned, rhs borrowed

Source§

type Output = AuthenticatedStarkPointResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a AuthenticatedStarkPointResult) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&ResultHandle<Scalar>> for &AuthenticatedScalarResult

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &ScalarResult) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a ResultHandle<Scalar>> for AuthenticatedScalarResult

lhs owned, rhs borrowed

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a ScalarResult) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a ResultHandle<StarkPoint>> for &'a AuthenticatedScalarResult

lhs borrowed, rhs borrowed

Source§

type Output = AuthenticatedStarkPointResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a StarkPointResult) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a ResultHandle<StarkPoint>> for AuthenticatedScalarResult

lhs owned, rhs borrowed

Source§

type Output = AuthenticatedStarkPointResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a StarkPointResult) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<&Scalar> for &AuthenticatedScalarResult

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Scalar) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a Scalar> for AuthenticatedScalarResult

lhs owned, rhs borrowed

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a Scalar) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a StarkPoint> for &'a AuthenticatedScalarResult

lhs borrowed, rhs borrowed

Source§

type Output = AuthenticatedStarkPointResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a StarkPoint) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<&'a StarkPoint> for AuthenticatedScalarResult

lhs owned, rhs borrowed

Source§

type Output = AuthenticatedStarkPointResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'a StarkPoint) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<AuthenticatedScalarResult> for &'a AuthenticatedScalarResult

lhs borrowed, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: AuthenticatedScalarResult) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<AuthenticatedScalarResult> for &'a AuthenticatedStarkPointResult

lhs borrowed, rhs owned

Source§

type Output = AuthenticatedStarkPointResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: AuthenticatedScalarResult) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<AuthenticatedScalarResult> for &'a ScalarResult

lhs borrowed, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: AuthenticatedScalarResult) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<AuthenticatedScalarResult> for &'a StarkPointResult

lhs borrowed, rhs owned

Source§

type Output = AuthenticatedStarkPointResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: AuthenticatedScalarResult) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<AuthenticatedScalarResult> for &'a Scalar

lhs borrowed, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: AuthenticatedScalarResult) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<AuthenticatedScalarResult> for AuthenticatedStarkPointResult

lhs owned, rhs owned

Source§

type Output = AuthenticatedStarkPointResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: AuthenticatedScalarResult) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<AuthenticatedScalarResult> for ScalarResult

lhs owned, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: AuthenticatedScalarResult) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<AuthenticatedScalarResult> for StarkPointResult

lhs owned, rhs owned

Source§

type Output = AuthenticatedStarkPointResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: AuthenticatedScalarResult) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<AuthenticatedScalarResult> for Scalar

lhs owned, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: AuthenticatedScalarResult) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<AuthenticatedStarkPointResult> for &'a AuthenticatedScalarResult

lhs borrowed, rhs owned

Source§

type Output = AuthenticatedStarkPointResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: AuthenticatedStarkPointResult) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<AuthenticatedStarkPointResult> for AuthenticatedScalarResult

lhs owned, rhs owned

Source§

type Output = AuthenticatedStarkPointResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: AuthenticatedStarkPointResult) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<ResultHandle<Scalar>> for &'a AuthenticatedScalarResult

lhs borrowed, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: ScalarResult) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<ResultHandle<Scalar>> for AuthenticatedScalarResult

lhs owned, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: ScalarResult) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<ResultHandle<StarkPoint>> for &'a AuthenticatedScalarResult

lhs borrowed, rhs owned

Source§

type Output = AuthenticatedStarkPointResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: StarkPointResult) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<ResultHandle<StarkPoint>> for AuthenticatedScalarResult

lhs owned, rhs owned

Source§

type Output = AuthenticatedStarkPointResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: StarkPointResult) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<Scalar> for &'a AuthenticatedScalarResult

lhs borrowed, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Scalar) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<Scalar> for AuthenticatedScalarResult

lhs owned, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Scalar) -> Self::Output

Performs the * operation. Read more
Source§

impl<'a> Mul<StarkPoint> for &'a AuthenticatedScalarResult

lhs borrowed, rhs owned

Source§

type Output = AuthenticatedStarkPointResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: StarkPoint) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul<StarkPoint> for AuthenticatedScalarResult

lhs owned, rhs owned

Source§

type Output = AuthenticatedStarkPointResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: StarkPoint) -> Self::Output

Performs the * operation. Read more
Source§

impl Mul for AuthenticatedScalarResult

lhs owned, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: AuthenticatedScalarResult) -> Self::Output

Performs the * operation. Read more
Source§

impl Neg for &AuthenticatedScalarResult

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl Neg for AuthenticatedScalarResult

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl Sub<&AuthenticatedScalarResult> for &AuthenticatedScalarResult

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &AuthenticatedScalarResult) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<&AuthenticatedScalarResult> for &ScalarResult

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &AuthenticatedScalarResult) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<&AuthenticatedScalarResult> for &Scalar

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &AuthenticatedScalarResult) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a> Sub<&'a AuthenticatedScalarResult> for AuthenticatedScalarResult

lhs owned, rhs borrowed

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &'a AuthenticatedScalarResult) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a> Sub<&'a AuthenticatedScalarResult> for ScalarResult

lhs owned, rhs borrowed

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &'a AuthenticatedScalarResult) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a> Sub<&'a AuthenticatedScalarResult> for Scalar

lhs owned, rhs borrowed

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &'a AuthenticatedScalarResult) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<&ResultHandle<Scalar>> for &AuthenticatedScalarResult

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &ScalarResult) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a> Sub<&'a ResultHandle<Scalar>> for AuthenticatedScalarResult

lhs owned, rhs borrowed

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &'a ScalarResult) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<&Scalar> for &AuthenticatedScalarResult

Source§

fn sub(self, rhs: &Scalar) -> Self::Output

As in the case for addition, only party 0 subtracts the public value from their share, but both parties track this in the public modifier

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the - operator.
Source§

impl<'a> Sub<&'a Scalar> for AuthenticatedScalarResult

lhs owned, rhs borrowed

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &'a Scalar) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a> Sub<AuthenticatedScalarResult> for &'a AuthenticatedScalarResult

lhs borrowed, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: AuthenticatedScalarResult) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a> Sub<AuthenticatedScalarResult> for &'a ScalarResult

lhs borrowed, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: AuthenticatedScalarResult) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a> Sub<AuthenticatedScalarResult> for &'a Scalar

lhs borrowed, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: AuthenticatedScalarResult) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<AuthenticatedScalarResult> for ScalarResult

lhs owned, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: AuthenticatedScalarResult) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<AuthenticatedScalarResult> for Scalar

lhs owned, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: AuthenticatedScalarResult) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a> Sub<ResultHandle<Scalar>> for &'a AuthenticatedScalarResult

lhs borrowed, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: ScalarResult) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<ResultHandle<Scalar>> for AuthenticatedScalarResult

lhs owned, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: ScalarResult) -> Self::Output

Performs the - operation. Read more
Source§

impl<'a> Sub<Scalar> for &'a AuthenticatedScalarResult

lhs borrowed, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Scalar) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub<Scalar> for AuthenticatedScalarResult

lhs owned, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Scalar) -> Self::Output

Performs the - operation. Read more
Source§

impl Sub for AuthenticatedScalarResult

lhs owned, rhs owned

Source§

type Output = AuthenticatedScalarResult

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: AuthenticatedScalarResult) -> Self::Output

Performs the - operation. Read more
Source§

impl Sum for AuthenticatedScalarResult

TODO: Maybe use a batch gate for this; performance depends on whether materializing the iterator is burdensome

Source§

fn sum<I: Iterator<Item = Self>>(iter: I) -> Self

Assumes the iterator is non-empty

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> 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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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