pub trait PairingCheck {
type Fp: Field;
type Fp2: Field + FieldExtension<Self::Fp> + ComplexConjugate;
type Fp12: FieldExtension<Self::Fp2> + ComplexConjugate;
// Required methods
fn pairing_check_hint(
P: &[AffinePoint<Self::Fp>],
Q: &[AffinePoint<Self::Fp2>],
) -> (Self::Fp12, Self::Fp12);
fn pairing_check(
P: &[AffinePoint<Self::Fp>],
Q: &[AffinePoint<Self::Fp2>],
) -> Result<(), PairingCheckError>;
}Required Associated Types§
type Fp: Field
type Fp2: Field + FieldExtension<Self::Fp> + ComplexConjugate
type Fp12: FieldExtension<Self::Fp2> + ComplexConjugate
Required Methods§
Sourcefn pairing_check_hint(
P: &[AffinePoint<Self::Fp>],
Q: &[AffinePoint<Self::Fp2>],
) -> (Self::Fp12, Self::Fp12)
fn pairing_check_hint( P: &[AffinePoint<Self::Fp>], Q: &[AffinePoint<Self::Fp2>], ) -> (Self::Fp12, Self::Fp12)
Given points P[], Q[], computes the multi-Miller loop and then returns the final exponentiation hint from Novakovic-Eagon https://eprint.iacr.org/2024/640.pdf.
Output is c (residue witness inverse) and u (cubic nonresidue power).
§Assumption
This function assumes all input points have already been validated by the caller. In
particular, externally supplied points must be checked for canonical field representation,
curve membership, and membership in the correct prime-order subgroup before being passed to
this function. Callers must also enforce any protocol-specific policy about whether identity
points are allowed. AffinePoint itself does not enforce these properties.
Sourcefn pairing_check(
P: &[AffinePoint<Self::Fp>],
Q: &[AffinePoint<Self::Fp2>],
) -> Result<(), PairingCheckError>
fn pairing_check( P: &[AffinePoint<Self::Fp>], Q: &[AffinePoint<Self::Fp2>], ) -> Result<(), PairingCheckError>
Checks whether the product of pairings over (P[i], Q[i]) evaluates to one.
§Assumption
This function assumes all input points have already been validated by the caller. In
particular, externally supplied points must be checked for canonical field representation,
curve membership, and membership in the correct prime-order subgroup before being passed to
this function. Callers must also enforce any protocol-specific policy about whether identity
points are allowed. AffinePoint itself does not enforce these properties.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.