Struct ethers::signers::yubihsm::ecdsa::Signature[][src]

pub struct Signature<C> where
    C: Curve,
    <<<C as Curve>::UInt as ArrayEncoding>::ByteSize as Add<<<C as Curve>::UInt as ArrayEncoding>::ByteSize>>::Output: ArrayLength<u8>, 
{ /* fields omitted */ }
Expand description

ECDSA signature (fixed-size). Generic over elliptic curve types.

Serialized as fixed-sized big endian scalar values with no added framing:

  • r: field element size for the given curve, big-endian
  • s: field element size for the given curve, big-endian

For example, in a curve with a 256-bit modulus like NIST P-256 or secp256k1, r and s will both be 32-bytes, resulting in a signature with a total of 64-bytes.

ASN.1 DER-encoded signatures also supported via the Signature::from_der and Signature::to_der methods.

Implementations

Create a Signature from the serialized r and s scalar values which comprise the signature.

Parse a signature from ASN.1 DER

Serialize this signature as ASN.1 DER

Get the r component of this signature

Get the s component of this signature

Normalize signature into “low S” form as described in BIP 0062: Dealing with Malleability.

Trait Implementations

Performs the conversion.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Sign message prehash using a deterministic ephemeral scalar (k) computed using the algorithm described in RFC 6979 (Section 3.2): https://tools.ietf.org/html/rfc6979#section-3

Sign the given prehashed message Digest, returning a signature. Read more

Compute a fixed-sized P-256 ECDSA signature of the given digest

Sign the given prehashed message Digest, returning a signature. Read more

Compute a fixed-sized P-384 ECDSA signature of the given digest

Sign the given prehashed message Digest, returning a signature. Read more

Attempt to sign the given prehashed message Digest, returning a digital signature on success, or an error if something went wrong. Read more

Sign the given prehashed message Digest, returning a signature. Read more

Attempt to sign the given prehashed message Digest, returning a digital signature on success, or an error if something went wrong. Read more

Sign the given prehashed message Digest, returning a signature. Read more

Attempt to sign the given prehashed message Digest, returning a digital signature on success, or an error if something went wrong. Read more

Sign the given prehashed message Digest, returning a signature. Read more

Compute a fixed-size secp256k1 ECDSA signature of the given digest

Sign the given prehashed message Digest, returning a signature. Read more

Verify the signature against the given Digest output.

Verify the signature against the given Digest output.

Verify the signature against the given Digest output.

Verify the signature against the given Digest output.

Verify the signature against the given Digest output.

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Preferred Digest algorithm to use when computing this signature type.

Sign message prehash using an ephemeral scalar (k) derived according to a variant of RFC 6979 (Section 3.6) which supplies additional entropy from an RNG.

Sign the given prehashed message Digest, returning a signature. Read more

Attempt to sign the given prehashed message Digest, returning a digital signature on success, or an error if something went wrong. Read more

Sign the given prehashed message Digest, returning a signature. Read more

Attempt to sign the given message, returning a digital signature on success, or an error if something went wrong. Read more

Sign the given message and return a digital signature

Parse a signature from its byte representation

Borrow a byte slice representing the serialized form of this signature

Attempt to sign the given message, returning a digital signature on success, or an error if something went wrong. Read more

Sign the given message and return a digital signature

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Use Self to verify that the provided signature for a given message bytestring is authentic. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Calculate the base32 serialized length

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Error type if conversion fails

Check if all values are in range and return array-like struct of u5 values

Compare self to key and return true if they are equal.

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

Encode as base32 and write it to the supplied writer Implementations shouldn’t allocate. Read more

Convert Self to base32 vector

Encode the hex strict representing self into the result. Lower case letters are used (e.g. f9b4ca) Read more

Encode the hex strict representing self into the result. Upper case letters are used (e.g. F9B4CA) Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more