RSA, Certificates and Chain of trust Flashcards
what is .pem file extension used for?
pem is extension that is used for files that include certificates. And also we can use that extension for storage of private key.
what does the below openssl command do?
openssl genrsa -aes256 -out private.pem
generates a encrypted private key. Encryption is done using aes256 algorithm. This key is saved to a output file name private.pem
openssl genrsa -aes256 -out private.pem
In this command that is used to generate a key, we see it is a private key. Where then is the public key?
Public key is also encoded here in private key and we are able to extract it from this private key.
And for that you can use other command.
openssl rsa -in private.pem -outform PEM -pubout -out public.pem
what does this command do?
openssl rsa -in private.pem -outform PEM -pubout -out public.pem
this will extract the public key out of the file private.pem, and save it to the file public.pem