Struct ark_ec::pairing::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>
impl<'a, 'b, P: Pairing> Add<&'a PairingOutput<P>> for &'b PairingOutput<P>
§type Output = PairingOutput<P>
type Output = PairingOutput<P>
The resulting type after applying the
+
operator.source§fn add(self, other: &'a PairingOutput<P>) -> PairingOutput<P>
fn add(self, other: &'a PairingOutput<P>) -> PairingOutput<P>
Performs the
+
operation. Read moresource§impl<'a, P: Pairing> Add<&'a PairingOutput<P>> for PairingOutput<P>
impl<'a, P: Pairing> Add<&'a PairingOutput<P>> for PairingOutput<P>
source§impl<'a, 'b, P: Pairing> Add<&'a mut PairingOutput<P>> for &'b PairingOutput<P>
impl<'a, 'b, P: Pairing> Add<&'a mut PairingOutput<P>> for &'b PairingOutput<P>
§type Output = PairingOutput<P>
type Output = PairingOutput<P>
The resulting type after applying the
+
operator.source§fn add(self, other: &'a mut PairingOutput<P>) -> PairingOutput<P>
fn add(self, other: &'a mut PairingOutput<P>) -> PairingOutput<P>
Performs the
+
operation. Read moresource§impl<'a, P: Pairing> Add<&'a mut PairingOutput<P>> for PairingOutput<P>
impl<'a, P: Pairing> Add<&'a mut PairingOutput<P>> for PairingOutput<P>
§type Output = PairingOutput<P>
type Output = PairingOutput<P>
The resulting type after applying the
+
operator.source§fn add(self, other: &'a mut Self) -> Self
fn add(self, other: &'a mut Self) -> Self
Performs the
+
operation. Read moresource§impl<'b, P: Pairing> Add<PairingOutput<P>> for &'b PairingOutput<P>
impl<'b, P: Pairing> Add<PairingOutput<P>> for &'b PairingOutput<P>
§type Output = PairingOutput<P>
type Output = PairingOutput<P>
The resulting type after applying the
+
operator.source§fn add(self, other: PairingOutput<P>) -> PairingOutput<P>
fn add(self, other: PairingOutput<P>) -> PairingOutput<P>
Performs the
+
operation. Read moresource§impl<P: Pairing> Add<PairingOutput<P>> for PairingOutput<P>
impl<P: Pairing> Add<PairingOutput<P>> for PairingOutput<P>
source§impl<'a, P: Pairing> AddAssign<&'a PairingOutput<P>> for PairingOutput<P>
impl<'a, P: Pairing> AddAssign<&'a PairingOutput<P>> for PairingOutput<P>
source§fn add_assign(&mut self, other: &'a Self)
fn add_assign(&mut self, other: &'a Self)
Performs the
+=
operation. Read moresource§impl<'a, P: Pairing> AddAssign<&'a mut PairingOutput<P>> for PairingOutput<P>
impl<'a, P: Pairing> AddAssign<&'a mut PairingOutput<P>> for PairingOutput<P>
source§fn add_assign(&mut self, other: &'a mut Self)
fn add_assign(&mut self, other: &'a mut Self)
Performs the
+=
operation. Read moresource§impl<P: Pairing> AddAssign<PairingOutput<P>> for PairingOutput<P>
impl<P: Pairing> AddAssign<PairingOutput<P>> for PairingOutput<P>
source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+=
operation. Read moresource§impl<P: Pairing> CanonicalDeserialize for PairingOutput<P>
impl<P: Pairing> CanonicalDeserialize for PairingOutput<P>
source§fn deserialize_with_mode<R: Read>(
reader: R,
compress: Compress,
validate: Validate
) -> Result<Self, SerializationError>
fn deserialize_with_mode<R: Read>( reader: R, compress: Compress, validate: Validate ) -> Result<Self, SerializationError>
The general deserialize method that takes in customization flags.
fn deserialize_compressed<R>(reader: R) -> Result<Self, SerializationError>where R: Read,
fn deserialize_compressed_unchecked<R>( reader: R ) -> Result<Self, SerializationError>where R: Read,
fn deserialize_uncompressed<R>(reader: R) -> Result<Self, SerializationError>where R: Read,
fn deserialize_uncompressed_unchecked<R>( reader: R ) -> Result<Self, SerializationError>where R: Read,
source§impl<P: Pairing> CanonicalSerialize for PairingOutput<P>
impl<P: Pairing> CanonicalSerialize for PairingOutput<P>
source§fn serialize_with_mode<W: Write>(
&self,
writer: W,
compress: Compress
) -> Result<(), SerializationError>
fn serialize_with_mode<W: Write>( &self, writer: W, compress: Compress ) -> Result<(), SerializationError>
The general serialize method that takes in customization flags.
fn serialized_size(&self, compress: Compress) -> usize
fn serialize_compressed<W>(&self, writer: W) -> Result<(), SerializationError>where W: Write,
fn compressed_size(&self) -> usize
fn serialize_uncompressed<W>(&self, writer: W) -> Result<(), SerializationError>where W: Write,
fn uncompressed_size(&self) -> usize
source§impl<P> Clone for PairingOutput<P>where
P: Pairing,
impl<P> Clone for PairingOutput<P>where P: Pairing,
source§impl<P> Debug for PairingOutput<P>where
P: Pairing,
impl<P> Debug for PairingOutput<P>where P: Pairing,
source§impl<P> Default for PairingOutput<P>where
P: Pairing,
impl<P> Default for PairingOutput<P>where P: Pairing,
source§impl<P: Pairing> Display for PairingOutput<P>
impl<P: Pairing> Display for PairingOutput<P>
source§impl<P: Pairing> Distribution<PairingOutput<P>> for Standard
impl<P: Pairing> Distribution<PairingOutput<P>> for Standard
source§fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> PairingOutput<P>
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§impl<P: Pairing> Group for PairingOutput<P>
impl<P: Pairing> Group for PairingOutput<P>
§type ScalarField = <P as Pairing>::ScalarField
type ScalarField = <P as Pairing>::ScalarField
The scalar field
F_r
, where r
is the order of this group.source§fn double_in_place(&mut self) -> &mut Self
fn double_in_place(&mut self) -> &mut Self
Double
self
in place.source§fn mul_bigint(&self, other: impl AsRef<[u64]>) -> Self
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
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> Hash for PairingOutput<P>where
P: Pairing,
impl<P> Hash for PairingOutput<P>where P: Pairing,
source§impl<P: Pairing, T: Borrow<P::ScalarField>> Mul<T> for PairingOutput<P>
impl<P: Pairing, T: Borrow<P::ScalarField>> Mul<T> for PairingOutput<P>
source§impl<P: Pairing, T: Borrow<P::ScalarField>> MulAssign<T> for PairingOutput<P>
impl<P: Pairing, T: Borrow<P::ScalarField>> MulAssign<T> for PairingOutput<P>
source§fn mul_assign(&mut self, other: T)
fn mul_assign(&mut self, other: T)
Performs the
*=
operation. Read moresource§impl<P: Pairing> Neg for PairingOutput<P>
impl<P: Pairing> Neg for PairingOutput<P>
source§impl<P> Ord for PairingOutput<P>where
P: Pairing,
impl<P> Ord for PairingOutput<P>where P: Pairing,
source§impl<P> PartialEq<PairingOutput<P>> for PairingOutput<P>where
P: Pairing,
impl<P> PartialEq<PairingOutput<P>> for PairingOutput<P>where P: Pairing,
source§impl<P> PartialOrd<PairingOutput<P>> for PairingOutput<P>where
P: Pairing,
impl<P> PartialOrd<PairingOutput<P>> for PairingOutput<P>where P: Pairing,
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<P: Pairing> ScalarMul for PairingOutput<P>
impl<P: Pairing> ScalarMul for PairingOutput<P>
type MulBase = PairingOutput<P>
const NEGATION_IS_CHEAP: bool = <P::TargetField>::INVERSE_IS_FAST
fn batch_convert_to_mul_base(bases: &[Self]) -> Vec<Self::MulBase>
source§impl<'a, 'b, P: Pairing> Sub<&'a PairingOutput<P>> for &'b PairingOutput<P>
impl<'a, 'b, P: Pairing> Sub<&'a PairingOutput<P>> for &'b PairingOutput<P>
§type Output = PairingOutput<P>
type Output = PairingOutput<P>
The resulting type after applying the
-
operator.source§fn sub(self, other: &'a PairingOutput<P>) -> PairingOutput<P>
fn sub(self, other: &'a PairingOutput<P>) -> PairingOutput<P>
Performs the
-
operation. Read moresource§impl<'a, P: Pairing> Sub<&'a PairingOutput<P>> for PairingOutput<P>
impl<'a, P: Pairing> Sub<&'a PairingOutput<P>> for PairingOutput<P>
source§impl<'a, 'b, P: Pairing> Sub<&'a mut PairingOutput<P>> for &'b PairingOutput<P>
impl<'a, 'b, P: Pairing> Sub<&'a mut PairingOutput<P>> for &'b PairingOutput<P>
§type Output = PairingOutput<P>
type Output = PairingOutput<P>
The resulting type after applying the
-
operator.source§fn sub(self, other: &'a mut PairingOutput<P>) -> PairingOutput<P>
fn sub(self, other: &'a mut PairingOutput<P>) -> PairingOutput<P>
Performs the
-
operation. Read moresource§impl<'a, P: Pairing> Sub<&'a mut PairingOutput<P>> for PairingOutput<P>
impl<'a, P: Pairing> Sub<&'a mut PairingOutput<P>> for PairingOutput<P>
§type Output = PairingOutput<P>
type Output = PairingOutput<P>
The resulting type after applying the
-
operator.source§fn sub(self, other: &'a mut Self) -> Self
fn sub(self, other: &'a mut Self) -> Self
Performs the
-
operation. Read moresource§impl<'b, P: Pairing> Sub<PairingOutput<P>> for &'b PairingOutput<P>
impl<'b, P: Pairing> Sub<PairingOutput<P>> for &'b PairingOutput<P>
§type Output = PairingOutput<P>
type Output = PairingOutput<P>
The resulting type after applying the
-
operator.source§fn sub(self, other: PairingOutput<P>) -> PairingOutput<P>
fn sub(self, other: PairingOutput<P>) -> PairingOutput<P>
Performs the
-
operation. Read moresource§impl<P: Pairing> Sub<PairingOutput<P>> for PairingOutput<P>
impl<P: Pairing> Sub<PairingOutput<P>> for PairingOutput<P>
source§impl<'a, P: Pairing> SubAssign<&'a PairingOutput<P>> for PairingOutput<P>
impl<'a, P: Pairing> SubAssign<&'a PairingOutput<P>> for PairingOutput<P>
source§fn sub_assign(&mut self, other: &'a Self)
fn sub_assign(&mut self, other: &'a Self)
Performs the
-=
operation. Read moresource§impl<'a, P: Pairing> SubAssign<&'a mut PairingOutput<P>> for PairingOutput<P>
impl<'a, P: Pairing> SubAssign<&'a mut PairingOutput<P>> for PairingOutput<P>
source§fn sub_assign(&mut self, other: &'a mut Self)
fn sub_assign(&mut self, other: &'a mut Self)
Performs the
-=
operation. Read moresource§impl<P: Pairing> SubAssign<PairingOutput<P>> for PairingOutput<P>
impl<P: Pairing> SubAssign<PairingOutput<P>> for PairingOutput<P>
source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the
-=
operation. Read moresource§impl<'a, P: Pairing> Sum<&'a PairingOutput<P>> for PairingOutput<P>
impl<'a, P: Pairing> Sum<&'a PairingOutput<P>> for PairingOutput<P>
source§impl<P: Pairing> Sum<PairingOutput<P>> for PairingOutput<P>
impl<P: Pairing> Sum<PairingOutput<P>> for PairingOutput<P>
source§impl<P: Pairing> Valid for PairingOutput<P>
impl<P: Pairing> Valid for PairingOutput<P>
fn check(&self) -> Result<(), SerializationError>
fn batch_check<'a>( batch: impl Iterator<Item = &'a Self> + Send ) -> Result<(), SerializationError>where Self: 'a,
source§impl<P: Pairing> VariableBaseMSM for PairingOutput<P>
impl<P: Pairing> VariableBaseMSM for PairingOutput<P>
source§fn msm_unchecked(bases: &[Self::MulBase], scalars: &[Self::ScalarField]) -> Self
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 moresource§fn msm(
bases: &[Self::MulBase],
scalars: &[Self::ScalarField]
) -> Result<Self, usize>
fn msm( bases: &[Self::MulBase], scalars: &[Self::ScalarField] ) -> Result<Self, usize>
Performs multi-scalar multiplication, without checking that
bases.len() == scalars.len()
. Read moresource§fn msm_bigint(
bases: &[Self::MulBase],
bigints: &[<Self::ScalarField as PrimeField>::BigInt]
) -> Self
fn msm_bigint( bases: &[Self::MulBase], bigints: &[<Self::ScalarField as PrimeField>::BigInt] ) -> Self
Optimized implementation of multi-scalar multiplication.