1275 Commits

Author SHA1 Message Date
Tony Arcieri 0bb957d535 cargo: increase retry count to 10 (#1384)
We've been encountering a lot of spurious network errors with GitHub
lately. This increases the retry count to try to work around the
problem.
2026-06-17 09:07:50 -06:00
Tony Arcieri 344087d63f ecdsa v0.17.0-rc.20 (#1383) ecdsa/v0.17.0-rc.20 2026-06-17 08:14:46 -06:00
Lukas Zobernig 58ce150e60 ml-dsa: fix hardcoded MlDsa44 in Wycheproof verification tests (#1382)
The mldsa_verify_test macro previously hardcoded MlDsa44 for decoding both verifying keys and signatures. Due to public key length mismatches, this caused tests for ML-DSA-65 and ML-DSA-87 to fail type conversion and be silently skipped.

Using $params ensures test vectors for all parameter sets are properly decoded and verified.
2026-06-17 08:03:34 -06:00
Tony Arcieri a08448edee ecdsa: remove signature verification from recovery (#1381)
Closes #1380, which makes an algebraic argument that the additional
verification step is redundant/tautilogical because it can never fail.

This removes the `VerifyingKey::recover_from_prehash_noverify` method
and gives `VerifyingKey::recover_from_prehash` its previous behavior.
2026-06-16 18:00:19 -06:00
Tony Arcieri 116295f346 ecdsa: move low-S normalization check into verify_prehashed (#1379)
The behavior is otherwise inconsistent between this `hazmat` function
and `VerifyingKey::verify_prehashed`.
2026-06-16 10:11:30 -06:00
dependabot[bot] 9cabd275ba build(deps): bump zeroize from 1.8.2 to 1.9.0 (#1378) 2026-06-15 12:32:32 -06:00
dependabot[bot] 503829e699 build(deps): bump crypto-primes from 0.7.1 to 0.7.2 (#1377) 2026-06-11 08:41:32 -06:00
dependabot[bot] b508c09e73 build(deps): bump crypto-primes from 0.7.0 to 0.7.1 (#1375) 2026-06-10 12:40:27 -06:00
Tony Arcieri dbc983378f ecdsa v0.17.0-rc.19 (#1376) ecdsa/v0.17.0-rc.19 2026-06-10 12:25:05 -06:00
Tony Arcieri a8c7206efe rfc6979 v0.6.0-pre.0 (#1373)
The changes in #1360 were breaking, so this release bumps the minor
version.

It might be possible to get some additional breaking changes in as well,
if we can land RustCrypto/crypto-bigint#1266.
rfc6979/v0.6.0-pre.0
2026-06-06 13:00:38 -06:00
Arthur Gautier 332fe968e4 slh-dsa,xmss: replace sha3 with shake (#1359)
Co-authored-by: Tony Arcieri <bascule@gmail.com>
2026-06-06 12:45:41 -06:00
Tony Arcieri 1b47ec5298 dsa: impl Generate for Components and SigningKey (#1372)
This renames the old `SigningKey::generate` to
`try_generate_from_rng_with_components`, having the new one generate
random `Components` with a 3072-bit modulus size, which is now the
`Default` for `KeySize`.
2026-06-06 11:27:17 -06:00
Arthur Gautier 43d9831ccf rfc6979: allow the use of non-block_api-backed hashes (#1360)
Never mind, I'll take care of it
2026-06-06 09:58:40 -06:00
Thomas 57a7cd7519 feat(ml-dsa): expose c_tilde getter on Signature (#1362)
Add public accessor for the challenge hash component of ML-DSA
signatures, needed by hybrid schemes that share
the challenge across both classical and post-quantum components.
2026-06-06 07:13:05 -06:00
dependabot[bot] 6618db4e48 build(deps): bump crate-ci/typos from 1.46.0 to 1.47.0 (#1366) 2026-06-06 07:12:36 -06:00
Tony Arcieri d69d20a240 Cargo.lock: bump dependencies 2026-06-05 12:34:37 -06:00
Tony Arcieri f75d5b8299 ml-dsa v0.1.1 (#1371) ml-dsa/v0.1.1 2026-06-05 12:32:04 -06:00
dependabot[bot] 63a79f3822 build(deps): bump elliptic-curve from 0.14.0-rc.32 to 0.14.0-rc.33 (#1368) 2026-06-04 09:06:09 -06:00
Tony Arcieri 275aea5146 dsa: add TryCryptoRng support (#1367)
This renames the previous `generate` methods to
`try_generate_from_rng_with_key_size` and changes them to accept a
`TryCryptoRng`, returning a `Result` with potential RNG errors.

This helps clear the way for implementing the `Generate` trait from
`crypto-common`, which defines its own `generate` method which takes
no parameters, using the system RNG and default key size.
2026-06-02 15:20:32 -06:00
Kingsley Yung c97a63150d ml-dsa: alloc feature implies module-lattice/alloc (#1365)
Enable `module-lattice/alloc` feature when the `alloc` feature is
enabled. With this change, users don't need to add an explicit entry
`module-lattice` at `Cargo.toml` to enable the `alloc` feature of the
`module-lattice` crate.

This also aligns with the behavior of the `ml-kem` crate.
2026-06-02 07:33:00 -06:00
Tony Arcieri 699547f9c3 ml-dsa v0.1.0 (#1356) ml-dsa/v0.1.0 2026-05-17 09:37:36 -06:00
Tony Arcieri 4055f370fd ml-dsa: migrate from sha3 to shake (#1355)
See: RustCrypto/hashes#869
2026-05-16 12:28:18 -06:00
dependabot[bot] 3166358438 build(deps): bump hybrid-array from 0.4.11 to 0.4.12 (#1353) 2026-05-11 17:27:22 -06:00
Tony Arcieri ad600420a1 rfc6979: migrate from subtle to ctutils (#1352)
The usage is an internal implementation detail, so this is not a
breaking change.

See also: RustCrypto/meta#29
2026-05-10 16:43:34 -06:00
Tony Arcieri 3b596f42eb README.md: fix xmss badges 2026-05-10 15:54:54 -06:00
Tony Arcieri 59fea640a4 ml-dsa v0.1.0-rc.11 (#1351)
This should be a true "release candidate" in that there are no
additional changes intended to be made before a final release, we're
just waiting for some final feedback on recent changes.
ml-dsa/v0.1.0-rc.11
2026-05-10 15:53:13 -06:00
Tony Arcieri 093267c91d ml-dsa: use MaybeBox from module-lattice crate (#1350)
The `MaybeBox` type was moved to `module-lattice` so it could also be
used with the `ml-kem` crate.

See RustCrypto/KEMs#309
2026-05-10 15:12:31 -06:00
Tony Arcieri fb08f196a7 ml-dsa: remove KeyGen trait (#1349)
It has been replaced by the `KeyInit` and `Generate` traits from the
`crypto-common` crate.

See also: #1342
2026-05-09 17:16:38 -06:00
Tony Arcieri a39b5af547 CI: add workspace-level doc check (#1348)
Ensures the docs for all crates build without warnings
ml-dsa/v0.1.0-rc.10
2026-05-09 17:02:21 -06:00
Tony Arcieri 0842fa86ff ml-dsa: add SigningKey::as_seed (#1347)
Provides a way of borrowing `&Seed` instead of making a copy as with
`SigningKey::to_seed`.
2026-05-09 17:00:38 -06:00
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
Tony Arcieri c3ded0c799 ml-dsa: use MaybeBox for SigningKey (#1345)
Opportunistically stores the parts of `SigningKey` on the heap when the
`alloc` feature is enabled, similar to what #1344 did for
`VerifyingKey`.

This also addresses #1308 by adding a `Drop` (and `ZeroizeOnDrop`) impl
to `SigningKey` which clears the `Seed`.
2026-05-09 16:03:49 -06:00
Tony Arcieri 7336ca4af8 ml-dsa: use MaybeBox to store VerifyingKey (#1344)
When the `alloc` feature is enabled, uses `Box` to offload the largest
parts of `VerifyingKey` to the heap.

This also extracts an internal `PrecomputedValues` struct to store the
largest components of the key, which are all derived/precomputed values,
as a single contiguous struct in a `MaybeBox`, and extracts some of the
relevant logic to it.
2026-05-09 15:28:23 -06:00
Tony Arcieri e3f07e9ce5 ml-dsa: expand usage docs (#1343) 2026-05-09 14:53:34 -06:00
Tony Arcieri 62fa7ac438 ml-dsa: implement KeyInit, KeyExport, KeySizeUser (#1342)
Implements these traits sourced from the `crypto-common` crate.

Also implements the `Generate` trait for key generation, replacing the
previous `KeyGen` trait, which this commit deprecates in favor of using
`KeyInit` and `Generate`.

This also adds a `getrandom` feature that forwards through to
`crypto-common`, making methods available on the `Generate` trait when
enabled.
2026-05-09 14:19:30 -06:00
Tony Arcieri 20b0095bd9 ml-dsa: factor from_seed method onto SigningKey (#1341)
Extracts a `SigningKey::from_seed` that was previously defined on
`MlDsaParams` via a trait impl.

This changes it to an inherent method, and has the trait method call the
inherent method.

This makes it possible to restrict the visibility of `SigningKey`
fields, addressing a TODO.
2026-05-08 10:12:42 -06:00
Tony Arcieri f9f4c60d78 ml-dsa: rename ExpandedSigningKey field/method to expanded_key (#1340)
This is a vestige from when `SigningKey` was a keypair type.

Also marks it `#[doc(hidden)]` as it exists primarily for testing.
2026-05-08 09:34:29 -06:00
Tony Arcieri e5f9f64231 ml-dsa: extract signing and verifying modules (#1339)
Extracts code previously in `lib.rs` related to the following types into
two modules:

- `signing`: `SigningKey`, `ExpandedSigningKey`
- `verifying`: `VerifyingKey`
2026-05-08 09:04:40 -06:00
Tony Arcieri 0c7cf02d1b ml-dsa: apply and fix workspace-level lints (#1338)
Applies the workspace-level config added in #1323 to this crate and
fixes any failures.
2026-05-07 21:14:26 -06:00
Tony Arcieri ebe040ee89 rfc6979 v0.5.0 (#1337) rfc6979/v0.5.0 2026-05-06 12:55:52 -06:00
xjd 4854bcfa4d ml-dsa: optimize rejection sampling in rej_(ntt|bounded)_poly (#1291)
It seems like filling matrix is a bottleneck of decoding encapsulation key.

With simple changes, it gets better performance.
2026-05-06 12:45:56 -06:00
dependabot[bot] 2399f8ae6e build(deps): bump digest from 0.11.2 to 0.11.3 (#1329) 2026-05-06 12:04:03 -06:00
Tony Arcieri 8c849e0e2f rfc6979: apply and fix workspace-level lints (#1336)
Applies the workspace-level config added in #1323 to this crate and
fixes any failures.
2026-05-06 11:54:08 -06:00
Tony Arcieri 78c2b75436 ed448 v0.5.0 (#1335) ed448/v0.5.0 2026-05-06 11:30:51 -06:00
Tony Arcieri 668b85189c ed448: apply and fix workspace-level lints (#1334)
Applies the workspace-level config added in #1323 to this crate and
fixes any failures.
2026-05-06 11:13:09 -06:00
Tony Arcieri 3f353f90ea ed448: use serdect for serde support (#1333)
Like #1324 did for `ed25519`, this uses the `serdect` crate for the
`serde` implementation, which is a breaking change.

See comments in #1324 for more information.
2026-05-06 10:43:42 -06:00
dependabot[bot] 2ac115c5fe build(deps): bump serdect from 0.4.2 to 0.4.3 (#1330) 2026-05-05 15:21:43 -06:00
Tony Arcieri d5012d5ba3 ed25519: add back serde_bytes support (#1332)
Since `serdect` changes the wire format, this should at least provide
backwards compatibility for `serde_bytes` users.
2026-05-05 15:09:40 -06:00
dependabot[bot] b60664ed3c build(deps): bump crate-ci/typos from 1.45.0 to 1.46.0 (#1331) 2026-05-04 14:16:34 -06:00
dependabot[bot] a1eb4e0982 build(deps): bump signature from 2.2.0 to 3.0.0 (#1328) 2026-05-04 13:44:28 -06:00