Crate signatory [] [src]

Signatory: a multi-provider digital signature library

This crate provides a thread-and-object-safe API for both creating and verifying elliptic curve digital signatures, using either software-based or hardware-based providers.

ECDSA (FIPS 186-4) and Ed25519 (RFC 8032) are the supported digital signature algorithms.

There are several backend providers available, which need to be enabled using Cargo features. For more information, please see the providers module documentation. A brief summary of available providers follows:

  • dalek-provider: Ed25519 signing/verification using the pure-Rust ed25519-dalek crate. This provider is enabled-by-default.
  • ring-provider: Ed25519 signing/verification with the ring cryptography library.
  • secp256k1-provider: ECDSA signing/verification for the secp256k1 elliptic curve (commonly used by Bitcoin and other cryptocurrrencies) which wraps the libsecp256k1 library from Bitcoin Core.
  • sodiumoxide-provider: Ed25519 signing/verification with the sodiumoxide crate, a Rust wrapper for libsodium (NOTE: requires libsodium to be installed on the system)
  • yubihsm-provider: Ed25519 signing-only provider using private keys stored in a YubiHSM2 hardware device, via the yubihsm-rs crate.

Re-exports

pub extern crate generic_array;
pub use error::Error;

Modules

ecdsa

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

ed25519

Ed25519: Schnorr signatures using the twisted Edwards form of Curve25519

error

Error types

providers

Providers are Signatory's plugins/adapters which provide a common API to digital signature functionality.

test_vector

Test vector structure for signatures