openssl Flashcards
How do u generate a private key and a self signed certificate?
openssl req -x509 -newkey rsa -keyout key.pem -out cert.pem -days 365 -nodes
What is -nodes option in openssl
When u use -nodes option in generating private key, it will not encrypt the private key.
Encryption requires a pass-phrase, so it won’t ask for pass-phrase.
-nodes is actually no DES,
DES is encryption algorithm (symmetrical).
Name some symmetric encryption algorithms.
DES
AES
Name some asymmetric encryption algorithms.
RSA
DSA
ECDSA
What is openssl s_client?
Find out more about it.
What are two important pieces of info a digital certificate contains?
- Public key
- A signature by a CA, proving that public key is valid.
- Signature = (1) Take SHA-1 of the key, (2) Encrypt that SHA-1 digest with CA’s private key, this is the signature.
On the other side: Again take SHA-1 of the public key,
Now decrypt certifictes signature with CA’s public key, they both should match.
While specifying client side certificate in node.js websocket program, what happens when certificate and private key don’t match?
Client program won’t run.
Will throw error ‘key mismatch’
How does a certificate issuing authority identify each certificate it issues?
It gives a unique serial number to each certificate it issues.
How to get openssl version?
openssl version
openssl version -a
Where does Llinux normally keep certificates?
/etc/ssl/certs
/usr/lib/ssl contains the soft-link for above directory
What is a trust store?
It is a collection of trusted root certificates. Which can be used to verify other incoming certificates.
What are common key generation algorithms?
RSA is most common,
DSA is limited to 1024 bits,
ECDSA is not widely supported
For ssh, DSA and RSA are commonly used
What is AES
Advanced Encryption Algorithm Symmetric AES128 AES192 AES256
What are Hardware Security Modules (HSM)?
Find out more about them.
What does a CSR contain?
Public key
Information about the institution requesting certificate (CN, common name, country etc)
It is signed by the private-key corresponding to public key it contains.
Certificate signing request.