Struct ark_bls12_377::g2::Config
source · pub struct Config;
Trait Implementations§
source§impl CurveConfig for Config
impl CurveConfig for Config
source§const COFACTOR: &'static [u64] = _
const COFACTOR: &'static [u64] = _
COFACTOR = 7923214915284317143930293550643874566881017850177945424769256759165301436616933228209277966774092486467289478618404761412630691835764674559376407658497
source§const COFACTOR_INV: Fr = _
const COFACTOR_INV: Fr = _
COFACTOR_INV = COFACTOR^{-1} mod r = 6764900296503390671038341982857278410319949526107311149686707033187604810669
§type BaseField = QuadExtField<Fp2ConfigWrapper<Fq2Config>>
type BaseField = QuadExtField<Fp2ConfigWrapper<Fq2Config>>
Base field that the curve is defined over.
§type ScalarField = Fp<MontBackend<FrConfig, 4>, 4>
type ScalarField = Fp<MontBackend<FrConfig, 4>, 4>
Finite prime field corresponding to an appropriate prime-order subgroup
of the curve group.
fn cofactor_is_one() -> bool
source§impl PartialEq<Config> for Config
impl PartialEq<Config> for Config
source§impl SWCurveConfig for Config
impl SWCurveConfig for Config
source§const COEFF_B: Fq2 = _
const COEFF_B: Fq2 = _
COEFF_B = [0, 155198655607781456406391640216936120121836107652948796323930557600032281009004493664981332883744016074664192874906]
source§fn mul_by_a(_: Self::BaseField) -> Self::BaseField
fn mul_by_a(_: Self::BaseField) -> Self::BaseField
Helper method for computing
elem * Self::COEFF_A
. Read moresource§fn clear_cofactor(p: &G2Affine) -> G2Affine
fn clear_cofactor(p: &G2Affine) -> G2Affine
Performs cofactor clearing.
The default method is simply to multiply by the cofactor.
Some curves can implement a more efficient algorithm.
source§fn add_b(elem: Self::BaseField) -> Self::BaseField
fn add_b(elem: Self::BaseField) -> Self::BaseField
Helper method for computing
elem + Self::COEFF_B
. Read moresource§fn is_in_correct_subgroup_assuming_on_curve(item: &Affine<Self>) -> bool
fn is_in_correct_subgroup_assuming_on_curve(item: &Affine<Self>) -> bool
Check if the provided curve point is in the prime-order subgroup. Read more
source§fn mul_projective(base: &Projective<Self>, scalar: &[u64]) -> Projective<Self>
fn mul_projective(base: &Projective<Self>, scalar: &[u64]) -> Projective<Self>
Default implementation of group multiplication for projective
coordinates
source§fn mul_affine(base: &Affine<Self>, scalar: &[u64]) -> Projective<Self>
fn mul_affine(base: &Affine<Self>, scalar: &[u64]) -> Projective<Self>
Default implementation of group multiplication for affine
coordinates.
source§fn msm(
bases: &[Affine<Self>],
scalars: &[Self::ScalarField]
) -> Result<Projective<Self>, usize>
fn msm(
bases: &[Affine<Self>],
scalars: &[Self::ScalarField]
) -> Result<Projective<Self>, usize>
Default implementation for multi scalar multiplication
source§fn serialize_with_mode<W>(
item: &Affine<Self>,
writer: W,
compress: Compress
) -> Result<(), SerializationError>where
W: Write,
fn serialize_with_mode<W>(
item: &Affine<Self>,
writer: W,
compress: Compress
) -> Result<(), SerializationError>where
W: Write,
If uncompressed, serializes both x and y coordinates as well as a bit for whether it is
infinity. If compressed, serializes x coordinate with two bits to encode whether y is
positive, negative, or infinity.
source§fn deserialize_with_mode<R>(
reader: R,
compress: Compress,
validate: Validate
) -> Result<Affine<Self>, SerializationError>where
R: Read,
fn deserialize_with_mode<R>(
reader: R,
compress: Compress,
validate: Validate
) -> Result<Affine<Self>, SerializationError>where
R: Read,
If
validate
is Yes
, calls check()
to make sure the element is valid.fn serialized_size(compress: Compress) -> usize
source§impl WBConfig for Config
impl WBConfig for Config
type IsogenousCurve = SwuIsoConfig
const ISOGENY_MAP: IsogenyMap<'static, Self::IsogenousCurve, Self> = ISOGENY_MAP_TO_G2
impl Eq for Config
impl StructuralEq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations§
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more