Skip to main content

EdwardsPoint

Struct EdwardsPoint 

Source
pub struct EdwardsPoint {
    pub(crate) X: FieldElement,
    pub(crate) Y: FieldElement,
    pub(crate) Z: FieldElement,
    pub(crate) T: FieldElement,
}
Expand description

Represent points on the (untwisted) edwards curve using Extended Homogenous Projective Co-ordinates (x, y) -> (X/Z, Y/Z, Z, T) a = 1, d = -39081 XXX: Make this more descriptive Should this be renamed to EdwardsPoint so that we are consistent with Dalek crypto? Necessary as ExtendedPoint is not regular lingo?

Fields§

§X: FieldElement§Y: FieldElement§Z: FieldElement§T: FieldElement

Implementations§

Source§

impl EdwardsPoint

Source

pub const GENERATOR: Self = GOLDILOCKS_BASE_POINT

Generator for the prime subgroup

Source

pub const IDENTITY: Self

Identity point

Source

pub fn to_montgomery(&self) -> MontgomeryPoint

Convert this point to MontgomeryPoint

Source

pub fn scalar_mul(&self, scalar: &EdwardsScalar) -> Self

Generic scalar multiplication to compute s*P

Source

pub fn add(&self, other: &EdwardsPoint) -> Self

Add two points

Source

pub fn double(&self) -> Self

Double this point

Source

pub fn is_on_curve(&self) -> Choice

Check if this point is on the curve

Source

pub fn to_affine(&self) -> AffinePoint

Convert this point to an AffinePoint.

Source

pub(crate) fn to_twisted(self) -> TwistedExtensiblePoint

Source

pub fn negate(&self) -> Self

Compute the negation of this point’s x-coordinate.

Source

pub fn torque(&self) -> Self

Compute the negation of this point’s y-coordinate.

Source

pub fn is_torsion_free(&self) -> Choice

Determine if this point is “torsion-free”, i.e., is contained in the prime-order subgroup.

§Return
  • true if self has zero torsion component and is in the prime-order subgroup;
  • false if self has a nonzero torsion component and is not in the prime-order subgroup.

Trait Implementations§

Source§

impl Add for EdwardsPoint

Source§

type Output = EdwardsPoint

The resulting type after applying the + operator.
Source§

fn add(self, rhs: EdwardsPoint) -> EdwardsPoint

Performs the + operation. Read more
Source§

impl<'b> Add<&'b AffinePoint> for EdwardsPoint

Source§

type Output = EdwardsPoint

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &'b AffinePoint) -> EdwardsPoint

Performs the + operation. Read more
Source§

impl<'b> Add<&'b EdwardsPoint> for EdwardsPoint

Source§

type Output = EdwardsPoint

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &'b EdwardsPoint) -> EdwardsPoint

Performs the + operation. Read more
Source§

impl<'b> Add<&'b EdwardsPoint> for AffinePoint

Source§

type Output = EdwardsPoint

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &'b EdwardsPoint) -> EdwardsPoint

Performs the + operation. Read more
Source§

impl Add<&AffinePoint> for &EdwardsPoint

Source§

type Output = EdwardsPoint

The resulting type after applying the + operator.
Source§

fn add(self, other: &AffinePoint) -> EdwardsPoint

Performs the + operation. Read more
Source§

impl Add<&EdwardsPoint> for &EdwardsPoint

Source§

type Output = EdwardsPoint

The resulting type after applying the + operator.
Source§

fn add(self, other: &EdwardsPoint) -> EdwardsPoint

Performs the + operation. Read more
Source§

impl Add<&EdwardsPoint> for &AffinePoint

Source§

type Output = EdwardsPoint

The resulting type after applying the + operator.
Source§

fn add(self, other: &EdwardsPoint) -> EdwardsPoint

Performs the + operation. Read more
Source§

impl<'a> Add<AffinePoint> for &'a EdwardsPoint

Source§

type Output = EdwardsPoint

The resulting type after applying the + operator.
Source§

fn add(self, rhs: AffinePoint) -> EdwardsPoint

Performs the + operation. Read more
Source§

impl Add<AffinePoint> for EdwardsPoint

Source§

type Output = EdwardsPoint

The resulting type after applying the + operator.
Source§

fn add(self, rhs: AffinePoint) -> EdwardsPoint

Performs the + operation. Read more
Source§

impl<'a> Add<EdwardsPoint> for &'a EdwardsPoint

Source§

type Output = EdwardsPoint

The resulting type after applying the + operator.
Source§

fn add(self, rhs: EdwardsPoint) -> EdwardsPoint

Performs the + operation. Read more
Source§

impl<'a> Add<EdwardsPoint> for &'a AffinePoint

Source§

type Output = EdwardsPoint

The resulting type after applying the + operator.
Source§

fn add(self, rhs: EdwardsPoint) -> EdwardsPoint

Performs the + operation. Read more
Source§

impl Add<EdwardsPoint> for AffinePoint

Source§

type Output = EdwardsPoint

The resulting type after applying the + operator.
Source§

fn add(self, rhs: EdwardsPoint) -> EdwardsPoint

Performs the + operation. Read more
Source§

impl AddAssign for EdwardsPoint

Source§

fn add_assign(&mut self, rhs: EdwardsPoint)

Performs the += operation. Read more
Source§

impl<'b> AddAssign<&'b EdwardsPoint> for EdwardsPoint

Source§

fn add_assign(&mut self, _rhs: &'b EdwardsPoint)

Performs the += operation. Read more
Source§

impl AddAssign<&AffinePoint> for EdwardsPoint

Source§

fn add_assign(&mut self, rhs: &AffinePoint)

Performs the += operation. Read more
Source§

impl AddAssign<&EdwardsPoint> for AffinePoint

Source§

fn add_assign(&mut self, rhs: &EdwardsPoint)

Performs the += operation. Read more
Source§

impl AddAssign<AffinePoint> for EdwardsPoint

Source§

fn add_assign(&mut self, rhs: AffinePoint)

Performs the += operation. Read more
Source§

impl AddAssign<EdwardsPoint> for AffinePoint

Source§

fn add_assign(&mut self, rhs: EdwardsPoint)

Performs the += operation. Read more
Source§

impl<const N: usize> BatchNormalize<[EdwardsPoint; N]> for EdwardsPoint

Source§

type Output = [<EdwardsPoint as Curve>::Affine; N]

The output of the batch normalization; a container of affine points.
Source§

fn batch_normalize(points: &[Self; N]) -> [<Self as CurveGroup>::Affine; N]

Perform a batched conversion to affine representation on a sequence of projective points at an amortized cost that should be practically as efficient as a single conversion. Internally, implementors should rely upon InvertBatch.
Source§

fn batch_normalize_vartime(points: &Points) -> Self::Output

Perform a batched conversion to affine representation on a sequence of projective points in variable-time. Read more
Source§

impl BatchNormalize<[EdwardsPoint]> for EdwardsPoint

Available on crate feature alloc only.
Source§

type Output = Vec<<EdwardsPoint as Curve>::Affine>

The output of the batch normalization; a container of affine points.
Source§

fn batch_normalize(points: &[Self]) -> Vec<<Self as CurveGroup>::Affine>

Perform a batched conversion to affine representation on a sequence of projective points at an amortized cost that should be practically as efficient as a single conversion. Internally, implementors should rely upon InvertBatch.
Source§

fn batch_normalize_vartime(points: &Points) -> Self::Output

Perform a batched conversion to affine representation on a sequence of projective points in variable-time. Read more
Source§

impl Clone for EdwardsPoint

Source§

fn clone(&self) -> EdwardsPoint

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl CofactorGroup for EdwardsPoint

Source§

type Subgroup = EdwardsPoint

The large prime-order subgroup in which cryptographic operations are performed. If Self implements PrimeGroup, then Self::Subgroup may be Self.
Source§

fn clear_cofactor(&self) -> Self::Subgroup

Maps self to the prime-order subgroup by multiplying this element by some k-multiple of the cofactor. Read more
Source§

fn into_subgroup(self) -> CtOption<Self::Subgroup>

Returns self if it is contained in the prime-order subgroup. Read more
Source§

fn is_torsion_free(&self) -> Choice

Determines if this element is “torsion free”, i.e., is contained in the prime-order subgroup. Read more
Source§

fn is_small_order(&self) -> Choice

Determines if this element is of small order. Read more
Source§

impl ConditionallySelectable for EdwardsPoint

Source§

fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self

Select a or b according to choice. Read more
Source§

fn conditional_assign(&mut self, other: &Self, choice: Choice)

Conditionally assign other to self, according to choice. Read more
Source§

fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)

Conditionally swap self and other if choice == 1; otherwise, reassign both unto themselves. Read more
Source§

impl ConstantTimeEq for EdwardsPoint

Source§

fn ct_eq(&self, other: &Self) -> Choice

Determine if two items are equal. Read more
Source§

fn ct_ne(&self, other: &Self) -> Choice

Determine if two items are NOT equal. Read more
Source§

impl Copy for EdwardsPoint

Source§

impl CtEq for EdwardsPoint

Source§

fn ct_eq(&self, other: &Self) -> Choice

Determine if self is equal to other in constant-time.
Source§

fn ct_ne(&self, other: &Rhs) -> Choice

Determine if self is NOT equal to other in constant-time.
Source§

impl CtSelect for EdwardsPoint

Source§

fn ct_select(&self, other: &Self, choice: Choice) -> Self

Select between self and other based on choice, returning a copy of the value. Read more
Source§

fn ct_swap(&mut self, other: &mut Self, choice: Choice)

Conditionally swap self and other if choice is Choice::TRUE.
Source§

impl Curve for EdwardsPoint

Source§

type Affine = AffinePoint

The affine representation for this elliptic curve.
Source§

fn to_affine(&self) -> AffinePoint

Converts this element into its affine representation.
Source§

fn batch_normalize(projective: &[Self], affine: &mut [Self::Affine])

Converts a batch of projective elements into affine elements. This function will panic if p.len() != q.len().
Source§

impl Debug for EdwardsPoint

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for EdwardsPoint

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl DefaultIsZeroes for EdwardsPoint

Source§

impl Display for EdwardsPoint

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult

Formats the value using the given formatter. Read more
Source§

impl Eq for EdwardsPoint

Source§

impl From<&AffinePoint> for EdwardsPoint

Source§

fn from(value: &AffinePoint) -> Self

Converts to this type from the input type.
Source§

impl From<&DecafPoint> for EdwardsPoint

Source§

fn from(point: &DecafPoint) -> Self

Converts to this type from the input type.
Source§

impl From<&EdwardsPoint> for DecafPoint

Source§

fn from(point: &EdwardsPoint) -> Self

Converts to this type from the input type.
Source§

impl From<&EdwardsPoint> for Vec<u8>

Available on crate feature alloc only.
Source§

fn from(value: &EdwardsPoint) -> Self

Converts to this type from the input type.
Source§

impl From<&EdwardsPoint> for [u8; 57]

Source§

fn from(value: &EdwardsPoint) -> Self

Converts to this type from the input type.
Source§

impl From<&EdwardsPoint> for AffinePoint

Source§

fn from(value: &EdwardsPoint) -> Self

Converts to this type from the input type.
Source§

impl From<AffinePoint> for EdwardsPoint

Source§

fn from(value: AffinePoint) -> Self

Converts to this type from the input type.
Source§

impl From<DecafPoint> for EdwardsPoint

Source§

fn from(point: DecafPoint) -> Self

Converts to this type from the input type.
Source§

impl From<EdwardsPoint> for DecafPoint

Source§

fn from(point: EdwardsPoint) -> Self

Converts to this type from the input type.
Source§

impl From<EdwardsPoint> for Vec<u8>

Available on crate feature alloc only.
Source§

fn from(value: EdwardsPoint) -> Self

Converts to this type from the input type.
Source§

impl From<EdwardsPoint> for [u8; 57]

Source§

fn from(value: EdwardsPoint) -> Self

Converts to this type from the input type.
Source§

impl From<EdwardsPoint> for AffinePoint

Source§

fn from(value: EdwardsPoint) -> Self

Converts to this type from the input type.
Source§

impl From<NonIdentity<EdwardsPoint>> for EdwardsPoint

Source§

fn from(p: NonIdentity<EdwardsPoint>) -> Self

Converts to this type from the input type.
Source§

impl Generate for EdwardsPoint

Source§

fn try_generate_from_rng<R: TryCryptoRng + ?Sized>( rng: &mut R, ) -> Result<Self, R::Error>

Generate random key using the provided TryCryptoRng. Read more
Source§

fn generate_from_rng<R>(rng: &mut R) -> Self
where R: CryptoRng + ?Sized,

Generate random key using the provided CryptoRng.
Source§

fn try_generate() -> Result<Self, Error>

Randomly generate a value of this type using the system’s ambient cryptographically secure random number generator. Read more
Source§

fn generate() -> Self

Randomly generate a value of this type using the system’s ambient cryptographically secure random number generator. Read more
Source§

impl Group for EdwardsPoint

Source§

type Scalar = Scalar<Ed448>

Scalars modulo the order of this group’s scalar field.
Source§

fn try_random<R>(rng: &mut R) -> Result<Self, R::Error>
where R: TryRng + ?Sized,

Returns an element chosen uniformly at random from the non-identity elements of this group using a user-provided fallible RNG. Read more
Source§

fn identity() -> Self

Returns the additive identity, also known as the “neutral element”.
Source§

fn generator() -> Self

Returns a fixed generator of the prime-order subgroup.
Source§

fn is_identity(&self) -> Choice

Determines if this point is the identity.
Source§

fn double(&self) -> Self

Doubles this element.
Source§

fn random<R>(rng: &mut R) -> Self
where R: Rng + ?Sized,

Returns an element chosen uniformly at random from the non-identity elements of this group using a user-provided infallible RNG. Read more
Source§

fn mul_by_generator(scalar: &Self::Scalar) -> Self

Multiply by the generator of the prime-order subgroup.
Source§

impl GroupEncoding for EdwardsPoint

Source§

type Repr = Array<u8, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B1>, B0>, B0>, B1>>

The encoding of group elements. Read more
Source§

fn from_bytes(bytes: &Self::Repr) -> CtOption<Self>

Attempts to deserialize a group element from its encoding.
Source§

fn from_bytes_unchecked(bytes: &Self::Repr) -> CtOption<Self>

Attempts to deserialize a group element, not checking if the element is valid. Read more
Source§

fn to_bytes(&self) -> Self::Repr

Converts this element into its byte encoding. This may or may not support encoding the identity.
Source§

impl<const N: usize> LinearCombination<[(EdwardsPoint, Scalar<Ed448>); N]> for EdwardsPoint

Source§

fn lincomb(points_and_scalars: &PointsAndScalars) -> Self

Calculates x1 * k1 + ... + xn * kn.
Source§

fn lincomb_vartime(points_and_scalars: &PointsAndScalars) -> Self

Calculates x1 * k1 + ... + xn * kn. Read more
Source§

impl LinearCombination<[(EdwardsPoint, Scalar<Ed448>)]> for EdwardsPoint

Source§

fn lincomb(points_and_scalars: &PointsAndScalars) -> Self

Calculates x1 * k1 + ... + xn * kn.
Source§

fn lincomb_vartime(points_and_scalars: &PointsAndScalars) -> Self

Calculates x1 * k1 + ... + xn * kn. Read more
Source§

impl LowerHex for EdwardsPoint

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult

Formats the value using the given formatter. Read more
Source§

impl<'b> Mul<&'b Scalar<Ed448>> for EdwardsPoint

Source§

type Output = EdwardsPoint

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &'b EdwardsScalar) -> EdwardsPoint

Performs the * operation. Read more
Source§

impl Mul<&Scalar<Ed448>> for &EdwardsPoint

Source§

fn mul(self, scalar: &EdwardsScalar) -> EdwardsPoint

Scalar multiplication: compute scalar * self.

Source§

type Output = EdwardsPoint

The resulting type after applying the * operator.
Source§

impl<'a> Mul<Scalar<Ed448>> for &'a EdwardsPoint

Source§

type Output = EdwardsPoint

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: EdwardsScalar) -> EdwardsPoint

Performs the * operation. Read more
Source§

impl Mul<Scalar<Ed448>> for EdwardsPoint

Source§

type Output = EdwardsPoint

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: EdwardsScalar) -> EdwardsPoint

Performs the * operation. Read more
Source§

impl<'b> MulAssign<&'b Scalar<Ed448>> for EdwardsPoint

Source§

fn mul_assign(&mut self, scalar: &'b EdwardsScalar)

Performs the *= operation. Read more
Source§

impl MulAssign<Scalar<Ed448>> for EdwardsPoint

Source§

fn mul_assign(&mut self, rhs: EdwardsScalar)

Performs the *= operation. Read more
Source§

impl MulByGeneratorVartime for EdwardsPoint

Source§

fn mul_by_generator_vartime(scalar: &Self::Scalar) -> Self

Multiply by the generator of the prime-order subgroup. Read more
Source§

fn mul_by_generator_and_mul_add_vartime( a: &Self::Scalar, b: &Self::Scalar, p: &Self, ) -> Self

Multiply a by the generator of the prime-order subgroup, adding the result to the point P multiplied by the scalar b, i.e. compute aG + bP. Read more
Source§

impl MulVartime<&Scalar<Ed448>> for EdwardsPoint

Source§

fn mul_vartime(self, scalar: &EdwardsScalar) -> EdwardsPoint

Multiply self by rhs in variable-time.
Source§

impl MulVartime<&Scalar<Ed448>> for &EdwardsPoint

Source§

fn mul_vartime(self, scalar: &EdwardsScalar) -> EdwardsPoint

Multiply self by rhs in variable-time.
Source§

impl MulVartime<Scalar<Ed448>> for EdwardsPoint

Source§

fn mul_vartime(self, scalar: EdwardsScalar) -> EdwardsPoint

Multiply self by rhs in variable-time.
Source§

impl Neg for &EdwardsPoint

Source§

type Output = EdwardsPoint

The resulting type after applying the - operator.
Source§

fn neg(self) -> EdwardsPoint

Performs the unary - operation. Read more
Source§

impl Neg for EdwardsPoint

Source§

type Output = EdwardsPoint

The resulting type after applying the - operator.
Source§

fn neg(self) -> EdwardsPoint

Performs the unary - operation. Read more
Source§

impl PartialEq for EdwardsPoint

Source§

fn eq(&self, other: &EdwardsPoint) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PrimeGroup for EdwardsPoint

Source§

impl Sub for EdwardsPoint

Source§

type Output = EdwardsPoint

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: EdwardsPoint) -> EdwardsPoint

Performs the - operation. Read more
Source§

impl<'b> Sub<&'b AffinePoint> for EdwardsPoint

Source§

type Output = EdwardsPoint

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &'b AffinePoint) -> EdwardsPoint

Performs the - operation. Read more
Source§

impl<'b> Sub<&'b EdwardsPoint> for EdwardsPoint

Source§

type Output = EdwardsPoint

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &'b EdwardsPoint) -> EdwardsPoint

Performs the - operation. Read more
Source§

impl<'b> Sub<&'b EdwardsPoint> for AffinePoint

Source§

type Output = EdwardsPoint

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &'b EdwardsPoint) -> EdwardsPoint

Performs the - operation. Read more
Source§

impl Sub<&AffinePoint> for &EdwardsPoint

Source§

type Output = EdwardsPoint

The resulting type after applying the - operator.
Source§

fn sub(self, other: &AffinePoint) -> EdwardsPoint

Performs the - operation. Read more
Source§

impl Sub<&EdwardsPoint> for &EdwardsPoint

Source§

type Output = EdwardsPoint

The resulting type after applying the - operator.
Source§

fn sub(self, other: &EdwardsPoint) -> EdwardsPoint

Performs the - operation. Read more
Source§

impl Sub<&EdwardsPoint> for &AffinePoint

Source§

type Output = EdwardsPoint

The resulting type after applying the - operator.
Source§

fn sub(self, other: &EdwardsPoint) -> EdwardsPoint

Performs the - operation. Read more
Source§

impl<'a> Sub<AffinePoint> for &'a EdwardsPoint

Source§

type Output = EdwardsPoint

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: AffinePoint) -> EdwardsPoint

Performs the - operation. Read more
Source§

impl Sub<AffinePoint> for EdwardsPoint

Source§

type Output = EdwardsPoint

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: AffinePoint) -> EdwardsPoint

Performs the - operation. Read more
Source§

impl<'a> Sub<EdwardsPoint> for &'a EdwardsPoint

Source§

type Output = EdwardsPoint

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: EdwardsPoint) -> EdwardsPoint

Performs the - operation. Read more
Source§

impl<'a> Sub<EdwardsPoint> for &'a AffinePoint

Source§

type Output = EdwardsPoint

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: EdwardsPoint) -> EdwardsPoint

Performs the - operation. Read more
Source§

impl Sub<EdwardsPoint> for AffinePoint

Source§

type Output = EdwardsPoint

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: EdwardsPoint) -> EdwardsPoint

Performs the - operation. Read more
Source§

impl SubAssign for EdwardsPoint

Source§

fn sub_assign(&mut self, rhs: EdwardsPoint)

Performs the -= operation. Read more
Source§

impl<'b> SubAssign<&'b EdwardsPoint> for EdwardsPoint

Source§

fn sub_assign(&mut self, _rhs: &'b EdwardsPoint)

Performs the -= operation. Read more
Source§

impl SubAssign<&AffinePoint> for EdwardsPoint

Source§

fn sub_assign(&mut self, rhs: &AffinePoint)

Performs the -= operation. Read more
Source§

impl SubAssign<&EdwardsPoint> for AffinePoint

Source§

fn sub_assign(&mut self, rhs: &EdwardsPoint)

Performs the -= operation. Read more
Source§

impl SubAssign<AffinePoint> for EdwardsPoint

Source§

fn sub_assign(&mut self, rhs: AffinePoint)

Performs the -= operation. Read more
Source§

impl SubAssign<EdwardsPoint> for AffinePoint

Source§

fn sub_assign(&mut self, rhs: EdwardsPoint)

Performs the -= operation. Read more
Source§

impl<T> Sum<T> for EdwardsPoint
where T: Borrow<EdwardsPoint>,

Source§

fn sum<I>(iter: I) -> Self
where I: Iterator<Item = T>,

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl TryFrom<&Vec<u8>> for EdwardsPoint

Available on crate feature alloc only.
Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_from(value: &Vec<u8>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<&[u8; 57]> for EdwardsPoint

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_from(value: &[u8; 57]) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<&[u8]> for EdwardsPoint

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_from(value: &[u8]) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<Box<[u8]>> for EdwardsPoint

Available on crate feature alloc only.
Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_from(value: Box<[u8]>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<EdwardsPoint> for NonIdentity<EdwardsPoint>

The constant-time alternative is available at NonIdentity::new().

Source§

type Error = Error

The type returned in the event of a conversion error.
Source§

fn try_from(point: EdwardsPoint) -> Result<Self, Error>

Performs the conversion.
Source§

impl TryFrom<Vec<u8>> for EdwardsPoint

Available on crate feature alloc only.
Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_from(value: Vec<u8>) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<[u8; 57]> for EdwardsPoint

Source§

type Error = &'static str

The type returned in the event of a conversion error.
Source§

fn try_from(value: [u8; 57]) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl UpperHex for EdwardsPoint

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> ConditionallyNegatable for T
where T: ConditionallySelectable, &'a T: for<'a> Neg<Output = T>,

Source§

fn conditional_negate(&mut self, choice: Choice)

Negate self if choice == Choice(1); otherwise, leave it unchanged. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, Rhs, Output> GroupOps<Rhs, Output> for T
where T: Add<Rhs, Output = Output> + Sub<Rhs, Output = Output> + AddAssign<Rhs> + SubAssign<Rhs>,

Source§

impl<T, Rhs, Output> GroupOpsOwned<Rhs, Output> for T
where T: for<'r> GroupOps<&'r Rhs, Output>,

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, Rhs, Output> ScalarMul<Rhs, Output> for T
where T: Mul<Rhs, Output = Output> + MulAssign<Rhs>,

Source§

impl<T, Rhs, Output> ScalarMulOwned<Rhs, Output> for T
where T: for<'r> ScalarMul<&'r Rhs, Output>,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<Z> Zeroize for Z
where Z: DefaultIsZeroes,

Source§

fn zeroize(&mut self)

Zero out this object from memory using Rust intrinsics which ensure the zeroization operation is not “optimized away” by the compiler.