Struct signatory::ecdsa::curve::secp256k1::Secp256k1 [−][src]
pub struct Secp256k1;
The secp256k1 elliptic curve: y² = x³ + 7 over a ~256-bit prime field
Trait Implementations
impl Copy for Secp256k1
[src]
impl Copy for Secp256k1
impl Clone for Secp256k1
[src]
impl Clone for Secp256k1
fn clone(&self) -> Secp256k1
[src]
fn clone(&self) -> Secp256k1
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for Secp256k1
[src]
impl Debug for Secp256k1
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Default for Secp256k1
[src]
impl Default for Secp256k1
impl Eq for Secp256k1
[src]
impl Eq for Secp256k1
impl PartialEq for Secp256k1
[src]
impl PartialEq for Secp256k1
fn eq(&self, other: &Secp256k1) -> bool
[src]
fn eq(&self, other: &Secp256k1) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl Hash for Secp256k1
[src]
impl Hash for Secp256k1
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl WeierstrassCurve for Secp256k1
[src]
impl WeierstrassCurve for Secp256k1
const CURVE_KIND: WeierstrassCurveKind
CURVE_KIND: WeierstrassCurveKind = WeierstrassCurveKind::Secp256k1
Elliptic curve kind
type PrivateScalarSize = U32
Random 256-bit (32-byte) private scalar
type CompressedPointSize = U33
Size of a compressed elliptic curve point serialized using
Octet-String-to-Elliptic-Curve-Point
encoding
type UntaggedPointSize = U64
Size of a raw uncompressed elliptic curve point sans the 0x04
tag byte added in the UncompressedPointSize
value.
type UncompressedPointSize = U65
Size of a raw uncompressed elliptic curve point (i.e sans the 0x04
tag added by Octet-String-to-Elliptic-Curve-Point
encoding)
type DERSignatureMaxSize = U73
Maximum size of an ASN.1 DER encoded signature
type FixedSignatureSize = U64
Concatenated r || s
values (32-bytes each)
impl Signer<Secp256k1> for ECDSASigner
[src]
impl Signer<Secp256k1> for ECDSASigner
fn public_key(&self) -> Result<PublicKey, Error>
[src]
fn public_key(&self) -> Result<PublicKey, Error>
Return the public key that corresponds to the private key for this signer
impl RawDigestDERSigner<Secp256k1> for ECDSASigner
[src]
impl RawDigestDERSigner<Secp256k1> for ECDSASigner
fn sign_digest_der(
&self,
msg: &GenericArray<u8, U32>
) -> Result<DERSignature, Error>
[src]
fn sign_digest_der(
&self,
msg: &GenericArray<u8, U32>
) -> Result<DERSignature, Error>
Compute an ASN.1 DER-encoded signature of the given 32-byte SHA-256 digest
impl RawDigestFixedSigner<Secp256k1> for ECDSASigner
[src]
impl RawDigestFixedSigner<Secp256k1> for ECDSASigner
fn sign_digest_fixed(
&self,
msg: &GenericArray<u8, U32>
) -> Result<FixedSignature, Error>
[src]
fn sign_digest_fixed(
&self,
msg: &GenericArray<u8, U32>
) -> Result<FixedSignature, Error>
Compute a compact, fixed-sized signature of the given 32-byte SHA-256 digest
impl SHA256DERSigner<Secp256k1> for ECDSASigner
[src]
impl SHA256DERSigner<Secp256k1> for ECDSASigner
fn sign_sha256_der(&self, msg: &[u8]) -> Result<DERSignature, Error>
[src]
fn sign_sha256_der(&self, msg: &[u8]) -> Result<DERSignature, Error>
Compute an ASN.1 DER-encoded ECDSA signature for the SHA-256 digest of the given message. Read more
impl SHA256FixedSigner<Secp256k1> for ECDSASigner
[src]
impl SHA256FixedSigner<Secp256k1> for ECDSASigner
fn sign_sha256_fixed(&self, msg: &[u8]) -> Result<FixedSignature, Error>
[src]
fn sign_sha256_fixed(&self, msg: &[u8]) -> Result<FixedSignature, Error>
Compute a compact, fixed-width ECDSA signature for the SHA-256 digest of the given message. Read more
impl RawDigestDERVerifier<Secp256k1> for ECDSAVerifier
[src]
impl RawDigestDERVerifier<Secp256k1> for ECDSAVerifier
fn verify_digest_der_signature(
key: &PublicKey,
msg: &GenericArray<u8, U32>,
signature: &DERSignature
) -> Result<(), Error>
[src]
fn verify_digest_der_signature(
key: &PublicKey,
msg: &GenericArray<u8, U32>,
signature: &DERSignature
) -> Result<(), Error>
Verify an ASN.1 DER-encoded ECDSA signature against the given public key
impl RawDigestFixedVerifier<Secp256k1> for ECDSAVerifier
[src]
impl RawDigestFixedVerifier<Secp256k1> for ECDSAVerifier
fn verify_digest_fixed_signature(
key: &PublicKey,
msg: &GenericArray<u8, U32>,
signature: &FixedSignature
) -> Result<(), Error>
[src]
fn verify_digest_fixed_signature(
key: &PublicKey,
msg: &GenericArray<u8, U32>,
signature: &FixedSignature
) -> Result<(), Error>
Verify a fixed-sized (a.k.a. "compact") ECDSA signature against the given public key