Expand description
§RustCrypto: Digital Signature Algorithms
This crate contains traits which provide generic type-safe APIs for generating and verifying digital signatures.
§Supported crates
The following crates are implemented using traits from the signature crate:
§RustCrypto crates
§Third-party crates
§SemVer Policy Exemptions
- The off-by-default features
digestandrand_coreare unstable features which are also considered exempt from SemVer as they correspond to pre-1.0 crates which are still subject to changes. Breaking changes to these features will, like MSRV, be done with a minor version bump.
§License
Licensed under either of
at your option.
§Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
§Design
This crate provides a common set of traits for signing and verifying digital signatures intended to be implemented by libraries which produce or contain implementations of digital signature algorithms, and used by libraries which want to produce or verify digital signatures generically.
§Unstable features
Despite being post-1.0, this crate includes off-by-default unstable optional features, each of which depends on a pre-1.0 crate.
These features are considered exempt from SemVer. See “SemVer Policy Exemptions” for more information.
The following unstable features are presently supported:
digest: enables theDigestSignerandDigestVerifiertraits which are based on theDigesttrait from thedigestcrate.rand_core: enables theRandomizedSignertrait for signature systems which rely on a cryptographically secure random number generator for security.
Re-exports§
Modules§
- hazmat
- Hazardous Materials: low-level APIs which can be insecure if misused.
Structs§
- Error
- Signature errors.
Traits§
- Async
Digest Signer digest - Asynchronously sign the given prehashed message
DigestusingSelf. - Async
Digest Verifier digest - Asynchronously verify the provided signature for the given prehashed
message
Digestis authentic. - Async
Multipart Verifier - Asynchronous equivalent of
MultipartVerifierwhere the message is provided in non-contiguous byte slices. - Async
Randomized Signer rand_core - Sign the given message using the provided external randomness source.
- Async
Signer - Asynchronously sign the provided message bytestring using
Self(e.g. client for a Cloud KMS or HSM), returning a digital signature. - Async
Verifier - Asynchronously verify the provided message bytestring using
Self. - Digest
Signer digest - Sign the given prehashed message
DigestusingSelf. - Digest
Verifier digest - Verify the provided signature for the given prehashed message
Digestis authentic. - Keypair
- Signing keypair with an associated verifying key.
- Keypair
Ref - Signing keypair with an associated verifying key.
- Multipart
Signer - Equivalent of
Signerbut the message is provided in non-contiguous byte slices. - Multipart
Verifier - Equivalent of
Verifierbut the message is provided in non-contiguous byte slices. - Randomized
Digest Signer digestandrand_core - Combination of
DigestSignerandRandomizedSignerwith support for computing a signature over a digest which requires entropy from an RNG. - Randomized
Multipart Signer rand_core - Equivalent of
RandomizedSignerbut the message is provided in non-contiguous byte slices. - Randomized
Multipart Signer Mut rand_core - Equivalent of
RandomizedSignerMutbut the message is provided in non-contiguous byte slices. - Randomized
Signer rand_core - Sign the given message using the provided external randomness source.
- Randomized
Signer Mut rand_core - Sign the provided message bytestring using
&mut Self(e.g. an evolving cryptographic key such as a stateful hash-based signature), and a per-signature randomizer, returning a digital signature. - Signature
Encoding - Support for decoding/encoding signatures as bytes.
- Signer
- Sign the provided message bytestring using
Self(e.g. a cryptographic key or connection to an HSM), returning a digital signature. - Signer
Mut - Sign the provided message bytestring using
&mut Self(e.g. an evolving cryptographic key such as a stateful hash-based signature), returning a digital signature. - Verifier
- Verify the provided message bytestring using
Self(e.g. a public key).
Type Aliases§
- Result
- Result type.