[][src]Crate ecdsa

Elliptic Curve Digital Signature Algorithm (ECDSA) as specified in FIPS 186-4 (Digital Signature Standard)

About

This crate provides generic ECDSA support which can be used in the following ways:

  • Generic implementation of ECDSA usable with the following crates:
  • ECDSA signature types alone which can be used to provide interoperability between other crates that provide an ECDSA implementation:

Any crates which provide an implementation of ECDSA for a particular elliptic curve can leverage the types from this crate, along with the k256, p256, and/or p384 crates to expose ECDSA functionality in a generic, interoperable way by leveraging the Signature type with in conjunction with the signature::Signer and signature::Verifier traits.

For example, the ring-compat crate implements the signature::Signer and signature::Verifier traits in conjunction with the p256::ecdsa::Signature and p384::ecdsa::Signature types to wrap the ECDSA implementations from ring in a generic, interoperable API.

Minimum Supported Rust Version

  • Rust 1.46+

Re-exports

pub use elliptic_curve;
pub use elliptic_curve::generic_array;
pub use signature;
pub use sign::SigningKey;
pub use verify::VerifyingKey;
pub use elliptic_curve::pkcs8;

Modules

asn1

Support for ECDSA signatures encoded as ASN.1 DER.

devdev

Development-related functionality

hazmathazmat

Low-level ECDSA primitives.

rfc6979sign

Support for computing deterministic ECDSA ephemeral scalar (k) using the method described in RFC 6979 rules (Section 3.2): https://tools.ietf.org/html/rfc6979#section-3

signsign

ECDSA signing key. Generic over elliptic curves.

verifyverify

ECDSA verification key (i.e. public key). Generic over elliptic curves.

Macros

new_signing_testdev

Define ECDSA signing test

new_verification_testdev

Define ECDSA verification test

Structs

EncodedPoint

SEC1 encoded curve point.

Error

Signature errors.

SecretKeyzeroize

Elliptic curve secret keys.

Signature

ECDSA signatures (fixed-size).

Traits

CheckSignatureBytes

Ensure a signature is well-formed.

Curve

Marker trait for elliptic curves in short Weierstrass form

NormalizeLow

Normalize a scalar (i.e. ECDSA S) to the lower half the field, as described in BIP 0062: Dealing with Malleability.

Type Definitions

SignatureBytes

Fixed-size byte array containing an ECDSA signature

SignatureSize

Size of a fixed sized signature for the given elliptic curve.