Public Key
ELI5 — The Vibe Check
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 (your private key). You can share your public key with literally everyone; it's designed to be public.
Real Talk
In asymmetric cryptography, the public key is the non-secret half of a key pair. It's used to encrypt data (that only the private key can decrypt) or to verify digital signatures (created by the private key). RSA and ECC are common public-key algorithms.
Show Me The Code
# Generate RSA key pair
openssl genrsa -out private.pem 2048
openssl rsa -in private.pem -pubout -out public.pem
# Encrypt with public key
openssl rsautl -encrypt -pubin -inkey public.pem \
-in message.txt -out message.enc
When You'll Hear This
"Share your public key with the CI system for deployment." / "The public key is in your ~/.ssh/id_rsa.pub file."
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.
Private Key
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.
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.