#[repr(C)]pub struct P256Point { /* private fields */ }
Implementations§
Trait Implementations§
Source§impl AddAssign<&P256Point> for P256Point
impl AddAssign<&P256Point> for P256Point
Source§fn add_assign(&mut self, p2: &P256Point)
fn add_assign(&mut self, p2: &P256Point)
Performs the
+=
operation. Read moreSource§impl AddAssign for P256Point
impl AddAssign for P256Point
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moreSource§impl AffineCoordinates for P256Point
impl AffineCoordinates for P256Point
Source§impl ConditionallySelectable for P256Point
impl ConditionallySelectable for P256Point
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 P256Point
impl ConstantTimeEq for P256Point
Source§impl Curve for P256Point
impl Curve for P256Point
Source§type AffineRepr = P256Point
type AffineRepr = P256Point
The affine representation for this elliptic curve.
Source§fn 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()
.Source§impl CyclicGroup for P256Point
impl CyclicGroup for P256Point
Source§impl DecompactPoint<NistP256> for P256Point
impl DecompactPoint<NistP256> for P256Point
Source§impl DecompressPoint<NistP256> for P256Point
impl DecompressPoint<NistP256> for P256Point
Source§fn decompress(
x_bytes: &FieldBytes<NistP256>,
y_is_odd: Choice,
) -> CtOption<Self>
fn decompress( x_bytes: &FieldBytes<NistP256>, y_is_odd: Choice, ) -> CtOption<Self>
Note that this is not constant time
Source§impl<'de> Deserialize<'de> for P256Point
impl<'de> Deserialize<'de> for P256Point
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&P256Point> for EncodedPoint
impl From<&P256Point> for EncodedPoint
Source§fn from(affine_point: &P256Point) -> EncodedPoint
fn from(affine_point: &P256Point) -> EncodedPoint
Converts to this type from the input type.
Source§impl From<P256Point> for EncodedPoint
impl From<P256Point> for EncodedPoint
Source§fn from(affine_point: P256Point) -> EncodedPoint
fn from(affine_point: P256Point) -> EncodedPoint
Converts to this type from the input type.
Source§impl FromCompressed<P256Coord> for P256Point
impl FromCompressed<P256Coord> for P256Point
Source§impl FromEncodedPoint<NistP256> for P256Point
impl FromEncodedPoint<NistP256> for P256Point
Source§fn from_encoded_point(encoded_point: &EncodedPoint) -> CtOption<Self>
fn from_encoded_point(encoded_point: &EncodedPoint) -> CtOption<Self>
Attempts to parse the given EncodedPoint
as an SEC1-encoded P256Point
.
§Returns
None
value if encoded_point
is not on the secp256k1 curve.
Source§impl Group for P256Point
impl Group for P256Point
Source§type Scalar = P256Scalar
type Scalar = P256Scalar
Scalars modulo the order of this group’s scalar field.
Source§fn random(_rng: impl RngCore) -> Self
fn random(_rng: impl RngCore) -> Self
Returns an element chosen uniformly at random from the non-identity elements of
this group. Read more
Source§fn is_identity(&self) -> Choice
fn is_identity(&self) -> Choice
Determines if this point is the identity.
Source§impl LinearCombination for P256Point
impl LinearCombination for P256Point
Source§impl Mul<&P256Scalar> for &P256Point
impl Mul<&P256Scalar> for &P256Point
Source§impl Mul<&P256Scalar> for P256Point
impl Mul<&P256Scalar> for P256Point
Source§impl Mul<P256Scalar> for P256Point
impl Mul<P256Scalar> for P256Point
Source§impl MulAssign<&P256Scalar> for P256Point
impl MulAssign<&P256Scalar> for P256Point
Source§fn mul_assign(&mut self, rhs: &P256Scalar)
fn mul_assign(&mut self, rhs: &P256Scalar)
Performs the
*=
operation. Read moreSource§impl MulAssign<P256Scalar> for P256Point
impl MulAssign<P256Scalar> for P256Point
Source§fn mul_assign(&mut self, rhs: P256Scalar)
fn mul_assign(&mut self, rhs: P256Scalar)
Performs the
*=
operation. Read moreSource§impl MulByGenerator for P256Point
impl MulByGenerator for P256Point
Source§fn mul_by_generator(scalar: &Self::Scalar) -> Self
fn mul_by_generator(scalar: &Self::Scalar) -> Self
Multiply by the generator of the prime-order subgroup.
Source§impl SubAssign<&P256Point> for P256Point
impl SubAssign<&P256Point> for P256Point
Source§fn sub_assign(&mut self, p2: &P256Point)
fn sub_assign(&mut self, p2: &P256Point)
Performs the
-=
operation. Read moreSource§impl SubAssign for P256Point
impl SubAssign for P256Point
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-=
operation. Read moreSource§impl ToEncodedPoint<NistP256> for P256Point
impl ToEncodedPoint<NistP256> for P256Point
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 TryFrom<&EncodedPoint<<NistP256 as Curve>::FieldBytesSize>> for P256Point
impl TryFrom<&EncodedPoint<<NistP256 as Curve>::FieldBytesSize>> for P256Point
Source§impl TryFrom<EncodedPoint<<NistP256 as Curve>::FieldBytesSize>> for P256Point
impl TryFrom<EncodedPoint<<NistP256 as Curve>::FieldBytesSize>> for P256Point
Source§impl VerifyCustomHook<NistP256> for P256Point
impl VerifyCustomHook<NistP256> for P256Point
Source§fn verify_hook(&self, _z: &[u8], _sig: &Signature<C>) -> Result<(), Error>
fn verify_hook(&self, _z: &[u8], _sig: &Signature<C>) -> Result<(), Error>
This is NOT the full ECDSA signature verification algorithm. The implementer should only
add additional verification logic not contained in verify_prehashed. The default
implementation does nothing. Read more
Source§impl VerifyPrimitive<NistP256> for P256Point
impl VerifyPrimitive<NistP256> for P256Point
Source§fn verify_prehashed(
&self,
z: &FieldBytes<NistP256>,
sig: &Signature,
) -> Result<(), Error>
fn verify_prehashed( &self, z: &FieldBytes<NistP256>, sig: &Signature, ) -> Result<(), Error>
Verify the prehashed message against the provided ECDSA signature. Read more
Source§impl WeierstrassPoint for P256Point
impl WeierstrassPoint for P256Point
Source§fn as_le_bytes(&self) -> &[u8] ⓘ
fn as_le_bytes(&self) -> &[u8] ⓘ
SAFETY: assumes that #intmod_type has a memory representation such that with repr(C), two coordinates are packed contiguously.
Source§const CURVE_A: P256Coord = CURVE_A
const CURVE_A: P256Coord = CURVE_A
The
a
coefficient in the Weierstrass curve equation y^2 = x^3 + a x + b
.Source§const CURVE_B: P256Coord = CURVE_B
const CURVE_B: P256Coord = CURVE_B
The
b
coefficient in the Weierstrass curve equation y^2 = x^3 + a x + b
.const IDENTITY: Self
type Coordinate = P256Coord
Source§fn from_xy_unchecked(x: Self::Coordinate, y: Self::Coordinate) -> Self
fn from_xy_unchecked(x: Self::Coordinate, y: Self::Coordinate) -> Self
Raw constructor without asserting point is on the curve.
fn x(&self) -> &Self::Coordinate
fn y(&self) -> &Self::Coordinate
fn x_mut(&mut self) -> &mut Self::Coordinate
fn y_mut(&mut self) -> &mut Self::Coordinate
fn into_coords(self) -> (Self::Coordinate, Self::Coordinate)
Source§fn set_up_once()
fn set_up_once()
Calls any setup required for this curve. The implementation should internally use
OnceBool
to ensure that setup is only called once.Source§fn add_assign_impl<const CHECK_SETUP: bool>(&mut self, p2: &Self)
fn add_assign_impl<const CHECK_SETUP: bool>(&mut self, p2: &Self)
Add implementation that handles identity and whether points are equal or not. Read more
Source§fn double_assign_impl<const CHECK_SETUP: bool>(&mut self)
fn double_assign_impl<const CHECK_SETUP: bool>(&mut self)
Double implementation that handles identity. Read more
Source§unsafe fn add_ne_nonidentity<const CHECK_SETUP: bool>(&self, p2: &Self) -> Self
unsafe fn add_ne_nonidentity<const CHECK_SETUP: bool>(&self, p2: &Self) -> Self
Safety Read more
Source§unsafe fn add_ne_assign_nonidentity<const CHECK_SETUP: bool>(
&mut self,
p2: &Self,
)
unsafe fn add_ne_assign_nonidentity<const CHECK_SETUP: bool>( &mut self, p2: &Self, )
Safety Read more
Source§unsafe fn sub_ne_nonidentity<const CHECK_SETUP: bool>(&self, p2: &Self) -> Self
unsafe fn sub_ne_nonidentity<const CHECK_SETUP: bool>(&self, p2: &Self) -> Self
Safety Read more
Source§unsafe fn sub_ne_assign_nonidentity<const CHECK_SETUP: bool>(
&mut self,
p2: &Self,
)
unsafe fn sub_ne_assign_nonidentity<const CHECK_SETUP: bool>( &mut self, p2: &Self, )
Safety Read more
Source§unsafe fn double_nonidentity<const CHECK_SETUP: bool>(&self) -> Self
unsafe fn double_nonidentity<const CHECK_SETUP: bool>(&self) -> Self
Safety Read more
Source§unsafe fn double_assign_nonidentity<const CHECK_SETUP: bool>(&mut self)
unsafe fn double_assign_nonidentity<const CHECK_SETUP: bool>(&mut self)
Safety Read more
fn from_xy(x: Self::Coordinate, y: Self::Coordinate) -> Option<Self>
fn from_xy_nonidentity(x: Self::Coordinate, y: Self::Coordinate) -> Option<Self>
impl Copy for P256Point
impl DefaultIsZeroes for P256Point
impl Eq for P256Point
impl StructuralPartialEq for P256Point
Auto Trait Implementations§
impl Freeze for P256Point
impl RefUnwindSafe for P256Point
impl Send for P256Point
impl Sync for P256Point
impl Unpin for P256Point
impl UnwindSafe for P256Point
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ConditionallyNegatable for T
impl<T> ConditionallyNegatable for T
Source§fn conditional_negate(&mut self, choice: Choice)
fn conditional_negate(&mut self, choice: Choice)
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Borrows
self
and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Mutably borrows
self
and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
Borrows
self
, then passes self.as_ref()
into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
Mutably borrows
self
, then passes self.as_mut()
into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
Borrows
self
, then passes self.deref()
into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Immutable access to the
Borrow<B>
of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
Mutable access to the
BorrowMut<B>
of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
Immutable access to the
AsRef<R>
view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
Mutable access to the
AsMut<R>
view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Immutable access to the
Deref::Target
of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Mutable access to the
Deref::Target
of a value. Read moreSource§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.Source§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.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
Calls
.tap_borrow()
only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
Calls
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
Calls
.tap_ref()
only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
Calls
.tap_ref_mut()
only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
Calls
.tap_deref()
only in debug builds, and is erased in release
builds.