Struct k256::Secp256k1[][src]

pub struct 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 AlgorithmParameters for Secp256k1[src]

impl Clone for Secp256k1[src]

impl Curve for Secp256k1[src]

impl Curve for Secp256k1[src]

type FieldSize = U32

256-bit (32-byte)

impl Debug for Secp256k1[src]

impl DecompressPoint<Secp256k1> for AffinePoint[src]

impl Default for Secp256k1[src]

impl DigestPrimitive for Secp256k1[src]

This is supported on crate feature ecdsa-core only.

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 FromDigest<Secp256k1> for Scalar[src]

This is supported on crate feature digest only.

fn from_digest<D>(digest: D) -> Self where
    D: Digest<OutputSize = U32>, 
[src]

Convert the output of a digest algorithm into a Scalar reduced modulo n.

impl FromEncodedPoint<Secp256k1> for AffinePoint[src]

fn from_encoded_point(encoded_point: &EncodedPoint) -> Option<Self>[src]

Attempts to parse the given EncodedPoint as an SEC1-encoded AffinePoint.

Returns

None value if encoded_point is not on the secp256k1 curve.

impl FromEncodedPoint<Secp256k1> for ProjectivePoint[src]

impl Ord for Secp256k1[src]

impl PartialEq<Secp256k1> for Secp256k1[src]

impl PartialOrd<Secp256k1> for Secp256k1[src]

impl PointCompression for Secp256k1[src]

const COMPRESS_POINTS: bool[src]

secp256k1 points are typically compressed.

impl ProjectiveArithmetic for Secp256k1[src]

type ProjectivePoint = ProjectivePoint

Elliptic curve point in projective coordinates.

impl RecoverableSignPrimitive<Secp256k1> for Scalar[src]

This is supported on crate feature ecdsa-core only.

impl StructuralEq for Secp256k1[src]

impl StructuralPartialEq for Secp256k1[src]

impl ToEncodedPoint<Secp256k1> for AffinePoint[src]

impl ToEncodedPoint<Secp256k1> for VerifyingKey[src]

This is supported on crate feature ecdsa-core only.

impl VerifyPrimitive<Secp256k1> for AffinePoint[src]

This is supported on crate feature ecdsa-core only.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.