pub type Fp3<P> = CubicExtField<Fp3ConfigWrapper<P>>;
Aliased Type§
struct Fp3<P> {
pub c0: <Fp3ConfigWrapper<P> as CubicExtConfig>::BaseField,
pub c1: <Fp3ConfigWrapper<P> as CubicExtConfig>::BaseField,
pub c2: <Fp3ConfigWrapper<P> as CubicExtConfig>::BaseField,
}
Fields§
§c0: <Fp3ConfigWrapper<P> as CubicExtConfig>::BaseField
§c1: <Fp3ConfigWrapper<P> as CubicExtConfig>::BaseField
§c2: <Fp3ConfigWrapper<P> as CubicExtConfig>::BaseField
Implementations§
Source§impl<P: Fp3Config> Fp3<P>
impl<P: Fp3Config> Fp3<P>
Sourcepub fn mul_assign_by_fp(&mut self, value: &P::Fp)
pub fn mul_assign_by_fp(&mut self, value: &P::Fp)
In-place multiply all coefficients c0
, c1
, and c2
of self
by an element from Fp
.
§Examples
use ark_mnt6_753::{Fq as Fp, Fq3 as Fp3};
let c0: Fp = Fp::rand(&mut test_rng());
let c1: Fp = Fp::rand(&mut test_rng());
let c2: Fp = Fp::rand(&mut test_rng());
let mut ext_element: Fp3 = Fp3::new(c0, c1, c2);
let base_field_element: Fp = Fp::rand(&mut test_rng());
ext_element.mul_assign_by_fp(&base_field_element);
assert_eq!(ext_element.c0, c0 * base_field_element);
assert_eq!(ext_element.c1, c1 * base_field_element);
assert_eq!(ext_element.c2, c2 * base_field_element);
Trait Implementations§
Source§impl<P: Fp3Config> CyclotomicMultSubgroup for Fp3<P>
impl<P: Fp3Config> CyclotomicMultSubgroup for Fp3<P>
Source§const INVERSE_IS_FAST: bool = false
const INVERSE_IS_FAST: bool = false
Is the inverse fast to compute? For example, in quadratic extensions, the inverse
can be computed at the cost of negating one coordinate, which is much faster than
standard inversion.
By default this is
false
, but should be set to true
for quadratic extensions.Source§fn cyclotomic_square(&self) -> Self
fn cyclotomic_square(&self) -> Self
Compute a square in the cyclotomic subgroup. By default this is computed using
Field::square
, but for
degree 12 extensions, this can be computed faster than normal squaring. Read moreSource§fn cyclotomic_square_in_place(&mut self) -> &mut Self
fn cyclotomic_square_in_place(&mut self) -> &mut Self
Square
self
in place. By default this is computed using
Field::square_in_place
, but for degree 12 extensions,
this can be computed faster than normal squaring. Read moreSource§fn cyclotomic_inverse(&self) -> Option<Self>
fn cyclotomic_inverse(&self) -> Option<Self>
Compute the inverse of
self
. See Self::INVERSE_IS_FAST
for details.
Returns None
if self.is_zero()
, and Some
otherwise. Read moreSource§fn cyclotomic_inverse_in_place(&mut self) -> Option<&mut Self>
fn cyclotomic_inverse_in_place(&mut self) -> Option<&mut Self>
Compute the inverse of
self
. See Self::INVERSE_IS_FAST
for details.
Returns None
if self.is_zero()
, and Some
otherwise. Read more