Struct k256::Secp256k1 [−][src]
pub struct Secp256k1;
Expand description
secp256k1 (K-256) 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
type AffinePoint = AffinePoint
type AffinePoint = AffinePoint
Elliptic curve point in affine coordinates.
Get the affine x-coordinate as a serialized field element.
Object Identifier (OID) for this curve
Get the pkcs8::AlgorithmIdentifier
for this curve
Attempt to decompress an elliptic curve point.
Attempts to parse the given EncodedPoint
as an SEC1-encoded AffinePoint
.
Returns
None
value if encoded_point
is not on the secp256k1 curve.
Deserialize the type this trait is impl’d on from an EncodedPoint
.
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
secp256k1 points are typically compressed.
type CurveGroup = ProjectivePoint
type CurveGroup = ProjectivePoint
Prime order elliptic curve group.
type ProjectivePoint = ProjectivePoint
type ProjectivePoint = ProjectivePoint
Elliptic curve point in projective coordinates. Read more
Serialize this value as a SEC1 EncodedPoint
, optionally applying
point compression. Read more
Serialize this value as a SEC1 EncodedPoint
, optionally applying
point compression. Read more
Serialize this value as a SEC1 EncodedPoint
, optionally applying
point compression. Read more
Auto Trait Implementations
impl RefUnwindSafe for Secp256k1
impl UnwindSafe for Secp256k1
Blanket Implementations
Mutably borrows from an owned value. Read more