Converting PGP public keys to RSA Public key XML Format?

While generally it is possible to extract key material from an OpenPGP RSA key (note that OpenPGP also gets use of DSS/Elgamal keys), your example is somewhat inconsistent, as it states public OpenPGP key and private RSA/XML key. So I think it makes sense to sort these things out before you continue (as it is impossible to get private RSA key from a public RSA key).

1 Strictly speaking it isn't impossible, it just takes a bit of time, that's all :) – Lasse V. Karlsen? May 23 at 18:05 @KenJhonson: What I tried to convey was to convert OpenPGP public key to RSA public key XML format.By change I pasted the private key XML text.

Thanks for pointing out. So what I could understand from your response is that, its possible to retrieve public keys with some custom code. – AbrahamJP May 23 at 18:13 1 @AbrahamJP: Yes.

The structure of OpenPGP keys is defined in RFC 4880. Basically, you should do the following: 1) decode the key if you got it in base64 encoded form, 2) read the contents of the key file packet-by-packet, searching for RSA key and/or RSA subkey packet (depending on the requirements of your task), 3) extract n and e values from it, 4) envelope them into an appropriate XML structure. Probably some OpenPGP API vendors offer such functionality... Yet I can't say that this is a complex task indeed.

– Ken Johnson May 23 at 20:42 Thanks for the detailed instructions. – AbrahamJP May 230 at 7:42.

Finally got what I was looking for from this SO post. BouncyCastle RSAPrivateKey to . NET RSAPrivateKey.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions