[−][src]Struct k256::Secp256k1
K-256 (secp256k1) elliptic curve.
Specified in Certicom's SECG in "SEC 2: Recommended Elliptic Curve Domain Parameters":
https://www.secg.org/sec2-v2.pdf
The curve's equation is y² = x³ + 7
over a ~256-bit prime field.
It's primarily notable for usage in Bitcoin and other cryptocurrencies, particularly in conjunction with the Elliptic Curve Digital Signature Algorithm (ECDSA).
Trait Implementations
impl Arithmetic for Secp256k1
[src]
type Scalar = Scalar
Scalar type for a given curve
type AffinePoint = AffinePoint
Affine point type for a given curve
impl Clone for Secp256k1
[src]
impl Curve for Secp256k1
[src]
type ElementSize = U32
256-bit (32-byte)
impl Curve for Secp256k1
[src]
const COMPRESS_POINTS: bool
[src]
secp256k1 points are typically compressed.
impl Debug for Secp256k1
[src]
impl Default for Secp256k1
[src]
impl DigestPrimitive for Secp256k1
[src]
type Digest = Sha256
Preferred digest to use when computing ECDSA signatures for this elliptic curve. This should be a member of the SHA-2 family. Read more
impl Eq for Secp256k1
[src]
impl FromPublicKey<Secp256k1> for AffinePoint
[src]
fn from_public_key(pubkey: &PublicKey) -> CtOption<Self>
[src]
Attempts to parse the given PublicKey
as an SEC-1-encoded AffinePoint
.
Returns
None
value if pubkey
is not on the secp256k1 curve.
impl Identifier for Secp256k1
[src]
const OID: ObjectIdentifier
[src]
impl Ord for Secp256k1
[src]
fn cmp(&self, other: &Secp256k1) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Secp256k1> for Secp256k1
[src]
impl PartialOrd<Secp256k1> for Secp256k1
[src]
fn partial_cmp(&self, other: &Secp256k1) -> Option<Ordering>
[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl RecoverableSignPrimitive<Secp256k1> for Scalar
[src]
type RecoverableSignature = Signature
Type for recoverable signatures
fn try_sign_recoverable_prehashed<K>(
&self,
ephemeral_scalar: &K,
hashed_msg: &ElementBytes
) -> Result<Signature, Error> where
K: Borrow<Scalar> + Invert<Output = Scalar>,
[src]
&self,
ephemeral_scalar: &K,
hashed_msg: &ElementBytes
) -> Result<Signature, Error> where
K: Borrow<Scalar> + Invert<Output = Scalar>,
impl StructuralEq for Secp256k1
[src]
impl StructuralPartialEq for Secp256k1
[src]
impl VerifyPrimitive<Secp256k1> for AffinePoint
[src]
fn verify_prehashed(
&self,
hashed_msg: &ElementBytes,
signature: &Signature
) -> Result<(), Error>
[src]
&self,
hashed_msg: &ElementBytes,
signature: &Signature
) -> Result<(), Error>
Auto Trait Implementations
impl RefUnwindSafe for Secp256k1
impl Send for Secp256k1
impl Sync for Secp256k1
impl Unpin for Secp256k1
impl UnwindSafe for Secp256k1
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,