Public-key cryptography uses two linked keys: a public key anyone can see and a private key only the owner holds. The public key encrypts or verifies. The private key decrypts or signs. A message encrypted to a public key opens only with the matching private key. Parties do not share one secret in advance.
HTTPS uses this to set up an encrypted channel. OpenPGP and S/MIME use it for email. Every blockchain spend is a public-key signature proving the owner authorized it. Computing a public key from a private key is easy. Reversing it is not practical. That one-way gap is why strangers can transact securely. The private key decrypts data or creates signatures.
This eliminates the need to share a single secret key between parties. Email programs supporting OpenPGP or S/MIME use the same math for privacy and sender authentication. Every blockchain transaction relies on public-key signatures to prove ownership. The system works because of mathematical one-way functions.
It is easy to compute the public key from the private key, but practically impossible to reverse the process. Diffie-Hellman (1976) showed two parties can agree a secret on an open channel. Bitcoin and TLS still use public-key math.
Public-Key Cryptography
Secure communication using two mathematically linked keys: a public key for encryption and a private key for decryption