entropyxyz / crypto-primes

Random prime generation and primality testing library based on `crypto-bigint`.
https://docs.rs/crypto-primes
Apache License 2.0
17 stars 4 forks source link

`BoxedUint` support #34

Closed tarcieri closed 9 months ago

tarcieri commented 10 months ago

crypto-bigint v0.6.0-pre.0 has a much more featureful BoxedUint type than previous releases which hopefully supports all of the prerequisites required for random prime generation: https://docs.rs/crypto-bigint/0.6.0-pre.0/crypto_bigint/struct.BoxedUint.html

We would like to migrate from num-bigint-dig to crypto-bigint in the rsa crate, notably because the current implementation has a timing sidechannel vulnerability. A full migration will require prime generation / primality testing, hence my interest in this issue.

fjarri commented 10 months ago

We will need something like the traits described in https://github.com/RustCrypto/crypto-bigint/issues/70#issuecomment-1699951193 to generalize the methods over Uint/BoxedUint

fjarri commented 10 months ago

I've made a draft PR #36 to see what kind of traits we need for crypto-primes to work