signatures icon indicating copy to clipboard operation
signatures copied to clipboard

dsa: migrate from `num-bigint-dig` to `crypto-bigint`

Open tarcieri opened this issue 1 year ago • 1 comments

The num-bigint(-dig) crate(s) implement operations in a non-constant-time manner. Notably they include a normalize function which strips trailing zeros, which is called all over the place.

The crypto-bigint crate has been written from the ground-up paying attention to constant-time, and the latest crypto-bigint prereleases support a BoxedUint which is suitable for use with dsa:

https://docs.rs/crypto-bigint/0.6.0-pre.11/crypto_bigint/struct.BoxedUint.html

Additionally, the latest prerelease of the crypto-primes crate support generic operation over Uint and BoxedUint:

https://docs.rs/crypto-primes/0.6.0-pre.0/crypto_primes/fn.generate_prime_with_rng.html

tarcieri avatar Jan 17 '24 01:01 tarcieri

PR for this open under #784

tarcieri avatar Jan 17 '24 16:01 tarcieri