pub struct StarknetCurveConfig;Expand description
Starknet’s Curve Details.
Trait Implementations§
Source§impl Clone for StarknetCurveConfig
impl Clone for StarknetCurveConfig
Source§fn clone(&self) -> StarknetCurveConfig
fn clone(&self) -> StarknetCurveConfig
Returns a duplicate 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 StarknetCurveConfig
impl CurveConfig for StarknetCurveConfig
Source§const COFACTOR: &'static [u64]
const COFACTOR: &'static [u64]
The cofactor of this curve, represented as a sequence of little-endian
limbs.
Source§const COFACTOR_INV: Fr = Fr::ONE
const COFACTOR_INV: Fr = Fr::ONE
The inverse of the cofactor.
Source§type BaseField = Fp<StarknetFqParam, {
usize::div_ceil(
$bits,
$crate::arithmetic::limb::Limb::BITS as usize,
)
}>
type BaseField = Fp<StarknetFqParam, { usize::div_ceil( $bits, $crate::arithmetic::limb::Limb::BITS as usize, ) }>
Base field that the curve is defined over.
Source§type ScalarField = Fp<StarknetFrParam, {
usize::div_ceil(
$bits,
$crate::arithmetic::limb::Limb::BITS as usize,
)
}>
type ScalarField = Fp<StarknetFrParam, { usize::div_ceil( $bits, $crate::arithmetic::limb::Limb::BITS as usize, ) }>
Finite prime field corresponding to an appropriate prime-order subgroup
of the curve group.
Source§fn cofactor_is_one() -> bool
fn cofactor_is_one() -> bool
Returns
true if the cofactor is one.Source§impl Default for StarknetCurveConfig
impl Default for StarknetCurveConfig
Source§fn default() -> StarknetCurveConfig
fn default() -> StarknetCurveConfig
Returns the “default value” for a type. Read more
Source§impl PartialEq for StarknetCurveConfig
impl PartialEq for StarknetCurveConfig
Source§impl PedersenParams<StarknetCurveConfig> for StarknetPedersenParams
impl PedersenParams<StarknetCurveConfig> for StarknetPedersenParams
Source§const LOW_PART_BITS: u32 = 248u32
const LOW_PART_BITS: u32 = 248u32
Low part bits.
Source§const LOW_PART_MASK: U256
const LOW_PART_MASK: U256
Low part mask. (2**248 - 1)
Source§const N_ELEMENT_BITS_HASH: usize = 252usize
const N_ELEMENT_BITS_HASH: usize = 252usize
Number of elements in the hash.
Source§const P_0: Affine<StarknetCurveConfig>
const P_0: Affine<StarknetCurveConfig>
Shift point.
Source§const P_1: Affine<StarknetCurveConfig>
const P_1: Affine<StarknetCurveConfig>
Constant point –
P_1.Source§const P_2: Affine<StarknetCurveConfig>
const P_2: Affine<StarknetCurveConfig>
Constant point –
P_2.Source§const P_3: Affine<StarknetCurveConfig>
const P_3: Affine<StarknetCurveConfig>
Constant point –
P_3.Source§const P_4: Affine<StarknetCurveConfig>
const P_4: Affine<StarknetCurveConfig>
Constant point –
P_4.Source§type AffineRepr = Affine<StarknetCurveConfig>
type AffineRepr = Affine<StarknetCurveConfig>
The affine representation type for this Elliptic Curve.
Source§impl SWCurveConfig for StarknetCurveConfig
impl SWCurveConfig for StarknetCurveConfig
Source§const GENERATOR: Affine<StarknetCurveConfig>
const GENERATOR: Affine<StarknetCurveConfig>
Generator of the prime-order subgroup.
Source§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 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_prime_order_subgroup(item: &Affine<Self>) -> bool
fn is_in_prime_order_subgroup(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: impl BitIteratorBE,
) -> Projective<Self>
fn mul_projective( base: &Projective<Self>, scalar: impl BitIteratorBE, ) -> Projective<Self>
Default implementation of group multiplication for projective
coordinates.
Source§fn mul_affine(
base: &Affine<Self>,
scalar: impl BitIteratorBE,
) -> Projective<Self>
fn mul_affine( base: &Affine<Self>, scalar: impl BitIteratorBE, ) -> Projective<Self>
Default implementation of group multiplication for affine
coordinates.
impl Eq for StarknetCurveConfig
impl StructuralPartialEq for StarknetCurveConfig
Auto Trait Implementations§
impl Freeze for StarknetCurveConfig
impl RefUnwindSafe for StarknetCurveConfig
impl Send for StarknetCurveConfig
impl Sync for StarknetCurveConfig
impl Unpin for StarknetCurveConfig
impl UnwindSafe for StarknetCurveConfig
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