33

I have a 3072 bit RSA key that I generated for use with SSH. Can this key-pair be used with PGP/GPG, or do I need to generate a new pair of keys separately for use in email encryption?

Are the two interchangeable, or is there a difference between the two?

IQAndreas
  • 6,845
  • 10
  • 35
  • 53

1 Answers1

27

Yes, the same RSA key pair can be used for both (Open)SSL and OpenPGP/GnuPG.

The monkeysphere project contains a tool to convert RSA keys in PEM format to the one defined by OpenPGP, pem2openpgp. For converting the SSH key pair into the PEM format, there already is a comprehensive answer in Converting keys between openssl and openssh.

Jens Erat
  • 24,566
  • 12
  • 82
  • 103