9 Commits

Author SHA1 Message Date
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
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
Tony Arcieri 66295315cf Bump rand_core to v0.10.0-rc-6 (#1170)
Renames `(Try)RngCore` => `(Try)Rng`
2026-01-24 15:30:36 -07:00
Tony Arcieri 48b7f61e52 RNG cleanup (#1127)
Switches every crate except `slh-dsa` away from a direct `rand`
dependency they don't need. Right now we can't publish any crate that
directly depends on `rand`.

Uses a consistent default strategy for RNGs: `SysRng`, sourced from the
`getrandom` or as `rand::rngs::SysRng` in the case of `slh-dsa` which is
actually using `rand`-specific features.

If this causes too much of a slowdown, we can re-evaluate and go (back)
to `ChaCha8Rng` where needed for testing.
2025-12-29 21:07:55 -07:00
Arthur Gautier 8f770af1a2 dsa: migrate to crypto-bigint (#906)
Closes #779
2025-04-23 11:30:26 -06:00
Mirek Sedzinski 40649077c2 dsa: gate signing under hazmat feature (#859)
Resolves #858
2025-01-19 14:12:56 -07:00
aumetra 491fe5c2c6 dsa: Small API overhaul (#489) 2022-05-21 14:16:53 -06:00
Tony Arcieri ba86f16292 dsa: rename key types to SigningKey and VerifyingKey (#485)
For consistency with the `ecdsa` crate.

This naming scheme follows the philosophy that in a digital signature
scheme, it's clearer to name keys after their roles.

DSA admittedly benefits less than other schemes where there are other
potential algorithms that can be implemented using the same core
mathematics which share the same key representations.
2022-05-16 16:37:32 -06:00
aumetra 373e4fe08b dsa: Add initial DSA implementation (#471)
Adds an initial implementation of DSA (see #8)  

The following things work when tested against OpenSSL:

- The generated keys are valid and can be imported and exported from/to their DER/PEM representation
- Signatures generated by this library can be successfully verified
- Signatures can be imported and exported from/into their DER representation
- Signatures generated by OpenSSL can be successfully imported and verified
2022-05-16 11:53:39 -06:00