Public/Private keys in OpenSSL Flashcards

1
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you create a private key in OpenSSL?

A

openssl genrsa -out <fileName> <2048>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do you investigate a private key without outputting the contents?

A

openssl rsa -text -in <fileName> -noout

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do you write the public key associated with the private key to a file?

A

openssl rsa -in <inputFileName> -pubout -out <outputFileName>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How do you encrypt a file called file.txt and output a file called encrypted-file.txt?

A

openssl pkeyutl -encrypt -inkey udemy-rsa.pem -pubin -in file.txt -out encrypted-file.txt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do you decrypt a file called encrypted.txt and output to decrypted-file.txt?

A

openssl pkeyutl -decrypt -inkey udemy-rsa.pem -in encrypted-file.txt -out decrypted-file.txt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How do you generate an Elliptic Curve related private key?

A

openssl ecparam -genkey -name prime256v1 -noout -out ecc-key.pem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does pem stand for in pem key?

A

Privacy Enhanced Mail

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does DER stand for?

A

Distinguished Encoding Rules

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a difference between a pem file and a der file?

A

A der file does not contain any human readable data like BEGIN FILE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How do we get the binary (DER) representation of the keys?

A

openssl ec -in ecc-key.pem -text

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly