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

Safe handling of primes/candidates #15

Open fjarri opened 1 year ago

fjarri commented 1 year ago

In many applications of this library, like RSA or Paillier encryption, the primes being checked or generated are supposed to be secret. Can we enforce the zeroization of them throughout the library? This will have to be extended into crypto-bigint as well.

ok-john commented 1 year ago

Do you think it's better to zeroize on drop with macros or manually zeroize?