pub struct AffinePoint { /* private fields */ }Expand description
A point on the secp256r1 curve in affine coordinates.
Trait Implementations§
Source§impl Add<&AffinePoint> for &ProjectivePoint
impl Add<&AffinePoint> for &ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
+ operator.Source§fn add(self, other: &AffinePoint) -> ProjectivePoint
fn add(self, other: &AffinePoint) -> ProjectivePoint
Performs the
+ operation. Read moreSource§impl Add<&AffinePoint> for ProjectivePoint
impl Add<&AffinePoint> for ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
+ operator.Source§fn add(self, other: &AffinePoint) -> ProjectivePoint
fn add(self, other: &AffinePoint) -> ProjectivePoint
Performs the
+ operation. Read moreSource§impl Add<AffinePoint> for ProjectivePoint
impl Add<AffinePoint> for ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
+ operator.Source§fn add(self, other: AffinePoint) -> ProjectivePoint
fn add(self, other: AffinePoint) -> ProjectivePoint
Performs the
+ operation. Read moreSource§impl AddAssign<&AffinePoint> for ProjectivePoint
impl AddAssign<&AffinePoint> for ProjectivePoint
Source§fn add_assign(&mut self, rhs: &AffinePoint)
fn add_assign(&mut self, rhs: &AffinePoint)
Performs the
+= operation. Read moreSource§impl AddAssign<AffinePoint> for ProjectivePoint
impl AddAssign<AffinePoint> for ProjectivePoint
Source§fn add_assign(&mut self, rhs: AffinePoint)
fn add_assign(&mut self, rhs: AffinePoint)
Performs the
+= operation. Read moreSource§impl Clone for AffinePoint
impl Clone for AffinePoint
Source§impl ConditionallySelectable for AffinePoint
impl ConditionallySelectable for AffinePoint
Source§fn conditional_select(
a: &AffinePoint,
b: &AffinePoint,
choice: Choice,
) -> AffinePoint
fn conditional_select( a: &AffinePoint, b: &AffinePoint, choice: Choice, ) -> AffinePoint
Source§fn conditional_assign(&mut self, other: &Self, choice: Choice)
fn conditional_assign(&mut self, other: &Self, choice: Choice)
Source§fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)
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 moreSource§impl ConstantTimeEq for AffinePoint
impl ConstantTimeEq for AffinePoint
impl Copy for AffinePoint
Source§impl Debug for AffinePoint
impl Debug for AffinePoint
Source§impl DecompressPoint<NistP256> for AffinePoint
impl DecompressPoint<NistP256> for AffinePoint
Source§fn decompress(x_bytes: &FieldBytes, y_is_odd: Choice) -> CtOption<Self>
fn decompress(x_bytes: &FieldBytes, y_is_odd: Choice) -> CtOption<Self>
Attempt to decompress an elliptic curve point.
Source§impl Default for AffinePoint
impl Default for AffinePoint
impl Eq for AffinePoint
Source§fn from(affine: &AffinePoint) -> SharedSecret
fn from(affine: &AffinePoint) -> SharedSecret
Converts to this type from the input type.
Source§impl From<AffinePoint> for EncodedPoint
impl From<AffinePoint> for EncodedPoint
Source§fn from(affine_point: AffinePoint) -> EncodedPoint
fn from(affine_point: AffinePoint) -> EncodedPoint
Returns the SEC1 compressed encoding of this point.
Source§impl From<AffinePoint> for ProjectivePoint
impl From<AffinePoint> for ProjectivePoint
Source§fn from(p: AffinePoint) -> Self
fn from(p: AffinePoint) -> Self
Converts to this type from the input type.
Source§impl From<ProjectivePoint> for AffinePoint
impl From<ProjectivePoint> for AffinePoint
Source§fn from(p: ProjectivePoint) -> AffinePoint
fn from(p: ProjectivePoint) -> AffinePoint
Converts to this type from the input type.
Source§impl FromEncodedPoint<NistP256> for AffinePoint
impl FromEncodedPoint<NistP256> for AffinePoint
Source§fn from_encoded_point(encoded_point: &EncodedPoint) -> Option<Self>
fn from_encoded_point(encoded_point: &EncodedPoint) -> Option<Self>
Attempts to parse the given EncodedPoint as an SEC1-encoded AffinePoint.
§Returns
None value if encoded_point is not on the secp256r1 curve.
Source§impl GroupEncoding for AffinePoint
impl GroupEncoding for AffinePoint
Source§type Repr = GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B1>>
type Repr = GenericArray<u8, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B1>>
The encoding of group elements. Read more
Source§fn from_bytes(bytes: &Self::Repr) -> CtOption<Self>
fn from_bytes(bytes: &Self::Repr) -> CtOption<Self>
Attempts to deserialize a group element from its encoding.
Source§impl Mul<&Scalar> for AffinePoint
impl Mul<&Scalar> for AffinePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
* operator.Source§impl Mul<Scalar> for AffinePoint
impl Mul<Scalar> for AffinePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
* operator.Source§impl Neg for AffinePoint
impl Neg for AffinePoint
Source§impl PartialEq for AffinePoint
impl PartialEq for AffinePoint
Source§impl PrimeCurveAffine for AffinePoint
impl PrimeCurveAffine for AffinePoint
Source§fn identity() -> AffinePoint
fn identity() -> AffinePoint
Returns the identity of the group: the point at infinity.
Source§fn generator() -> AffinePoint
fn generator() -> AffinePoint
Returns the base point of P-256.
Source§fn is_identity(&self) -> Choice
fn is_identity(&self) -> Choice
Is this point the identity point?
Source§fn to_curve(&self) -> ProjectivePoint
fn to_curve(&self) -> ProjectivePoint
Convert to curve representation.
type Scalar = Scalar
type Curve = ProjectivePoint
Source§impl Sub<&AffinePoint> for &ProjectivePoint
impl Sub<&AffinePoint> for &ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
- operator.Source§fn sub(self, other: &AffinePoint) -> ProjectivePoint
fn sub(self, other: &AffinePoint) -> ProjectivePoint
Performs the
- operation. Read moreSource§impl Sub<&AffinePoint> for ProjectivePoint
impl Sub<&AffinePoint> for ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
- operator.Source§fn sub(self, other: &AffinePoint) -> ProjectivePoint
fn sub(self, other: &AffinePoint) -> ProjectivePoint
Performs the
- operation. Read moreSource§impl Sub<AffinePoint> for ProjectivePoint
impl Sub<AffinePoint> for ProjectivePoint
Source§type Output = ProjectivePoint
type Output = ProjectivePoint
The resulting type after applying the
- operator.Source§fn sub(self, other: AffinePoint) -> ProjectivePoint
fn sub(self, other: AffinePoint) -> ProjectivePoint
Performs the
- operation. Read moreSource§impl SubAssign<&AffinePoint> for ProjectivePoint
impl SubAssign<&AffinePoint> for ProjectivePoint
Source§fn sub_assign(&mut self, rhs: &AffinePoint)
fn sub_assign(&mut self, rhs: &AffinePoint)
Performs the
-= operation. Read moreSource§impl SubAssign<AffinePoint> for ProjectivePoint
impl SubAssign<AffinePoint> for ProjectivePoint
Source§fn sub_assign(&mut self, rhs: AffinePoint)
fn sub_assign(&mut self, rhs: AffinePoint)
Performs the
-= operation. Read moreSource§impl ToEncodedPoint<NistP256> for AffinePoint
impl ToEncodedPoint<NistP256> for AffinePoint
Source§fn to_encoded_point(&self, compress: bool) -> EncodedPoint
fn to_encoded_point(&self, compress: bool) -> EncodedPoint
Serialize this value as a SEC1
EncodedPoint, optionally applying
point compression.Source§impl VerifyPrimitive<NistP256> for AffinePoint
Available on crate feature ecdsa only.
impl VerifyPrimitive<NistP256> for AffinePoint
Available on crate feature
ecdsa only.Auto Trait Implementations§
impl Freeze for AffinePoint
impl RefUnwindSafe for AffinePoint
impl Send for AffinePoint
impl Sync for AffinePoint
impl Unpin for AffinePoint
impl UnsafeUnpin for AffinePoint
impl UnwindSafe for AffinePoint
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