1

For learning purposes, how to get the RSA's parameters (I use standard notation):

$n = p q $, where $p$ and $q$ are prime and $e$, $d$, such that $ed = 1 \ (mod\ \varphi (n)) $ when doing

ssh-keygen -t rsa -b 2048

i.e. how to get those parameters from the output:

----BEGIN PRIVATE KEY----
F2847XAPM...
...
----END PRIVATE KEY----

Note: this question is the reverse of What data is saved in RSA private key?: how to recover these parameters from the keys produced by ssh-keygen -t rsa -b 2048 (and not how to ask sshkeygen or openssl to output them from the start).

Basj
  • 563
  • 5
  • 25

0 Answers0