Using an RSA GnuPG key for RSA ?

vedaal at vedaal at
Sun Apr 6 16:29:25 CEST 2014

On 04/04/2014 at 4:05 PM, "Leo Gaspard" <ekleog at> wrote:

>Well... As this seems not documented (otherwise I guess someone else would have
>answered you), I'm going to assume there is no such function available in gnupg.


I think it should be quite doable, by those fluent in rfc 2440, 4880,  but I cannot impose upon them if they do not have time to do so.

I will try it myself and see how it goes.

This Is how I thought about doing it.  If anyone has advice about it, I am thankful in advance, but please do not use up your time in asking me for what, and telling me why it can absolutely never work..

I have access to a Professor who is an authority on RSA, and once I have everything done and ready, I can ask him if it would be secure/advisable to proceed,
but cannot take advantage of him by asking more than once.

For simplicity, I would start with a V3 RSA key, 

.(V4 keys have ability to add subkeys, and the ability to have a master key do either signing only, or both signing or encrypting. 
I'm not sure, but think  that because of this, it may add other material that obscures extracting only the RSA part of the key.  
Once I can get it to work with a v3 key, will try to extract part by part from the V4 key).

So, here's the tentative plan:

[1] Generate a v3 test key in pgp 2.x

[2] Import it to GnuPG

[3] Remove the passphrase

[4] Export it as a .asc file

[5] Examine it in PGPdump,  and extract the RSA components

[6] Try it out in an RSA program offline.

(Obviously, for a real secret key, would not use the online PGPdump)

Any help or criticism about how to extract a functional RSA key would be appreciated.



More information about the Gnupg-users mailing list