openvm_pairing_guest::pairing

Trait FinalExp

Source
pub trait FinalExp {
    type Fp: Field;
    type Fp2: Field + FieldExtension<Self::Fp>;
    type Fp12: Field + FieldExtension<Self::Fp2>;

    // Required methods
    fn assert_final_exp_is_one(
        f: &Self::Fp12,
        P: &[AffinePoint<Self::Fp>],
        Q: &[AffinePoint<Self::Fp2>],
    );
    fn final_exp_hint(f: &Self::Fp12) -> (Self::Fp12, Self::Fp12);
}

Required Associated Types§

Required Methods§

Source

fn assert_final_exp_is_one( f: &Self::Fp12, P: &[AffinePoint<Self::Fp>], Q: &[AffinePoint<Self::Fp2>], )

Assert in circuit that the final exponentiation is equal to one. The actual final exponentiaton is calculated out of circuit via final_exp_hint. Scalar coefficients to the curve points must equal to zero, which is checked in a debug_assert.

Source

fn final_exp_hint(f: &Self::Fp12) -> (Self::Fp12, Self::Fp12)

Generates a hint for the final exponentiation to be calculated out of circuit Input is the result of the Miller loop Output is c (residue witness inverse) and u (cubic nonresidue power)

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.

Implementors§