Struct mina_curves::pasta::curves::pallas::LegacyPallasParameters
source · pub struct LegacyPallasParameters;
Expand description
legacy curve, a copy of the normal curve to support legacy sponge params
Trait Implementations§
source§impl Clone for LegacyPallasParameters
impl Clone for LegacyPallasParameters
source§fn clone(&self) -> LegacyPallasParameters
fn clone(&self) -> LegacyPallasParameters
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl CurveConfig for LegacyPallasParameters
impl CurveConfig for LegacyPallasParameters
§type BaseField = <PallasParameters as CurveConfig>::BaseField
type BaseField = <PallasParameters as CurveConfig>::BaseField
Base field that the curve is defined over.
§type ScalarField = <PallasParameters as CurveConfig>::ScalarField
type ScalarField = <PallasParameters as CurveConfig>::ScalarField
Finite prime field corresponding to an appropriate prime-order subgroup
of the curve group.
source§const COFACTOR: &'static [u64] = <PallasParameters as CurveConfig>::COFACTOR
const COFACTOR: &'static [u64] = <PallasParameters as CurveConfig>::COFACTOR
The cofactor of this curve, represented as a sequence of little-endian limbs.
const COFACTOR_INV: Self::ScalarField = <PallasParameters as CurveConfig>::COFACTOR_INV
fn cofactor_is_one() -> bool
source§impl Default for LegacyPallasParameters
impl Default for LegacyPallasParameters
source§fn default() -> LegacyPallasParameters
fn default() -> LegacyPallasParameters
Returns the “default value” for a type. Read more
source§impl PartialEq<LegacyPallasParameters> for LegacyPallasParameters
impl PartialEq<LegacyPallasParameters> for LegacyPallasParameters
source§fn eq(&self, other: &LegacyPallasParameters) -> bool
fn eq(&self, other: &LegacyPallasParameters) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl SWCurveConfig for LegacyPallasParameters
impl SWCurveConfig for LegacyPallasParameters
source§const COEFF_A: Self::BaseField = <PallasParameters as SWCurveConfig>::COEFF_A
const COEFF_A: Self::BaseField = <PallasParameters as SWCurveConfig>::COEFF_A
Coefficient
a
of the curve equation.source§const COEFF_B: Self::BaseField = <PallasParameters as SWCurveConfig>::COEFF_B
const COEFF_B: Self::BaseField = <PallasParameters as SWCurveConfig>::COEFF_B
Coefficient
b
of the curve equation.§fn mul_by_a(elem: Self::BaseField) -> Self::BaseField
fn mul_by_a(elem: Self::BaseField) -> Self::BaseField
Helper method for computing
elem * Self::COEFF_A
. Read more§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 more§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
§fn clear_cofactor(item: &Affine<Self>) -> Affine<Self>
fn clear_cofactor(item: &Affine<Self>) -> Affine<Self>
Performs cofactor clearing.
The default method is simply to multiply by the cofactor.
Some curves can implement a more efficient algorithm.
§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
§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.
§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
§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.
§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
impl Copy for LegacyPallasParameters
impl Eq for LegacyPallasParameters
impl StructuralEq for LegacyPallasParameters
impl StructuralPartialEq for LegacyPallasParameters
Auto Trait Implementations§
impl RefUnwindSafe for LegacyPallasParameters
impl Send for LegacyPallasParameters
impl Sync for LegacyPallasParameters
impl Unpin for LegacyPallasParameters
impl UnwindSafe for LegacyPallasParameters
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§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