Commit Graph

1220 Commits

Author SHA1 Message Date
Tony Arcieri e0d47990aa Update copyright year to 2026 (#1322) 2026-05-02 18:10:44 -06:00
Tony Arcieri 088a4fe7a4 Bump signature dependency to v3 (#1321)
Release PR: RustCrypto/traits#2400
2026-05-02 15:16:18 -06:00
Onyeka Obi 826baa3682 Implement Hash on non-secret Signature and VerifyingKey types (#1309)
Per #1229: Signature and public-key types lack `Hash`, which prevents
use in `HashMap` / `HashSet` keys and similar collections.

- ecdsa: Signature, DER Signature, SignatureWithOid
- ed25519: Signature, pkcs8::PublicKeyBytes
- ed448: Signature, pkcs8::PublicKeyBytes
- ml-dsa: Signature, VerifyingKey
- slh-dsa: Signature, VerifyingKey

Where a trivial derive works (ed25519, ed448), uses derive. Where
generic bounds or upstream gaps require it, uses a manual impl over
the canonical serialized bytes (`to_bytes` / `encode` / `as_bytes`),
which is the natural Hash domain for these types anyway.

Closes #1229
2026-05-01 16:17:15 -06:00
Tony Arcieri f3c409ee83 ml-dsa: add internal MaybeBox type (#1320)
Adds an internal type for opportunistic heap offload which uses `Box`
when the `alloc` feature is available and falls back to stack allocation
when it is not.

So far it's only used for the `z` component of `Signature` but is useful
elsewhere, e.g. for `VerifyingKey`.

It's so generally useful it should probably get extracted somewhere, to
`module-lattice` at the very least, but this is enough to get started.
2026-04-30 11:13:41 -06:00
Tony Arcieri 58bae19939 Cut new prereleases (#1319)
Releases the following, which all now depend either directly or
transitively on `pkcs8` v0.11 (which had breaking changes in the final
release)

- `dsa` v0.7.0-rc.15
- `ecdsa` v0.17.0-rc.18
- `ed25519` v3.0.0-rc.5
- `ed448` v0.5.0-rc.6
- `ml-dsa` v0.1.0-rc.9
- `slh-dsa` v0.2.0-rc.5
- `xmss` v0.1.0-pre.1
ml-dsa/v0.1.0-rc.9 slh-dsa/v0.2.0-rc.5 ecdsa/v0.17.0-rc.18 xmss/v0.1.0-pre.1 ed448/v0.5.0-rc.6 ed25519/v3.0.0-rc.5 dsa/v0.7.0-rc.15
2026-04-28 10:08:48 -06:00
Tony Arcieri 2eadc3c766 ml-dsa: bump module-lattice to v0.2.2 (#1318) 2026-04-28 09:36:10 -06:00
Tony Arcieri 452633d33a ecdsa: bump elliptic-curve to v0.14.0-rc.32 (#1317)
This version requires `pkcs8` v0.11
2026-04-28 09:35:52 -06:00
Tony Arcieri 86c035a74f Bump pkcs8 dependency to v0.11 (#1316)
Release PR: RustCrypto/formats#2314
2026-04-28 08:32:20 -06:00
dependabot[bot] f873b8e758 build(deps): bump hybrid-array from 0.4.10 to 0.4.11 (#1314) 2026-04-27 13:09:18 -06:00
Tony Arcieri d8b1875a9f Bump pkcs8 to v0.11.0-rc.12 (#1312) 2026-04-27 13:07:45 -06:00
dependabot[bot] 00e6eed7b2 build(deps): bump typenum from 1.19.0 to 1.20.0 (#1306) 2026-04-27 10:27:46 -06:00
Tony Arcieri f93d5022da ml-dsa: fix unreachable_pub lint by making Eta pub (#1311)
This lint started failing, seemingly as of Rust 1.95. Though this may
not be the best solution, to get the lint to pass again this makes `Eta`
pub.
2026-04-27 09:15:21 -06:00
Onyeka Obi 0efe0f8936 ecdsa: use absolute 128-bit floor for bits2field (#1310)
Per maintainer suggestion on #1275, replace the curve-specific
`FieldBytesSize / 2` minimum with an absolute 16-byte / 128-bit
floor. The old rule rejected legitimate pairings like SHA-256 with
P-521 (permitted by e.g. XML Signature); the new rule still catches
egregious digest misuse without those false positives.

Closes #1275
2026-04-27 08:50:50 -06:00
Tony Arcieri f467f70447 ecdsa v0.17.0-rc.17 (#1304) ecdsa/v0.17.0-rc.17 2026-04-15 13:41:21 -06:00
Tony Arcieri a39b93d604 ecdsa: bump spki to v0.8 (#1303)
Release PR: RustCrypto/formats#2277
2026-04-15 13:23:50 -06:00
Tony Arcieri 6752ba4cbe ecdsa: use mul_by_generator_and_mul_add_vartime for verification (#1302)
This high-level method can plug into various strategies for efficiently
implementing `aG + bP`, including using basepoint tables, wNAF, or
linear combinations, depending on what crate features are enabled and
what curve-specific optimizations have been implemented.
2026-04-15 12:49:14 -06:00
Peter Membrey ecaf35904d ml-dsa: zeroize NTT-domain derived values in ExpandedSigningKey Drop (#1300)
The existing Drop impl for ExpandedSigningKey (gated on the zeroize
feature) zeroizes rho, K, tr, s1, s2, and t0 but skips the
NTT-domain derived values s1_hat, s2_hat, and t0_hat.

The NTT is invertible, so s1_hat in memory is equivalent to having
s1. This leaves secret key material unzeroized after drop.

Add s1_hat, s2_hat, and t0_hat to the Drop impl. All three are
NttVector types which implement Zeroize via module-lattice.

A_hat (the public matrix derived from rho) is not zeroized here
because NttMatrix does not implement Zeroize in module-lattice.
A_hat is derived from public data (rho) so this is lower priority,
but a follow-up PR to module-lattice could add Zeroize for NttMatrix
for completeness.
2026-04-15 10:53:09 -06:00
Tony Arcieri 66de36e62f xmss: delete Cargo.lock (#1301)
This is leftover from when it was originally imported. It's now a part
of the workspace and uses the workspace's Cargo.lock
2026-04-14 14:27:43 -06:00
Tony Arcieri a9b80562a9 Cargo.lock: bump deps (#1299) 2026-04-14 08:47:04 -06:00
dependabot[bot] 8cb1795140 build(deps): bump elliptic-curve from 0.14.0-rc.29 to 0.14.0-rc.30 (#1292) 2026-04-09 08:47:57 -06:00
Tony Arcieri 66473ecba8 xmss: bump format dependencies (#1290)
Bumps the following dependencies:

- `const-oid` v0.10
- `der` v0.8
- `pkcs8` v0.11.0-rc.11
- `spki` v0.8
2026-04-06 14:16:17 -06:00
dependabot[bot] 37f9be5bca build(deps): bump actions/checkout from 5.0.1 to 6.0.2 (#1289) 2026-04-06 08:52:04 -06:00
dependabot[bot] a031db91a4 build(deps): bump crate-ci/typos from 1.44.0 to 1.45.0 (#1288) 2026-04-06 08:40:58 -06:00
Arthur Gautier d011b9a356 ml-dsa: make PartialEq for ExpandedSigningKey constant time (#1286) 2026-04-03 16:58:36 -06:00
dependabot[bot] f282377eb6 build(deps): bump ctutils from 0.4.0 to 0.4.2 (#1285) 2026-04-03 09:01:18 -06:00
Tony Arcieri fc8907dde0 Bump sha3 dependency to v0.11 (#1283)
Release PR: RustCrypto/hashes#816
2026-04-03 08:34:07 -06:00
Tony Arcieri 76822a8af0 bign-genk v0.1.0-pre.0 (#1282) bign-genk/v0.1.0-pre.0 2026-04-02 22:42:04 -06:00
Arthur Gautier 73e7128459 ml-dsa: missing derives on SigningKey (#1281)
When ExpandedSigningKey was split from SigningKey in #1261, the derive
for Clone and PartialEq got removed.
2026-04-02 22:17:29 -06:00
dependabot[bot] 902819d431 build(deps): bump hybrid-array from 0.4.9 to 0.4.10 (#1279) 2026-04-01 16:33:27 -06:00
dependabot[bot] 6fd15b6f05 build(deps): bump belt-hash from 0.2.0-rc.5 to 0.2 (#1277) 2026-03-30 10:24:20 -06:00
dependabot[bot] 5c5d8740f4 build(deps): bump hybrid-array from 0.4.8 to 0.4.9 (#1276) 2026-03-30 10:11:59 -06:00
dependabot[bot] 6054a76564 build(deps): bump actions/checkout from 5 to 6 (#1278) 2026-03-30 10:10:42 -06:00
Tony Arcieri d73c1e2ecb Bump hmac to v0.13 (#1274)
Release PR: RustCrypto/MACs#263
2026-03-29 17:48:15 -06:00
GarmashAlex f1c060a225 fix(ecdsa): correct error message for invalid vector.k in dev macro (#1220) 2026-03-27 11:18:28 -06:00
sashass1315 e1acc72d8b fix(slh-dsa): use checked_shl for idx_tree range in tests (#1224) 2026-03-27 11:18:05 -06:00
dependabot[bot] ff2cf64b0c build(deps): bump sha1 from 0.11.0-rc.5 to 0.11 (#1273)
Release PR: RustCrypto/hashes#810
2026-03-27 11:15:30 -06:00
Alexandr Kitaev 32e80942ca bign-genk: Initial implementation (#1109)
See §6.3.3 of https://apmi.bsu.by/assets/files/std/bign-spec295.pdf
2026-03-27 10:37:22 -06:00
Tony Arcieri ecfc95ebc4 ml-dsa v0.1.0-rc.8 (#1272) ml-dsa/v0.1.0-rc.8 2026-03-26 14:38:29 -06:00
Tony Arcieri 4deba8ec98 ml-dsa: bump module-lattice to v0.2 (#1271)
Release PR: RustCrypto/KEMs#279
2026-03-26 13:36:24 -06:00
dependabot[bot] f2a7431e09 build(deps): bump crate-ci/typos from 1.43.4 to 1.44.0 (#1239) 2026-03-26 13:20:35 -06:00
dependabot[bot] 8d862f25c2 build(deps): bump actions/upload-artifact from 6 to 7 (#1240) 2026-03-26 13:20:15 -06:00
Scott Arciszewski 7b0ffd01c1 ml-dsa: use ctutils for constant-time selection; avoid branches (#1245) 2026-03-26 13:19:57 -06:00
Tony Arcieri cdc95068ae Bump pkcs8 to v0.11.0-rc.11 (#1270) 2026-03-26 13:17:39 -06:00
Tony Arcieri 4288c5932c ml-dsa: bump module-lattice to v0.2.0-rc.0 (#1269)
The main changes don't impact this crate (migrating from `subtle` to
`ctutils`, which is used by `ml-kem`)
2026-03-26 09:38:02 -06:00
dependabot[bot] 846ed70696 build(deps): bump crypto-bigint from 0.7.2 to 0.7.3 (#1268) 2026-03-26 08:41:20 -06:00
Arthur Gautier c5989c900e ml-dsa: lower stack size of KeyGen::from_seed by up to 207kb (#1261)
This reworks the API to make KeyGen::from_seed return a
`SeededSigningKey` instead of a `KeyPair`.
The `SeededSigningKey` effectively replaces the `KeyPair`, and instead
of eagerly generating the VerifyingKey (implementing
`signature::KeypairRef`), it implements `signature::Keypair` and makes
the verifying key when requested.

This reduces the depth of the stack when calling from_seed and reduces
the size of the stack by 207kb using ML-DSA-87 in debug/tests builds
(the heaviest consumers).

This is an API break.
2026-03-25 13:32:06 -06:00
dependabot[bot] 81645dc4d7 build(deps): bump proptest from 1.10.0 to 1.11.0 (#1266) 2026-03-25 13:31:08 -06:00
Tony Arcieri abb0c54f39 Bump sha2 dependency to v0.11 (#1267)
Release PR: RustCrypto/hashes#806
2026-03-25 12:44:11 -06:00
dependabot[bot] d3832611ad build(deps): bump digest from 0.10.7 to 0.11 (#1263) 2026-03-25 11:55:33 -06:00
dependabot[bot] dd124206ce build(deps): bump crypto-bigint from 0.7.1 to 0.7.2 (#1264) 2026-03-25 11:31:31 -06:00