Struct ark_pallas::PallasConfig
source · pub struct PallasConfig;
Trait Implementations§
source§impl Clone for PallasConfig
impl Clone for PallasConfig
source§fn clone(&self) -> PallasConfig
fn clone(&self) -> PallasConfig
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 PallasConfig
impl CurveConfig for PallasConfig
source§const COFACTOR_INV: Fr = Fr::ONE
const COFACTOR_INV: Fr = Fr::ONE
COFACTOR_INV = 1
§type BaseField = Fp<MontBackend<FqConfig, 4>, 4>
type BaseField = Fp<MontBackend<FqConfig, 4>, 4>
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 Default for PallasConfig
impl Default for PallasConfig
source§fn default() -> PallasConfig
fn default() -> PallasConfig
Returns the “default value” for a type. Read more
source§impl PartialEq<PallasConfig> for PallasConfig
impl PartialEq<PallasConfig> for PallasConfig
source§fn eq(&self, other: &PallasConfig) -> bool
fn eq(&self, other: &PallasConfig) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl SWCurveConfig for PallasConfig
impl SWCurveConfig for PallasConfig
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 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 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.
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
impl Copy for PallasConfig
impl Eq for PallasConfig
impl StructuralEq for PallasConfig
impl StructuralPartialEq for PallasConfig
Auto Trait Implementations§
impl RefUnwindSafe for PallasConfig
impl Send for PallasConfig
impl Sync for PallasConfig
impl Unpin for PallasConfig
impl UnwindSafe for PallasConfig
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