On Tuesday, September 1, 2020 at 10:30:23 AM UTC-4 star...@codev.com wrote:
> Good day to everyone, > I just would like to ask something with regards to RSA Key generation. > I know everyone knows that we can initialize or create a private key using > pre-generated modulus, public exponent and private exponent. > Is there a way that we can recompute the private key or the modulus given > only the private exponent and the public exponent or, private exponent and > the modulus? > The RSA private key is either {n,e,d} (short form) or {n,e,d,p,q,dp-1,invq} (long form). If you have the short form you can recalculate the long form parameters using the Chinese Remainder Theorem (CRT). The Crypto++ code to calculate the long form parameters given short form is at https://github.com/weidai11/cryptopp/blob/master/rsa.cpp. Checkout the function InvertibleRSAFunction::Initialize(). You may be able to recover a private key given {n,d}. That's because you can sometimes guess the public exponent -- it is usually 3, 17 or 65537. There's no requirement e has to be 3, 17 or 65537. I think the only requirement is e and Phi(n) must be co-prime, where Phi is Euler's Phi-function. Phi(n) = (p-1)(q-1). So you can select a random e, coprime to Phi(n), with a low hamming weight, and RSA will work just fine. You will probably have trouble recovering a private key given {e,d}. You have to guess the modulus. Jeff -- You received this message because you are subscribed to "Crypto++ Users". More information about Crypto++ and this group is available at http://www.cryptopp.com and http://groups.google.com/forum/#!forum/cryptopp-users. --- You received this message because you are subscribed to the Google Groups "Crypto++ Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to cryptopp-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/cryptopp-users/cdc5c7cb-8ffb-4d80-969a-8b67f9d3c1c6n%40googlegroups.com.