0

I am try to generate a private key from rsa public key. My attempts to use the formulas from this solution were unfortunately unsuccessful, because the codes never matched. My target is to calculate an RSA 1024 bit private key from this public key.

Edit: I have now added the public key, because the previous one was an entire certificate.

-----BEGIN PUBLIC KEY-----
MIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQD1cJDUjO87H/eM+VxtUxB5gHIH
W2Q1wniS6kxXPzaEnPPzaQflsEHOV2mrCnXd2qsa9Soqpl5U0x3OlzjXnaYRfck7
0BsppFRnEFfhPFmXOKxv4pCx30O9O+yAD69Z8h+OGJtL2DQfPpcTuOxxwYS77BfG
rSymPSF0gLFV1mn4AwIBAw==
-----END PUBLIC KEY-----
Nico
  • 9
  • 5
  • RSA keys start with -----BEGIN PUBLIC KEY----- or -----BEGIN RSA PRIVATE KEY-----. Are you sure what you are trying to use is actually an RSA private key? – Diiaablo Jan 07 '21 at 13:11
  • 1
    If it's a *real* public key, then you won't be able to do that. If you could, then RSA would be very broken. – Matt Timmermans Jan 07 '21 at 13:52
  • 1
    To generate an RSA private key from the public key: step 1, factor the modulus. Step 2: there is no step 2. For a real RSA 1024-bit key step one will take about 100 million CPU years, per https://crypto.stackexchange.com/questions/70829/how-long-does-it-take-to-crack-rsa-1024-with-a-pc. If it were easier than that, there'd be no use for it. (and RSA-1024 is "too easy to break" by modern standards). – bartonjs Jan 07 '21 at 19:18
  • Those "formulas" only work when the RSA key was generated using a grievously flawed algorithm. Do you have some reason to suspect that is the case here? – President James K. Polk Jan 07 '21 at 21:47
  • The file is already 13 years old and probably only uses standard RSA encryption. – Nico Jan 08 '21 at 07:34

0 Answers0