Struct pasta_curves::Ep
source · [−]#[repr(C)]pub struct Ep { /* private fields */ }
Expand description
Represents a point in the projective coordinate space.
Implementations
sourceimpl Ep
impl Ep
sourcepub const ISOGENY_CONSTANTS: [Fp; 13] = [
Fp::from_raw([
0x775f6034aaaaaaab,
0x4081775473d8375b,
0xe38e38e38e38e38e,
0x0e38e38e38e38e38,
]),
Fp::from_raw([
0x8cf863b02814fb76,
0x0f93b82ee4b99495,
0x267c7ffa51cf412a,
0x3509afd51872d88e,
]),
Fp::from_raw([
0x0eb64faef37ea4f7,
0x380af066cfeb6d69,
0x98c7d7ac3d98fd13,
0x17329b9ec5253753,
]),
Fp::from_raw([
0xeebec06955555580,
0x8102eea8e7b06eb6,
0xc71c71c71c71c71c,
0x1c71c71c71c71c71,
]),
Fp::from_raw([
0xc47f2ab668bcd71f,
0x9c434ac1c96b6980,
0x5a607fcce0494a79,
0x1d572e7ddc099cff,
]),
Fp::from_raw([
0x2aa3af1eae5b6604,
0xb4abf9fb9a1fc81c,
0x1d13bf2a7f22b105,
0x325669becaecd5d1,
]),
Fp::from_raw([
0x5ad985b5e38e38e4,
0x7642b01ad461bad2,
0x4bda12f684bda12f,
0x1a12f684bda12f68,
]),
Fp::from_raw([
0xc67c31d8140a7dbb,
0x07c9dc17725cca4a,
0x133e3ffd28e7a095,
0x1a84d7ea8c396c47,
]),
Fp::from_raw([
0x02e2be87d225b234,
0x1765e924f7459378,
0x303216cce1db9ff1,
0x3fb98ff0d2ddcadd,
]),
Fp::from_raw([
0x93e53ab371c71c4f,
0x0ac03e8e134eb3e4,
0x7b425ed097b425ed,
0x025ed097b425ed09,
]),
Fp::from_raw([
0x5a28279b1d1b42ae,
0x5941a3a4a97aa1b3,
0x0790bfb3506defb6,
0x0c02c5bcca0e6b7f,
]),
Fp::from_raw([
0x4d90ab820b12320a,
0xd976bbfabbc5661d,
0x573b3d7f7d681310,
0x17033d3c60c68173,
]),
Fp::from_raw([
0x992d30ecfffffde5,
0x224698fc094cf91b,
0x0000000000000000,
0x4000000000000000,
]),
]
pub const ISOGENY_CONSTANTS: [Fp; 13] = [ Fp::from_raw([ 0x775f6034aaaaaaab, 0x4081775473d8375b, 0xe38e38e38e38e38e, 0x0e38e38e38e38e38, ]), Fp::from_raw([ 0x8cf863b02814fb76, 0x0f93b82ee4b99495, 0x267c7ffa51cf412a, 0x3509afd51872d88e, ]), Fp::from_raw([ 0x0eb64faef37ea4f7, 0x380af066cfeb6d69, 0x98c7d7ac3d98fd13, 0x17329b9ec5253753, ]), Fp::from_raw([ 0xeebec06955555580, 0x8102eea8e7b06eb6, 0xc71c71c71c71c71c, 0x1c71c71c71c71c71, ]), Fp::from_raw([ 0xc47f2ab668bcd71f, 0x9c434ac1c96b6980, 0x5a607fcce0494a79, 0x1d572e7ddc099cff, ]), Fp::from_raw([ 0x2aa3af1eae5b6604, 0xb4abf9fb9a1fc81c, 0x1d13bf2a7f22b105, 0x325669becaecd5d1, ]), Fp::from_raw([ 0x5ad985b5e38e38e4, 0x7642b01ad461bad2, 0x4bda12f684bda12f, 0x1a12f684bda12f68, ]), Fp::from_raw([ 0xc67c31d8140a7dbb, 0x07c9dc17725cca4a, 0x133e3ffd28e7a095, 0x1a84d7ea8c396c47, ]), Fp::from_raw([ 0x02e2be87d225b234, 0x1765e924f7459378, 0x303216cce1db9ff1, 0x3fb98ff0d2ddcadd, ]), Fp::from_raw([ 0x93e53ab371c71c4f, 0x0ac03e8e134eb3e4, 0x7b425ed097b425ed, 0x025ed097b425ed09, ]), Fp::from_raw([ 0x5a28279b1d1b42ae, 0x5941a3a4a97aa1b3, 0x0790bfb3506defb6, 0x0c02c5bcca0e6b7f, ]), Fp::from_raw([ 0x4d90ab820b12320a, 0xd976bbfabbc5661d, 0x573b3d7f7d681310, 0x17033d3c60c68173, ]), Fp::from_raw([ 0x992d30ecfffffde5, 0x224698fc094cf91b, 0x0000000000000000, 0x4000000000000000, ]), ]
Constants used for computing the isogeny from IsoEp to Ep.
Trait Implementations
sourceimpl<'b> AddAssign<&'b Ep> for Ep
impl<'b> AddAssign<&'b Ep> for Ep
sourcefn add_assign(&mut self, rhs: &'b Ep)
fn add_assign(&mut self, rhs: &'b Ep)
Performs the +=
operation. Read more
sourceimpl<'b> AddAssign<&'b EpAffine> for Ep
impl<'b> AddAssign<&'b EpAffine> for Ep
sourcefn add_assign(&mut self, rhs: &'b EpAffine)
fn add_assign(&mut self, rhs: &'b EpAffine)
Performs the +=
operation. Read more
sourceimpl AddAssign<Ep> for Ep
impl AddAssign<Ep> for Ep
sourcefn add_assign(&mut self, rhs: Ep)
fn add_assign(&mut self, rhs: Ep)
Performs the +=
operation. Read more
sourceimpl AddAssign<EpAffine> for Ep
impl AddAssign<EpAffine> for Ep
sourcefn add_assign(&mut self, rhs: EpAffine)
fn add_assign(&mut self, rhs: EpAffine)
Performs the +=
operation. Read more
sourceimpl CofactorCurve for Ep
impl CofactorCurve for Ep
sourceimpl CofactorGroup for Ep
impl CofactorGroup for Ep
type Subgroup = Ep
type Subgroup = Ep
The large prime-order subgroup in which cryptographic operations are performed.
If Self
implements PrimeGroup
, then Self::Subgroup
may be Self
. Read more
sourcefn clear_cofactor(&self) -> Self
fn clear_cofactor(&self) -> Self
Maps self
to the prime-order subgroup by multiplying this element by some
k
-multiple of the cofactor. Read more
sourcefn into_subgroup(self) -> CtOption<Self::Subgroup>
fn into_subgroup(self) -> CtOption<Self::Subgroup>
Returns self
if it is contained in the prime-order subgroup. Read more
sourcefn is_torsion_free(&self) -> Choice
fn is_torsion_free(&self) -> Choice
Determines if this element is “torsion free”, i.e., is contained in the prime-order subgroup. Read more
sourcefn is_small_order(&self) -> Choice
fn is_small_order(&self) -> Choice
Determines if this element is of small order. Read more
sourceimpl ConditionallySelectable for Ep
impl ConditionallySelectable for Ep
sourceimpl ConstantTimeEq for Ep
impl ConstantTimeEq for Ep
sourceimpl Curve for Ep
impl Curve for Ep
type AffineRepr = EpAffine
type AffineRepr = EpAffine
The affine representation for this elliptic curve.
sourcefn batch_normalize(p: &[Self], q: &mut [Self::AffineRepr])
fn batch_normalize(p: &[Self], q: &mut [Self::AffineRepr])
Converts a batch of projective elements into affine elements. This function will
panic if p.len() != q.len()
. Read more
sourcefn to_affine(&self) -> Self::AffineRepr
fn to_affine(&self) -> Self::AffineRepr
Converts this element into its affine representation.
sourceimpl CurveExt for Ep
Available on crate feature alloc
only.
impl CurveExt for Ep
alloc
only.sourcefn endo(&self) -> Self
fn endo(&self) -> Self
Apply the curve endomorphism by multiplying the x-coordinate by an element of multiplicative order 3.
sourcefn hash_to_curve<'a>(domain_prefix: &'a str) -> Box<dyn Fn(&[u8]) -> Self + 'a>
fn hash_to_curve<'a>(domain_prefix: &'a str) -> Box<dyn Fn(&[u8]) -> Self + 'a>
Requests a hasher that accepts messages and returns near-uniformly
distributed elements in the group, given domain prefix domain_prefix
. Read more
sourcefn new_jacobian(x: Self::Base, y: Self::Base, z: Self::Base) -> CtOption<Self>
fn new_jacobian(x: Self::Base, y: Self::Base, z: Self::Base) -> CtOption<Self>
Obtains a point given Jacobian coordinates $X : Y : Z$, failing if the coordinates are not on the curve. Read more
sourcefn is_on_curve(&self) -> Choice
fn is_on_curve(&self) -> Choice
Returns whether or not this element is on the curve; should always be true unless an “unchecked” API was used. Read more
sourceimpl Group for Ep
impl Group for Ep
sourceimpl Group for Ep
impl Group for Ep
type Scalar = Fq
type Scalar = Fq
The group is assumed to be of prime order $p$. Scalar
is the
associated scalar field of size $p$. Read more
sourcefn group_zero() -> Self
fn group_zero() -> Self
Returns the additive identity of the group.
sourcefn group_scale(&mut self, by: &Self::Scalar)
fn group_scale(&mut self, by: &Self::Scalar)
Scales this group element by a scalar.
sourceimpl GroupEncoding for Ep
impl GroupEncoding for Ep
sourcefn from_bytes(bytes: &Self::Repr) -> CtOption<Self>
fn from_bytes(bytes: &Self::Repr) -> CtOption<Self>
Attempts to deserialize a group element from its encoding.
sourcefn from_bytes_unchecked(bytes: &Self::Repr) -> CtOption<Self>
fn from_bytes_unchecked(bytes: &Self::Repr) -> CtOption<Self>
Attempts to deserialize a group element, not checking if the element is valid. Read more
sourceimpl<'b> MulAssign<&'b Fq> for Ep
impl<'b> MulAssign<&'b Fq> for Ep
sourcefn mul_assign(&mut self, rhs: &'b Fq)
fn mul_assign(&mut self, rhs: &'b Fq)
Performs the *=
operation. Read more
sourceimpl MulAssign<Fq> for Ep
impl MulAssign<Fq> for Ep
sourcefn mul_assign(&mut self, rhs: Fq)
fn mul_assign(&mut self, rhs: Fq)
Performs the *=
operation. Read more
sourceimpl PrimeCurve for Ep
impl PrimeCurve for Ep
sourceimpl<'b> SubAssign<&'b Ep> for Ep
impl<'b> SubAssign<&'b Ep> for Ep
sourcefn sub_assign(&mut self, rhs: &'b Ep)
fn sub_assign(&mut self, rhs: &'b Ep)
Performs the -=
operation. Read more
sourceimpl<'b> SubAssign<&'b EpAffine> for Ep
impl<'b> SubAssign<&'b EpAffine> for Ep
sourcefn sub_assign(&mut self, rhs: &'b EpAffine)
fn sub_assign(&mut self, rhs: &'b EpAffine)
Performs the -=
operation. Read more
sourceimpl SubAssign<Ep> for Ep
impl SubAssign<Ep> for Ep
sourcefn sub_assign(&mut self, rhs: Ep)
fn sub_assign(&mut self, rhs: Ep)
Performs the -=
operation. Read more
sourceimpl SubAssign<EpAffine> for Ep
impl SubAssign<EpAffine> for Ep
sourcefn sub_assign(&mut self, rhs: EpAffine)
fn sub_assign(&mut self, rhs: EpAffine)
Performs the -=
operation. Read more
sourceimpl WnafGroup for Ep
Available on crate feature alloc
only.
impl WnafGroup for Ep
alloc
only.sourcefn recommended_wnaf_for_num_scalars(num_scalars: usize) -> usize
fn recommended_wnaf_for_num_scalars(num_scalars: usize) -> usize
Recommends a wNAF window size given the number of scalars you intend to multiply a base by. Always returns a number between 2 and 22, inclusive. Read more
impl Copy for Ep
impl Eq for Ep
impl PrimeGroup for Ep
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ConditionallyNegatable for T where
T: ConditionallySelectable,
&'a T: for<'a> Neg,
<&'a T as Neg>::Output == T,
impl<T> ConditionallyNegatable for T where
T: ConditionallySelectable,
&'a T: for<'a> Neg,
<&'a T as Neg>::Output == T,
sourcefn conditional_negate(&mut self, choice: Choice)
fn conditional_negate(&mut self, choice: Choice)
Negate self
if choice == Choice(1)
; otherwise, leave it
unchanged. Read more
impl<T> FmtForward for T
impl<T> FmtForward for T
fn fmt_binary(self) -> FmtBinary<Self> where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self> where
Self: Binary,
Causes self
to use its Binary
implementation when Debug
-formatted. Read more
fn fmt_display(self) -> FmtDisplay<Self> where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self> where
Self: Display,
Causes self
to use its Display
implementation when
Debug
-formatted. Read more
fn fmt_lower_exp(self) -> FmtLowerExp<Self> where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self> where
Self: LowerExp,
Causes self
to use its LowerExp
implementation when
Debug
-formatted. Read more
fn fmt_lower_hex(self) -> FmtLowerHex<Self> where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self> where
Self: LowerHex,
Causes self
to use its LowerHex
implementation when
Debug
-formatted. Read more
fn fmt_octal(self) -> FmtOctal<Self> where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self> where
Self: Octal,
Causes self
to use its Octal
implementation when Debug
-formatted. Read more
fn fmt_pointer(self) -> FmtPointer<Self> where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self> where
Self: Pointer,
Causes self
to use its Pointer
implementation when
Debug
-formatted. Read more
fn fmt_upper_exp(self) -> FmtUpperExp<Self> where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self> where
Self: UpperExp,
Causes self
to use its UpperExp
implementation when
Debug
-formatted. Read more
fn fmt_upper_hex(self) -> FmtUpperHex<Self> where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self> where
Self: UpperHex,
Causes self
to use its UpperHex
implementation when
Debug
-formatted. Read more
fn fmt_list(self) -> FmtList<Self> where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self> where
&'a Self: for<'a> IntoIterator,
Formats each item in a sequence. Read more
impl<T> Pipe for T where
T: ?Sized,
impl<T> Pipe for T where
T: ?Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
Pipes by value. This is generally the method you want to use. Read more
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R where
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R where
R: 'a,
Borrows self
and passes that borrow into the pipe function. Read more
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R where
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R where
R: 'a,
Mutably borrows self
and passes that borrow into the pipe function. Read more
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R where
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R where
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
Borrows self
, then passes self.borrow()
into the pipe function. Read more
fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> R where
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> R where
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
Mutably borrows self
, then passes self.borrow_mut()
into the pipe
function. Read more
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R where
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R where
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
Borrows self
, then passes self.as_ref()
into the pipe function.
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R where
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R where
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
Mutably borrows self
, then passes self.as_mut()
into the pipe
function. Read more
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: Deref<Target = T>,
T: 'a + ?Sized,
R: 'a,
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: Deref<Target = T>,
T: 'a + ?Sized,
R: 'a,
Borrows self
, then passes self.deref()
into the pipe function.
impl<T> Tap for T
impl<T> Tap for T
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self where
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self where
Self: Borrow<B>,
B: ?Sized,
Immutable access to the Borrow<B>
of a value. Read more
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self where
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self where
Self: BorrowMut<B>,
B: ?Sized,
Mutable access to the BorrowMut<B>
of a value. Read more
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self where
Self: AsRef<R>,
R: ?Sized,
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self where
Self: AsRef<R>,
R: ?Sized,
Immutable access to the AsRef<R>
view of a value. Read more
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self where
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self where
Self: AsMut<R>,
R: ?Sized,
Mutable access to the AsMut<R>
view of a value. Read more
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self where
Self: Deref<Target = T>,
T: ?Sized,
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self where
Self: Deref<Target = T>,
T: ?Sized,
Immutable access to the Deref::Target
of a value. Read more
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self where
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self where
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
Mutable access to the Deref::Target
of a value. Read more
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls .tap()
only in debug builds, and is erased in release builds.
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls .tap_mut()
only in debug builds, and is erased in release
builds. Read more
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self where
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self where
Self: Borrow<B>,
B: ?Sized,
Calls .tap_borrow()
only in debug builds, and is erased in release
builds. Read more
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self where
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self where
Self: BorrowMut<B>,
B: ?Sized,
Calls .tap_borrow_mut()
only in debug builds, and is erased in release
builds. Read more
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self where
Self: AsRef<R>,
R: ?Sized,
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self where
Self: AsRef<R>,
R: ?Sized,
Calls .tap_ref()
only in debug builds, and is erased in release
builds. Read more
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self where
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self where
Self: AsMut<R>,
R: ?Sized,
Calls .tap_ref_mut()
only in debug builds, and is erased in release
builds. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more