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

FIPS compatibility #4

Open fjarri opened 1 year ago

fjarri commented 1 year ago

While the default primality check implemented here (Baillie-PSW test) is time-tested with no counter-examples found, FIPS standard (https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-4.pdf) is more strict. If this library is to be used for RSA, one needs to go through that standard and see if the performed checks, and the details of those checks are compatible with FIPS. In particular,