Private Key
ELI5 — The Vibe Check
A private key is the secret key that only YOU keep. It can decrypt messages encrypted with your public key, or sign messages to prove they came from you. If someone steals your private key, they can impersonate you completely. Guard it like your bank PIN.
Real Talk
In asymmetric cryptography, the private key is the secret half of a key pair. It decrypts data encrypted with the corresponding public key and creates digital signatures. Private keys must never be shared or committed to version control.
Show Me The Code
# Never commit private keys to git!
# Add to .gitignore:
echo '*.pem\n*.key\n*.p12\n.env' >> .gitignore
# Decrypt with private key
openssl rsautl -decrypt -inkey private.pem \
-in message.enc -out message.txt
When You'll Hear This
"Never commit the private key to the repo." / "Store the private key in a secrets manager, not in the codebase."
Related Terms
Asymmetric Encryption
Asymmetric encryption uses two different keys — one to lock (public key), one to unlock (private key).
Certificate
A certificate is a digital ID card for a website, signed by a trusted authority.
Public Key
A public key is like your open mailbox — anyone can drop a message in it (encrypt data with it), but only you have the key to open the box and read it (you...
TLS (TLS)
TLS (Transport Layer Security) is the updated, actually-secure version of SSL. It's the technology that puts the padlock in your browser's address bar.