I hope that this question is not off topic here.
When I use GnuPG I can get a secret key saved as a file. Opening this file in a text editor I see that the key is encoded with base64. How do I find the actual prime number from the secret key? That is, how to I go from, say a 2048 bit, key to prime number?
I would like to see an algorithm that takes the file and gives he prime number.
I would also like to know how to make the secret key file given an actual prime number.