Trait lambdaworks_math::elliptic_curve::traits::IsPairing
source · pub trait IsPairing {
type G1Point: IsGroup;
type G2Point: IsGroup;
type OutputField: IsField;
// Required method
fn compute_batch(
pairs: &[(&Self::G1Point, &Self::G2Point)],
) -> Result<FieldElement<Self::OutputField>, PairingError>;
// Provided method
fn compute(
p: &Self::G1Point,
q: &Self::G2Point,
) -> Result<FieldElement<Self::OutputField>, PairingError> { ... }
}
Required Associated Types§
Required Methods§
sourcefn compute_batch(
pairs: &[(&Self::G1Point, &Self::G2Point)],
) -> Result<FieldElement<Self::OutputField>, PairingError>
fn compute_batch( pairs: &[(&Self::G1Point, &Self::G2Point)], ) -> Result<FieldElement<Self::OutputField>, PairingError>
Compute the product of the pairings for a list of point pairs.
Provided Methods§
sourcefn compute(
p: &Self::G1Point,
q: &Self::G2Point,
) -> Result<FieldElement<Self::OutputField>, PairingError>
fn compute( p: &Self::G1Point, q: &Self::G2Point, ) -> Result<FieldElement<Self::OutputField>, PairingError>
Compute the ate pairing between point p
in G1 and q
in G2.
Object Safety§
This trait is not object safe.