Interconvertibility of asymmetric key containers (e.g. X.509, PGP, OpenSSH)

Are asymmetric cryptographic keys fundamentally interchangeable between the main formats of key containers? For example, is it possible to convert an X.509 key file to a PGP or OpenGPG key file?

And - provided that the answer is yes - it is "neutral security" in order to save one key pair in any format and convert to whatever format the container file is needed for the case?

I'm a little tired of supporting so many key pairs for X.509, OpenGPG and SSH, when they are all RSA based.

+4
source share
3 answers

Yes and no: yes, RSA keys embedded in certificates and private keys are just numbers. You can extract them from the certificate and use them to create keys in other formats. This is usually done to convert between different certificate formats.

PGP has some X.509 support for S / MIME, but is not able to use X.509 privkeys verbatim.

SSH has beta support for the direct use of X.509 keys and certificates.

+5
source
+2
source

I would also look at OpenSSL. It has so many different -in and -out functions that can probably convert certificates. from one type to another.

Take a look at http://marc.info/?l=openssl-users&m=105162569405053&w=2

0
source

Source: https://habr.com/ru/post/1276651/


All Articles