RustCrypto/RSA

Missing check in prime generation?

darconeous opened this issue · 4 comments

I was reading the RSA key generation code and I couldn't seem to find the check where we make sure that $e$ is not a factor of $(q-1)$ or $(q-1)$.

Am I missing something? Without that check, it would seem that some small portion (~ $2/e$ ) of the generated keys would be invalid (the private key would be incapable of properly decrypting or signing).

I hope I'm just missing it.

Going to go ahead and close this. Reopen if you disagree.

@dignifiedquire we might consider adding a comment about this to assist people looking for it in the future