Tony Arcieri e7f6a601f9 ml-dsa: precompute VerifyingKeys when alloc enabled (#1346)
Adds an `alloc`-gated `verifying_key` field to `SigningKey`, and when
the feature is enabled precomputes the key at the time the `SigningKey`
is initialized.

We previously used to do this but stopped to optimize stack usage (see
the changes in #1259 and #1261), however when `alloc` is enabled this
isn't an issue since we've moved the relevant data to the heap in this
case (see #1344 and #1345), so stack usage is no longer an issue.

This makes it possible to implement `signature::KeypairRef` for
`SigningKey` which still provides a blanket `signature::Keypair` impl,
so we can always depend on the latter being availble but take advantage
of the former when `alloc` is enabled.
2026-05-09 16:21:34 -06:00
2026-05-06 12:55:52 -06:00
2026-05-06 12:55:52 -06:00
2026-05-02 18:10:44 -06:00
2026-05-06 12:55:52 -06:00
2020-03-16 10:42:18 -07:00
2026-05-09 14:53:34 -06:00
2026-03-03 10:42:27 -07:00
2023-04-23 20:01:18 -06:00

RustCrypto: Signatures Project Chat dependency status

Support for digital signatures, which provide authentication of data using public-key cryptography.

All algorithms reside in the separate crates and implemented using traits from the signature crate.

Crates are designed so they do not require the standard library (i.e. no_std) and can be easily used for bare-metal or lightweight WebAssembly programming.

Crates

Name Algorithm Crates.io Documentation Build
dsa Digital Signature Algorithm crates.io Documentation dsa build
ecdsa Elliptic Curve DSA crates.io Documentation ecdsa build
ed25519 EdDSA for Curve25519 crates.io Documentation ed25519 build
ed448 EdDSA for Curve448 crates.io Documentation ed448 build
lms Leighton-Micali Signature crates.io Documentation lms build
ml-dsa Module Lattice DSA crates.io Documentation lms build
rfc6979 Deterministic (EC)DSA Signatures crates.io Documentation rfc6979 build
slh-dsa Stateless Hash-Based Signature crates.io Documentation slh-dsa build
xmss eXtended Merkle Signature Scheme crates.io Documentation xmss build

NOTE: for RSA signatures see https://github.com/RustCrypto/RSA

Usage

Crates functionality is expressed in terms of traits defined in the signature crate.

License

All crates 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.

S
Description
Automated archival mirror of github.com/RustCrypto/signatures
Readme 11 MiB
Languages
Rust 100%