pub type Fp12Chip<'chip, F> = Fp12Chip<'chip, F, FpChip<'chip, F>, Fq12, 9>;
Aliased Type§
pub struct Fp12Chip<'chip, F>(pub FieldVectorChip<'chip, F, FpChip<'chip, F, Fq>>, _);
Tuple Fields§
§0: FieldVectorChip<'chip, F, FpChip<'chip, F, Fq>>
Implementations§
Source§impl<F: BigPrimeField> Fp12Chip<'_, F>
impl<F: BigPrimeField> Fp12Chip<'_, F>
pub fn frobenius_map( &self, ctx: &mut Context<F>, a: &<Self as FieldChip<F>>::FieldPoint, power: usize, ) -> <Self as FieldChip<F>>::FieldPoint
Sourcepub fn pow(
&self,
ctx: &mut Context<F>,
a: &<Self as FieldChip<F>>::FieldPoint,
exp: Vec<u64>,
) -> <Self as FieldChip<F>>::FieldPoint
pub fn pow( &self, ctx: &mut Context<F>, a: &<Self as FieldChip<F>>::FieldPoint, exp: Vec<u64>, ) -> <Self as FieldChip<F>>::FieldPoint
§Assumptions
a
is nonzero field point
Sourcepub fn cyclotomic_compress(&self, a: &FqPoint<F>) -> Vec<FqPoint<F>> ⓘ
pub fn cyclotomic_compress(&self, a: &FqPoint<F>) -> Vec<FqPoint<F>> ⓘ
in = g0 + g2 w + g4 w^2 + g1 w^3 + g3 w^4 + g5 w^5 where g_i = g_i0 + g_i1 * u are elements of Fp2 out = Compress(in) = [ g2, g3, g4, g5 ]
Sourcepub fn cyclotomic_decompress(
&self,
ctx: &mut Context<F>,
compression: Vec<FqPoint<F>>,
) -> FqPoint<F>
pub fn cyclotomic_decompress( &self, ctx: &mut Context<F>, compression: Vec<FqPoint<F>>, ) -> FqPoint<F>
Input:
compression = [g2, g3, g4, g5]
where g_i are proper elements of Fp2
Output:
Decompress(compression) = g0 + g2 w + g4 w^2 + g1 w^3 + g3 w^4 + g5 w^5
where- All elements of output are proper elements of Fp2 and: c = XI0 + u if g2 != 0: g1 = (g5^2 * c + 3 g4^2 - 2 g3)/(4g2) g0 = (2 g1^2 + g2 * g5 - 3 g3*g4) * c + 1 if g2 = 0: g1 = (2 g4 * g5)/g3 g0 = (2 g1^2 - 3 g3 * g4) * c + 1
pub fn cyclotomic_square( &self, ctx: &mut Context<F>, compression: &[FqPoint<F>], ) -> Vec<FqPoint<F>> ⓘ
Sourcepub fn cyclotomic_pow(
&self,
ctx: &mut Context<F>,
a: FqPoint<F>,
exp: Vec<u64>,
) -> FqPoint<F>
pub fn cyclotomic_pow( &self, ctx: &mut Context<F>, a: FqPoint<F>, exp: Vec<u64>, ) -> FqPoint<F>
§Assumptions
a
is a nonzero element in the cyclotomic subgroup
pub fn hard_part_BN( &self, ctx: &mut Context<F>, m: <Self as FieldChip<F>>::FieldPoint, ) -> <Self as FieldChip<F>>::FieldPoint
Sourcepub fn easy_part(
&self,
ctx: &mut Context<F>,
a: <Self as FieldChip<F>>::FieldPoint,
) -> <Self as FieldChip<F>>::FieldPoint
pub fn easy_part( &self, ctx: &mut Context<F>, a: <Self as FieldChip<F>>::FieldPoint, ) -> <Self as FieldChip<F>>::FieldPoint
§Assumptions
a
is nonzero field point