How HTTPS Uses Public-Key Cryptography
HTTPS is HTTP protected by Transport Layer Security, or TLS.
It is tempting to describe HTTPS as encrypting every page with a website’s public key, but that is not how modern TLS generally works. In certificate-authenticated TLS 1.3:
- Certificates and public-key signatures help authenticate the connection.
- Key establishment produces the secrets needed for traffic protection.
- Symmetric authenticated encryption protects the application data.
The TLS 1.3 specification distinguishes these roles. It also removes the older static RSA key-exchange method.
For everyday browsing, the practical result is a protected connection to the TLS endpoint serving the website or application. Properly authenticated HTTPS protects application content against passive observers even when the local network is untrusted.
Public Wi-Fi does not automatically make correctly protected HTTPS traffic readable.
Where VPN Protection Ends
A VPN adds an encrypted tunnel for traffic routed through it. Public-key mechanisms can help authenticate VPN peers and establish symmetric tunnel keys, rather than directly encrypting every byte of traffic with a public key.
For example, WireGuard uses Curve25519-based key agreement and ChaCha20-Poly1305 for traffic protection.
The important limitation is that the VPN tunnel ends at the VPN server or gateway.
| Protection | Where the protection ends |
|---|
| HTTPS | At the TLS endpoint serving the website or application |
| VPN tunnel | At the VPN peer or gateway |
| End-to-end encrypted messaging | At the authorized participating devices, according to the system’s design |
A VPN does not replace HTTPS
When you visit an HTTPS website through a VPN, the VPN adds an outer layer around the traffic. Removing that layer at the VPN server does not automatically remove the separate HTTPS protection.
Conversely, traffic without its own protection may become readable beyond the VPN endpoint.
A consumer VPN can also show websites the VPN server’s public IP address instead of your own. But it shifts some trust from your internet provider to the VPN provider; it does not eliminate the need to trust someone.
Encryption does not mean anonymity
Neither HTTPS nor a VPN automatically prevents identification through:
- Account logins.
- Cookies and tracking pixels.
- Browser fingerprinting.
- Location information, such as GPS data.
Encryption also does not necessarily conceal communication timing, size, or every other kind of metadata. The Electronic Frontier Foundation’s VPN guidance explains why connection protection should not be confused with complete anonymity.
Common Uses of Public-Key Cryptography
Public-key systems appear in many everyday tools, although not every use involves encryption directly.
Encrypted messaging and email
End-to-end encrypted messaging uses public-key protocols to help establish secrets between devices. Symmetric keys then protect messages. Some systems derive new message keys over time rather than rely indefinitely on one static secret.
OpenPGP and S/MIME support encrypted and digitally signed email. Protecting message content, however, does not automatically conceal every header or routing detail.
Encrypted files and backups
A system can encrypt a file with a symmetric key, then protect that key for one or more recipients using public-key mechanisms.
This lets someone encrypt data for a recipient without possessing the recipient’s private decryption key. Not every encrypted storage service uses this arrangement, so the details of the product still matter.
Passkeys, SSH, and software signatures
Passkeys and SSH public-key authentication use signatures to prove possession of a private key. They are authentication mechanisms, not examples of encrypting a password with a public key.
Software publishers also use digital signatures so receiving systems can verify the signing key and detect modification. The software itself does not need to be confidential for a signature to be useful.
What Public Key Encryption Cannot Protect You From
Strong cryptography solves specific problems. It cannot compensate for every weakness around it.
Stolen private keys and compromised devices
An attacker may steal a private key or access information on an unlocked, compromised device instead of breaking the encryption mathematics.
Protecting devices, installing software updates, and securing key backups remain essential. Encryption cannot keep information confidential from malware that can read it after decryption.
Lost keys
If data requires a particular private key and no usable recovery mechanism remains, losing that key can make the data unrecoverable.
Before relying on an encryption system, understand how recovery works and who else, if anyone, has authorized access to the necessary key material.
Unverified identities
Encrypting to an attacker’s key still exposes the information to that attacker. Do not ignore certificate warnings, and use key-verification features when the identity of a messaging contact is particularly important.
Overstated security promises
The word “encrypted” does not establish every security property.
For example, forward secrecy is a protocol property intended to protect earlier sessions if a long-term key is compromised later. Simply using a public/private key pair does not provide it.
Likewise, confidentiality and integrity are different protections. Modern authenticated-encryption schemes combine them, but a vague encryption claim does not tell you exactly what a system guarantees.
Public Key Encryption and Quantum Computing
A sufficiently capable quantum computer would threaten widely used public-key systems based on factoring and discrete logarithms, including RSA and conventional elliptic-curve systems.
Post-quantum cryptography uses different mathematical foundations intended to resist known quantum attacks. It does not require users to own quantum computers.
NIST published FIPS 203, specifying the ML-KEM key-encapsulation mechanism, on August 13, 2024. ML-KEM establishes shared secrets; symmetric encryption still handles bulk data protection.
This preserves the broader practical pattern: use public-key mechanisms for establishing protection, then use efficient symmetric cryptography for the data.
Apply Connection-Level Privacy in Everyday Browsing
When evaluating an encryption claim, ask: encrypted between whom, and who controls the decryption capability? That question helps distinguish a secure website connection, a VPN tunnel, and end-to-end encrypted content.
A VPN can add a useful connection-level layer by encrypting VPN-routed traffic, limiting some internet-provider visibility, and masking your public IP address from websites. It is not complete anonymity or a substitute for HTTPS, device security, and safer browsing habits.
👉 Try NordVPN to encrypt VPN-routed traffic and mask your public IP on your phone and computer.