Struct ecdsa::EncodedPoint
source ·
[−]pub struct EncodedPoint<C> where
C: Curve,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: Add<UInt<UTerm, B1>>,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: ArrayLength<u8>,
<<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output as Add<UInt<UTerm, B1>>>::Output: ArrayLength<u8>, { /* private fields */ }
Expand description
SEC1 encoded curve point.
This type is an enum over the compressed and uncompressed encodings, useful for cases where either encoding can be supported, or conversions between the two forms.
Implementations
impl<C> EncodedPoint<C> where
C: Curve,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: Add<UInt<UTerm, B1>>,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: ArrayLength<u8>,
<<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output as Add<UInt<UTerm, B1>>>::Output: ArrayLength<u8>,
impl<C> EncodedPoint<C> where
C: Curve,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: Add<UInt<UTerm, B1>>,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: ArrayLength<u8>,
<<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output as Add<UInt<UTerm, B1>>>::Output: ArrayLength<u8>,
Decode elliptic curve point (compressed or uncompressed) from the
Elliptic-Curve-Point-to-Octet-String
encoding described in
SEC 1: Elliptic Curve Cryptography (Version 2.0) section
2.3.3 (page 10).
pub fn from_untagged_bytes(
bytes: &GenericArray<u8, <<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output>
) -> EncodedPoint<C>
pub fn from_untagged_bytes(
bytes: &GenericArray<u8, <<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output>
) -> EncodedPoint<C>
Decode elliptic curve point from raw uncompressed coordinates, i.e.
encoded as the concatenated x || y
coordinates with no leading SEC1
tag byte (which would otherwise be 0x04
for an uncompressed point).
pub fn from_affine_coordinates(
x: &GenericArray<u8, <C as Curve>::FieldSize>,
y: &GenericArray<u8, <C as Curve>::FieldSize>,
compress: bool
) -> EncodedPoint<C>
pub fn from_affine_coordinates(
x: &GenericArray<u8, <C as Curve>::FieldSize>,
y: &GenericArray<u8, <C as Curve>::FieldSize>,
compress: bool
) -> EncodedPoint<C>
Encode an elliptic curve point from big endian serialized coordinates (with optional point compression)
pub fn from_secret_key(
secret_key: &SecretKey<C>,
compress: bool
) -> EncodedPoint<C> where
C: Curve + ProjectiveArithmetic,
GenericArray<u8, <C as Curve>::FieldSize>: From<<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar>,
GenericArray<u8, <C as Curve>::FieldSize>: for<'r> From<&'r <<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar>,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: ToEncodedPoint<C>,
<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar: PrimeField,
<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar: Zeroize,
<<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar as PrimeField>::Repr == GenericArray<u8, <C as Curve>::FieldSize>,
pub fn from_secret_key(
secret_key: &SecretKey<C>,
compress: bool
) -> EncodedPoint<C> where
C: Curve + ProjectiveArithmetic,
GenericArray<u8, <C as Curve>::FieldSize>: From<<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar>,
GenericArray<u8, <C as Curve>::FieldSize>: for<'r> From<&'r <<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar>,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: ToEncodedPoint<C>,
<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar: PrimeField,
<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar: Zeroize,
<<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar as PrimeField>::Repr == GenericArray<u8, <C as Curve>::FieldSize>,
Compute EncodedPoint
representing the public key for the provided
SecretKey
.
The compress
flag requests point compression.
Return EncodedPoint
representing the additive identity
(a.k.a. point at infinity)
pub fn to_untagged_bytes(
&self
) -> Option<GenericArray<u8, <<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output>> where
C: Curve + ProjectiveArithmetic,
GenericArray<u8, <C as Curve>::FieldSize>: From<<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar>,
GenericArray<u8, <C as Curve>::FieldSize>: for<'r> From<&'r <<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar>,
<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar: PrimeField,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: ConditionallySelectable,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: Default,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: Decompress<C>,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: ToEncodedPoint<C>,
<<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar as PrimeField>::Repr == GenericArray<u8, <C as Curve>::FieldSize>,
pub fn to_untagged_bytes(
&self
) -> Option<GenericArray<u8, <<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output>> where
C: Curve + ProjectiveArithmetic,
GenericArray<u8, <C as Curve>::FieldSize>: From<<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar>,
GenericArray<u8, <C as Curve>::FieldSize>: for<'r> From<&'r <<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar>,
<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar: PrimeField,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: ConditionallySelectable,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: Default,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: Decompress<C>,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: ToEncodedPoint<C>,
<<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar as PrimeField>::Repr == GenericArray<u8, <C as Curve>::FieldSize>,
Serialize point as raw uncompressed coordinates without tag byte, i.e.
encoded as the concatenated x || y
coordinates.
Is this EncodedPoint
the additive identity? (a.k.a. point at infinity)
Is this EncodedPoint
compressed?
Compress this EncodedPoint
, returning a new EncodedPoint
.
pub fn decompress(&self) -> Option<EncodedPoint<C>> where
C: Curve + ProjectiveArithmetic,
GenericArray<u8, <C as Curve>::FieldSize>: From<<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar>,
GenericArray<u8, <C as Curve>::FieldSize>: for<'r> From<&'r <<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar>,
<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar: PrimeField,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: ConditionallySelectable,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: Default,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: Decompress<C>,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: ToEncodedPoint<C>,
<<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar as PrimeField>::Repr == GenericArray<u8, <C as Curve>::FieldSize>,
pub fn decompress(&self) -> Option<EncodedPoint<C>> where
C: Curve + ProjectiveArithmetic,
GenericArray<u8, <C as Curve>::FieldSize>: From<<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar>,
GenericArray<u8, <C as Curve>::FieldSize>: for<'r> From<&'r <<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar>,
<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar: PrimeField,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: ConditionallySelectable,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: Default,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: Decompress<C>,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: ToEncodedPoint<C>,
<<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar as PrimeField>::Repr == GenericArray<u8, <C as Curve>::FieldSize>,
Decompress this EncodedPoint
, returning a new EncodedPoint
.
Encode an EncodedPoint
from the desired type
Decode this EncodedPoint
into the desired type
Get the SEC1 tag for this EncodedPoint
Get the Coordinates
for this EncodedPoint
.
Get the x-coordinate for this EncodedPoint
.
Returns None
if this point is the identity point.
Get the y-coordinate for this EncodedPoint
.
Returns None
if this point is compressed or the identity point.
Trait Implementations
impl<C> AsRef<[u8]> for EncodedPoint<C> where
C: Curve,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: Add<UInt<UTerm, B1>>,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: ArrayLength<u8>,
<<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output as Add<UInt<UTerm, B1>>>::Output: ArrayLength<u8>,
impl<C> AsRef<[u8]> for EncodedPoint<C> where
C: Curve,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: Add<UInt<UTerm, B1>>,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: ArrayLength<u8>,
<<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output as Add<UInt<UTerm, B1>>>::Output: ArrayLength<u8>,
impl<C> Clone for EncodedPoint<C> where
C: Clone + Curve,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: Add<UInt<UTerm, B1>>,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: ArrayLength<u8>,
<<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output as Add<UInt<UTerm, B1>>>::Output: ArrayLength<u8>,
impl<C> Clone for EncodedPoint<C> where
C: Clone + Curve,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: Add<UInt<UTerm, B1>>,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: ArrayLength<u8>,
<<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output as Add<UInt<UTerm, B1>>>::Output: ArrayLength<u8>,
impl<C> ConditionallySelectable for EncodedPoint<C> where
C: Curve,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: Add<UInt<UTerm, B1>>,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: ArrayLength<u8>,
<<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output as Add<UInt<UTerm, B1>>>::Output: ArrayLength<u8>,
<<<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output as Add<UInt<UTerm, B1>>>::Output as ArrayLength<u8>>::ArrayType: Copy,
impl<C> ConditionallySelectable for EncodedPoint<C> where
C: Curve,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: Add<UInt<UTerm, B1>>,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: ArrayLength<u8>,
<<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output as Add<UInt<UTerm, B1>>>::Output: ArrayLength<u8>,
<<<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output as Add<UInt<UTerm, B1>>>::Output as ArrayLength<u8>>::ArrayType: Copy,
pub fn conditional_select(
a: &EncodedPoint<C>,
b: &EncodedPoint<C>,
choice: Choice
) -> EncodedPoint<C>
pub fn conditional_select(
a: &EncodedPoint<C>,
b: &EncodedPoint<C>,
choice: Choice
) -> EncodedPoint<C>
Select a
or b
according to choice
. Read more
Conditionally assign other
to self
, according to choice
. Read more
impl<C> Debug for EncodedPoint<C> where
C: Curve,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: Add<UInt<UTerm, B1>>,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: ArrayLength<u8>,
<<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output as Add<UInt<UTerm, B1>>>::Output: ArrayLength<u8>,
impl<C> Debug for EncodedPoint<C> where
C: Curve,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: Add<UInt<UTerm, B1>>,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: ArrayLength<u8>,
<<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output as Add<UInt<UTerm, B1>>>::Output: ArrayLength<u8>,
impl<'_, C> From<&'_ PublicKey<C>> for EncodedPoint<C> where
C: Curve + ProjectiveArithmetic + Compression,
GenericArray<u8, <C as Curve>::FieldSize>: From<<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar>,
GenericArray<u8, <C as Curve>::FieldSize>: for<'r> From<&'r <<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar>,
<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar: PrimeField,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: Copy,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: Clone,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: Debug,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: Default,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: FromEncodedPoint<C>,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: ToEncodedPoint<C>,
<C as ProjectiveArithmetic>::ProjectivePoint: From<<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr>,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: Add<UInt<UTerm, B1>>,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: ArrayLength<u8>,
<<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output as Add<UInt<UTerm, B1>>>::Output: ArrayLength<u8>,
<<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar as PrimeField>::Repr == GenericArray<u8, <C as Curve>::FieldSize>,
impl<'_, C> From<&'_ PublicKey<C>> for EncodedPoint<C> where
C: Curve + ProjectiveArithmetic + Compression,
GenericArray<u8, <C as Curve>::FieldSize>: From<<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar>,
GenericArray<u8, <C as Curve>::FieldSize>: for<'r> From<&'r <<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar>,
<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar: PrimeField,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: Copy,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: Clone,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: Debug,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: Default,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: FromEncodedPoint<C>,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: ToEncodedPoint<C>,
<C as ProjectiveArithmetic>::ProjectivePoint: From<<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr>,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: Add<UInt<UTerm, B1>>,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: ArrayLength<u8>,
<<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output as Add<UInt<UTerm, B1>>>::Output: ArrayLength<u8>,
<<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar as PrimeField>::Repr == GenericArray<u8, <C as Curve>::FieldSize>,
Performs the conversion.
impl<C> From<&'_ VerifyingKey<C>> for EncodedPoint<C> where
C: Curve + ProjectiveArithmetic + Compression,
FieldBytes<C>: From<Scalar<C>> + for<'r> From<&'r Scalar<C>>,
Scalar<C>: PrimeField<Repr = FieldBytes<C>>,
AffinePoint<C>: Copy + Clone + Debug + Default + FromEncodedPoint<C> + ToEncodedPoint<C>,
ProjectivePoint<C>: From<AffinePoint<C>>,
UntaggedPointSize<C>: Add<U1> + ArrayLength<u8>,
UncompressedPointSize<C>: ArrayLength<u8>,
impl<C> From<&'_ VerifyingKey<C>> for EncodedPoint<C> where
C: Curve + ProjectiveArithmetic + Compression,
FieldBytes<C>: From<Scalar<C>> + for<'r> From<&'r Scalar<C>>,
Scalar<C>: PrimeField<Repr = FieldBytes<C>>,
AffinePoint<C>: Copy + Clone + Debug + Default + FromEncodedPoint<C> + ToEncodedPoint<C>,
ProjectivePoint<C>: From<AffinePoint<C>>,
UntaggedPointSize<C>: Add<U1> + ArrayLength<u8>,
UncompressedPointSize<C>: ArrayLength<u8>,
Performs the conversion.
impl<C> From<PublicKey<C>> for EncodedPoint<C> where
C: Curve + ProjectiveArithmetic + Compression,
GenericArray<u8, <C as Curve>::FieldSize>: From<<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar>,
GenericArray<u8, <C as Curve>::FieldSize>: for<'r> From<&'r <<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar>,
<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar: PrimeField,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: Copy,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: Clone,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: Debug,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: Default,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: FromEncodedPoint<C>,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: ToEncodedPoint<C>,
<C as ProjectiveArithmetic>::ProjectivePoint: From<<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr>,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: Add<UInt<UTerm, B1>>,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: ArrayLength<u8>,
<<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output as Add<UInt<UTerm, B1>>>::Output: ArrayLength<u8>,
<<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar as PrimeField>::Repr == GenericArray<u8, <C as Curve>::FieldSize>,
impl<C> From<PublicKey<C>> for EncodedPoint<C> where
C: Curve + ProjectiveArithmetic + Compression,
GenericArray<u8, <C as Curve>::FieldSize>: From<<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar>,
GenericArray<u8, <C as Curve>::FieldSize>: for<'r> From<&'r <<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar>,
<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar: PrimeField,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: Copy,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: Clone,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: Debug,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: Default,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: FromEncodedPoint<C>,
<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr: ToEncodedPoint<C>,
<C as ProjectiveArithmetic>::ProjectivePoint: From<<<C as ProjectiveArithmetic>::ProjectivePoint as Curve>::AffineRepr>,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: Add<UInt<UTerm, B1>>,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: ArrayLength<u8>,
<<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output as Add<UInt<UTerm, B1>>>::Output: ArrayLength<u8>,
<<<C as ProjectiveArithmetic>::ProjectivePoint as Group>::Scalar as PrimeField>::Repr == GenericArray<u8, <C as Curve>::FieldSize>,
Performs the conversion.
impl<C> Ord for EncodedPoint<C> where
C: Ord + Curve,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: Add<UInt<UTerm, B1>>,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: ArrayLength<u8>,
<<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output as Add<UInt<UTerm, B1>>>::Output: ArrayLength<u8>,
impl<C> Ord for EncodedPoint<C> where
C: Ord + Curve,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: Add<UInt<UTerm, B1>>,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: ArrayLength<u8>,
<<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output as Add<UInt<UTerm, B1>>>::Output: ArrayLength<u8>,
impl<C> PartialEq<EncodedPoint<C>> for EncodedPoint<C> where
C: PartialEq<C> + Curve,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: Add<UInt<UTerm, B1>>,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: ArrayLength<u8>,
<<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output as Add<UInt<UTerm, B1>>>::Output: ArrayLength<u8>,
impl<C> PartialEq<EncodedPoint<C>> for EncodedPoint<C> where
C: PartialEq<C> + Curve,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: Add<UInt<UTerm, B1>>,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: ArrayLength<u8>,
<<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output as Add<UInt<UTerm, B1>>>::Output: ArrayLength<u8>,
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
impl<C> PartialOrd<EncodedPoint<C>> for EncodedPoint<C> where
C: PartialOrd<C> + Curve,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: Add<UInt<UTerm, B1>>,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: ArrayLength<u8>,
<<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output as Add<UInt<UTerm, B1>>>::Output: ArrayLength<u8>,
impl<C> PartialOrd<EncodedPoint<C>> for EncodedPoint<C> where
C: PartialOrd<C> + Curve,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: Add<UInt<UTerm, B1>>,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: ArrayLength<u8>,
<<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output as Add<UInt<UTerm, B1>>>::Output: ArrayLength<u8>,
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
impl<C> Zeroize for EncodedPoint<C> where
C: Curve,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: Add<UInt<UTerm, B1>>,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: ArrayLength<u8>,
<<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output as Add<UInt<UTerm, B1>>>::Output: ArrayLength<u8>,
impl<C> Zeroize for EncodedPoint<C> where
C: Curve,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: Add<UInt<UTerm, B1>>,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: ArrayLength<u8>,
<<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output as Add<UInt<UTerm, B1>>>::Output: ArrayLength<u8>,
impl<C> Copy for EncodedPoint<C> where
C: Curve,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: Add<UInt<UTerm, B1>>,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: ArrayLength<u8>,
<<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output as Add<UInt<UTerm, B1>>>::Output: ArrayLength<u8>,
<<<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output as Add<UInt<UTerm, B1>>>::Output as ArrayLength<u8>>::ArrayType: Copy,
impl<C> Eq for EncodedPoint<C> where
C: Eq + Curve,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: Add<UInt<UTerm, B1>>,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: ArrayLength<u8>,
<<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output as Add<UInt<UTerm, B1>>>::Output: ArrayLength<u8>,
impl<C> StructuralEq for EncodedPoint<C> where
C: Curve,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: Add<UInt<UTerm, B1>>,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: ArrayLength<u8>,
<<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output as Add<UInt<UTerm, B1>>>::Output: ArrayLength<u8>,
impl<C> StructuralPartialEq for EncodedPoint<C> where
C: Curve,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: Add<UInt<UTerm, B1>>,
<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output: ArrayLength<u8>,
<<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output as Add<UInt<UTerm, B1>>>::Output: ArrayLength<u8>,
Auto Trait Implementations
impl<C> RefUnwindSafe for EncodedPoint<C> where
<<<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output as Add<UInt<UTerm, B1>>>::Output as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
impl<C> Send for EncodedPoint<C>
impl<C> Sync for EncodedPoint<C>
impl<C> Unpin for EncodedPoint<C> where
<<<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output as Add<UInt<UTerm, B1>>>::Output as ArrayLength<u8>>::ArrayType: Unpin,
impl<C> UnwindSafe for EncodedPoint<C> where
<<<<C as Curve>::FieldSize as Add<<C as Curve>::FieldSize>>::Output as Add<UInt<UTerm, B1>>>::Output as ArrayLength<u8>>::ArrayType: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Causes self
to use its Binary
implementation when Debug
-formatted.
Causes self
to use its Display
implementation when
Debug
-formatted. Read more
Causes self
to use its LowerExp
implementation when
Debug
-formatted. Read more
Causes self
to use its LowerHex
implementation when
Debug
-formatted. Read more
Causes self
to use its Octal
implementation when Debug
-formatted.
Causes self
to use its Pointer
implementation when
Debug
-formatted. Read more
Causes self
to use its UpperExp
implementation when
Debug
-formatted. Read more
Causes self
to use its UpperHex
implementation when
Debug
-formatted. Read more
fn pipe_as_ref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: AsRef<T>,
T: 'a,
R: 'a,
fn pipe_as_ref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: AsRef<T>,
T: 'a,
R: 'a,
Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more
fn pipe_borrow<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: Borrow<T>,
T: 'a,
R: 'a,
fn pipe_borrow<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: Borrow<T>,
T: 'a,
R: 'a,
Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more
fn pipe_deref<'a, R>(&'a self, func: impl FnOnce(&'a Self::Target) -> R) -> R where
Self: Deref,
R: 'a,
fn pipe_deref<'a, R>(&'a self, func: impl FnOnce(&'a Self::Target) -> R) -> R where
Self: Deref,
R: 'a,
Pipes a dereference into a function that cannot normally be called in suffix position. Read more
Pipes a reference into a function that cannot ordinarily be called in suffix position. Read more
Provides immutable access to the reference for inspection.
Calls tap_ref
in debug builds, and does nothing in release builds.
Provides mutable access to the reference for modification.
Calls tap_ref_mut
in debug builds, and does nothing in release builds.
Provides immutable access to the borrow for inspection. Read more
Calls tap_borrow
in debug builds, and does nothing in release builds.
fn tap_borrow_mut<F, R>(self, func: F) -> Self where
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
fn tap_borrow_mut<F, R>(self, func: F) -> Self where
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
Provides mutable access to the borrow for modification.
Immutably dereferences self
for inspection.
fn tap_deref_dbg<F, R>(self, func: F) -> Self where
Self: Deref,
F: FnOnce(&Self::Target) -> R,
fn tap_deref_dbg<F, R>(self, func: F) -> Self where
Self: Deref,
F: FnOnce(&Self::Target) -> R,
Calls tap_deref
in debug builds, and does nothing in release builds.
fn tap_deref_mut<F, R>(self, func: F) -> Self where
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
fn tap_deref_mut<F, R>(self, func: F) -> Self where
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
Mutably dereferences self
for modification.