Public/Private keys in OpenSSL Flashcards
(12 cards)
How do you create a private key in OpenSSL?
openssl genrsa -out <fileName> <2048>
How do you investigate a private key without outputting the contents?
openssl rsa -text -in <fileName> -noout
How do you write the public key associated with the private key to a file?
openssl rsa -in <inputFileName> -pubout -out <outputFileName>
How do you encrypt a file called file.txt and output a file called encrypted-file.txt?
openssl pkeyutl -encrypt -inkey udemy-rsa.pem -pubin -in file.txt -out encrypted-file.txt
How do you decrypt a file called encrypted.txt and output to decrypted-file.txt?
openssl pkeyutl -decrypt -inkey udemy-rsa.pem -in encrypted-file.txt -out decrypted-file.txt
How do you generate an Elliptic Curve related private key?
openssl ecparam -genkey -name prime256v1 -noout -out ecc-key.pem
What does pem stand for in pem key?
Privacy Enhanced Mail
What does DER stand for?
Distinguished Encoding Rules
What is a difference between a pem file and a der file?
A der file does not contain any human readable data like BEGIN FILE
How do we get the binary (DER) representation of the keys?
openssl ec -in ecc-key.pem -text