ark_ec::pairing

Struct PairingOutput

Source
pub struct PairingOutput<P: Pairing>(pub P::TargetField);
Expand description

Represents the target group of a pairing. This struct is a wrapper around the field that the target group is embedded in.

Tuple Fields§

§0: P::TargetField

Trait Implementations§

Source§

impl<'a, 'b, P: Pairing> Add<&'a PairingOutput<P>> for &'b PairingOutput<P>

Source§

type Output = PairingOutput<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: &'a PairingOutput<P>) -> PairingOutput<P>

Performs the + operation. Read more
Source§

impl<'a, P: Pairing> Add<&'a PairingOutput<P>> for PairingOutput<P>

Source§

type Output = PairingOutput<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: &'a Self) -> Self

Performs the + operation. Read more
Source§

impl<'a, 'b, P: Pairing> Add<&'a mut PairingOutput<P>> for &'b PairingOutput<P>

Source§

type Output = PairingOutput<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: &'a mut PairingOutput<P>) -> PairingOutput<P>

Performs the + operation. Read more
Source§

impl<'a, P: Pairing> Add<&'a mut PairingOutput<P>> for PairingOutput<P>

Source§

type Output = PairingOutput<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: &'a mut Self) -> Self

Performs the + operation. Read more
Source§

impl<'b, P: Pairing> Add<PairingOutput<P>> for &'b PairingOutput<P>

Source§

type Output = PairingOutput<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: PairingOutput<P>) -> PairingOutput<P>

Performs the + operation. Read more
Source§

impl<P: Pairing> Add for PairingOutput<P>

Source§

type Output = PairingOutput<P>

The resulting type after applying the + operator.
Source§

fn add(self, other: Self) -> Self

Performs the + operation. Read more
Source§

impl<'a, P: Pairing> AddAssign<&'a PairingOutput<P>> for PairingOutput<P>

Source§

fn add_assign(&mut self, other: &'a Self)

Performs the += operation. Read more
Source§

impl<'a, P: Pairing> AddAssign<&'a mut PairingOutput<P>> for PairingOutput<P>

Source§

fn add_assign(&mut self, other: &'a mut Self)

Performs the += operation. Read more
Source§

impl<P: Pairing> AddAssign for PairingOutput<P>

Source§

fn add_assign(&mut self, other: Self)

Performs the += operation. Read more
Source§

impl<P: Pairing> AdditiveGroup for PairingOutput<P>

Source§

const ZERO: Self = _

The additive identity of the field.
Source§

type Scalar = <P as Pairing>::ScalarField

Source§

fn double_in_place(&mut self) -> &mut Self

Doubles self in place.
Source§

fn double(&self) -> Self

Doubles self.
Source§

fn neg_in_place(&mut self) -> &mut Self

Negates self in place.
Source§

impl<P: Pairing> CanonicalDeserialize for PairingOutput<P>

Source§

fn deserialize_with_mode<R: Read>( reader: R, compress: Compress, validate: Validate, ) -> Result<Self, SerializationError>

The general deserialize method that takes in customization flags.
Source§

fn deserialize_compressed<R>(reader: R) -> Result<Self, SerializationError>
where R: Read,

Source§

fn deserialize_compressed_unchecked<R>( reader: R, ) -> Result<Self, SerializationError>
where R: Read,

Source§

fn deserialize_uncompressed<R>(reader: R) -> Result<Self, SerializationError>
where R: Read,

Source§

fn deserialize_uncompressed_unchecked<R>( reader: R, ) -> Result<Self, SerializationError>
where R: Read,

Source§

impl<P: Pairing> CanonicalSerialize for PairingOutput<P>

Source§

fn serialize_with_mode<W: Write>( &self, writer: W, compress: Compress, ) -> Result<(), SerializationError>

The general serialize method that takes in customization flags.
Source§

fn serialized_size(&self, compress: Compress) -> usize

Source§

fn serialize_compressed<W>(&self, writer: W) -> Result<(), SerializationError>
where W: Write,

Source§

fn compressed_size(&self) -> usize

Source§

fn serialize_uncompressed<W>(&self, writer: W) -> Result<(), SerializationError>
where W: Write,

Source§

fn uncompressed_size(&self) -> usize

Source§

impl<P: Pairing> Clone for PairingOutput<P>
where P::TargetField: Copy,

Source§

fn clone(&self) -> Self

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<P: Pairing> Debug for PairingOutput<P>
where P::TargetField: Debug,

Source§

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

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

impl<P: Pairing> Default for PairingOutput<P>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<P: Pairing> Display for PairingOutput<P>

Source§

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

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

impl<P: Pairing> Distribution<PairingOutput<P>> for Standard

Source§

fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> PairingOutput<P>

Generate a random value of T, using rng as the source of randomness.
Source§

fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>
where R: Rng, Self: Sized,

Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Source§

fn map<F, S>(self, func: F) -> DistMap<Self, F, T, S>
where F: Fn(T) -> S, Self: Sized,

Create a distribution of values of ‘S’ by mapping the output of Self through the closure F Read more
Source§

impl<P: Pairing> Hash for PairingOutput<P>
where P::TargetField: Hash,

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<P: Pairing, T: Borrow<P::ScalarField>> Mul<T> for PairingOutput<P>

Source§

type Output = PairingOutput<P>

The resulting type after applying the * operator.
Source§

fn mul(self, other: T) -> Self

Performs the * operation. Read more
Source§

impl<P: Pairing, T: Borrow<P::ScalarField>> MulAssign<T> for PairingOutput<P>

Source§

fn mul_assign(&mut self, other: T)

Performs the *= operation. Read more
Source§

impl<P: Pairing> Neg for PairingOutput<P>

Source§

type Output = PairingOutput<P>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self

Performs the unary - operation. Read more
Source§

impl<P: Pairing> Ord for PairingOutput<P>
where P::TargetField: Ord, Self: Eq,

Source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<P: Pairing> PartialEq for PairingOutput<P>

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<P: Pairing> PartialOrd for PairingOutput<P>
where P::TargetField: Ord, Self: Eq,

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<P: Pairing> PrimeGroup for PairingOutput<P>

Source§

type ScalarField = <P as Pairing>::ScalarField

The scalar field F_r, where r is the order of this group.
Source§

fn generator() -> Self

Returns a fixed generator of this group.
Source§

fn mul_bigint(&self, other: impl AsRef<[u64]>) -> Self

Performs scalar multiplication of this element.
Source§

fn mul_bits_be(&self, other: impl Iterator<Item = bool>) -> Self

Computes other * self, where other is a big-endian bit representation of some integer.
Source§

impl<P: Pairing> ScalarMul for PairingOutput<P>

Source§

const NEGATION_IS_CHEAP: bool = <P::TargetField>::INVERSE_IS_FAST

Source§

type MulBase = PairingOutput<P>

Source§

fn batch_convert_to_mul_base(bases: &[Self]) -> Vec<Self::MulBase>

Source§

fn batch_mul(self, v: &[Self::ScalarField]) -> Vec<Self::MulBase>

Compute the vector v[0].G, v[1].G, …, v[n-1].G, given: Read more
Source§

fn batch_mul_with_preprocessing( table: &BatchMulPreprocessing<Self>, v: &[Self::ScalarField], ) -> Vec<Self::MulBase>

Compute the vector v[0].G, v[1].G, …, v[n-1].G, given: Read more
Source§

impl<'a, 'b, P: Pairing> Sub<&'a PairingOutput<P>> for &'b PairingOutput<P>

Source§

type Output = PairingOutput<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: &'a PairingOutput<P>) -> PairingOutput<P>

Performs the - operation. Read more
Source§

impl<'a, P: Pairing> Sub<&'a PairingOutput<P>> for PairingOutput<P>

Source§

type Output = PairingOutput<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: &'a Self) -> Self

Performs the - operation. Read more
Source§

impl<'a, 'b, P: Pairing> Sub<&'a mut PairingOutput<P>> for &'b PairingOutput<P>

Source§

type Output = PairingOutput<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: &'a mut PairingOutput<P>) -> PairingOutput<P>

Performs the - operation. Read more
Source§

impl<'a, P: Pairing> Sub<&'a mut PairingOutput<P>> for PairingOutput<P>

Source§

type Output = PairingOutput<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: &'a mut Self) -> Self

Performs the - operation. Read more
Source§

impl<'b, P: Pairing> Sub<PairingOutput<P>> for &'b PairingOutput<P>

Source§

type Output = PairingOutput<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: PairingOutput<P>) -> PairingOutput<P>

Performs the - operation. Read more
Source§

impl<P: Pairing> Sub for PairingOutput<P>

Source§

type Output = PairingOutput<P>

The resulting type after applying the - operator.
Source§

fn sub(self, other: Self) -> Self

Performs the - operation. Read more
Source§

impl<'a, P: Pairing> SubAssign<&'a PairingOutput<P>> for PairingOutput<P>

Source§

fn sub_assign(&mut self, other: &'a Self)

Performs the -= operation. Read more
Source§

impl<'a, P: Pairing> SubAssign<&'a mut PairingOutput<P>> for PairingOutput<P>

Source§

fn sub_assign(&mut self, other: &'a mut Self)

Performs the -= operation. Read more
Source§

impl<P: Pairing> SubAssign for PairingOutput<P>

Source§

fn sub_assign(&mut self, other: Self)

Performs the -= operation. Read more
Source§

impl<'a, P: Pairing> Sum<&'a PairingOutput<P>> for PairingOutput<P>

Source§

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

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl<P: Pairing> Sum for PairingOutput<P>

Source§

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

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl<P: Pairing> Valid for PairingOutput<P>

Source§

fn check(&self) -> Result<(), SerializationError>

Source§

fn batch_check<'a>( batch: impl Iterator<Item = &'a Self> + Send, ) -> Result<(), SerializationError>
where Self: 'a,

Source§

impl<P: Pairing> VariableBaseMSM for PairingOutput<P>

Source§

fn msm_unchecked(bases: &[Self::MulBase], scalars: &[Self::ScalarField]) -> Self

Computes an inner product between the PrimeField elements in scalars and the corresponding group elements in bases. Read more
Source§

fn msm( bases: &[Self::MulBase], scalars: &[Self::ScalarField], ) -> Result<Self, usize>

Performs multi-scalar multiplication. Read more
Source§

fn msm_bigint( bases: &[Self::MulBase], bigints: &[<Self::ScalarField as PrimeField>::BigInt], ) -> Self

Optimized implementation of multi-scalar multiplication.
Source§

fn msm_chunks<I, J>(bases_stream: &J, scalars_stream: &I) -> Self
where I: Iterable + ?Sized, I::Item: Borrow<Self::ScalarField>, J: Iterable, J::Item: Borrow<Self::MulBase>,

Streaming multi-scalar multiplication algorithm with hard-coded chunk size.
Source§

impl<P: Pairing> Zero for PairingOutput<P>

Source§

fn zero() -> Self

The identity element, or “zero”, of the group is the identity element of the multiplicative group of the underlying field, i.e., P::TargetField::one().

Source§

fn is_zero(&self) -> bool

Returns true if self is equal to the additive identity.
Source§

fn set_zero(&mut self)

Sets self to the additive identity element of Self, 0.
Source§

impl<P: Pairing> Zeroize for PairingOutput<P>

Source§

fn zeroize(&mut self)

Zero out this object from memory using Rust intrinsics which ensure the zeroization operation is not “optimized away” by the compiler.
Source§

impl<P: Pairing> Copy for PairingOutput<P>
where P::TargetField: Copy,

Source§

impl<P: Pairing> Eq for PairingOutput<P>

Auto Trait Implementations§

§

impl<P> Freeze for PairingOutput<P>
where <P as Pairing>::TargetField: Freeze,

§

impl<P> RefUnwindSafe for PairingOutput<P>

§

impl<P> Send for PairingOutput<P>

§

impl<P> Sync for PairingOutput<P>

§

impl<P> Unpin for PairingOutput<P>
where <P as Pairing>::TargetField: Unpin,

§

impl<P> UnwindSafe for PairingOutput<P>

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> CanonicalSerializeHashExt for T

Source§

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

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. 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> 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> ToString for T
where T: Display + ?Sized,

Source§

default fn to_string(&self) -> String

Converts the given value to a String. 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<T> UniformRand for T

Source§

fn rand<R>(rng: &mut R) -> T
where R: Rng + ?Sized,

Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T, F> DomainCoeff<F> for T
where F: FftField, T: Copy + Send + Sync + Add<Output = T> + Sub<Output = T> + AddAssign + SubAssign + Zero + MulAssign<F> + Debug + PartialEq,