FinalExp

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§

Source

type Fp: Field

Source

type Fp2: Field + FieldExtension<Self::Fp>

Source

type Fp12: Field + FieldExtension<Self::Fp2>

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 exponentiation 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§

Source§

impl FinalExp for Bls12_381

Source§

type Fp = Fp

Source§

type Fp2 = Fp2

Source§

type Fp12 = Fp12

Source§

impl FinalExp for Bn254

Source§

type Fp = Fq

Source§

type Fp2 = Fq2

Source§

type Fp12 = Fq12