Explainer
How encryption works (symmetric, public-key and TLS)
Encryption makes data unreadable to everyone except its sender and intended recipient, which is what lets private data cross public networks.[1] Symmetric ciphers such as AES use one shared secret key, while public-key cryptography uses a pair of keys, one public and one private.[2][3][4] The TLS protocol puts them together: a handshake authenticates the server and establishes shared keys, which then protect the traffic.[5][6]
This explainer covers the building blocks of modern encryption and how they fit together in TLS. For the quantum threat in depth, read how quantum computers break encryption and how post-quantum cryptography works. Choose a reading level in each section.
Why encryption matters
Encryption protects things like your emails, medical records and photo libraries.[1] It works by scrambling data so that it looks like nonsense to everyone except the sender and the intended recipient. That is why private data can travel safely over the public internet.[1]
Encryption tools rely on math problems that ordinary computers find difficult or impossible to solve.[7]
NIST frames encryption’s role as making data sent across public networks unreadable to all but sender and recipient.[1] Its security rests on math problems that conventional computers find difficult or impossible to solve.[7]
Symmetric encryption: one shared key
Symmetric encryption uses a single secret key. The same key locks and unlocks the message, so both people need a copy.[2]
A well-known symmetric cipher is AES, the Advanced Encryption Standard. NIST picked it in 2000 as the winner of a competition. It comes in three strengths, AES-128, AES-192 and AES-256, where the number is the length of the key in bits.[3]
NIST defines a symmetric-key algorithm as one using secret keying material shared between authorised parties, with the same key for an operation and its inverse.[2] AES, standardised in FIPS 197, is the Rijndael block cipher selected in 2000; the standard specifies AES-128, AES-192 and AES-256, all operating on 128-bit blocks, with the suffix giving key length.[3] The catch is key distribution: both parties must already hold the same secret.[2]
Public-key cryptography: a key pair
Public-key cryptography avoids the need to share one secret key in advance. It uses two related keys, a public key and a private key, and the private key cannot feasibly be worked out from the public one. One key encrypts or signs, and the other decrypts or checks the signature.[4]
The same idea gives us digital signatures. A signature proves that a message really came from the person who signed it and has not been changed.[8]
Asymmetric cryptography uses separate keys: one to encrypt or sign, the other to decrypt or verify.[4] Digital signatures, specified in NIST’s FIPS 186-5, detect unauthorised modification, authenticate the signatory and support non-repudiation.[8] Hash functions serve integrity checks: the Secure Hash Standard specifies algorithms producing message digests used to detect changes.[9] In TLS, the handshake authenticates the parties and establishes shared keying material, which the record protocol then uses to protect traffic.[6]
How TLS puts it together
TLS is a protocol for secure connections. It makes sure you are talking to the real website, that nobody can read your data, and that nobody can change it on the way.[5]
It starts with a “handshake”. Your browser and the website check the site’s identity and set up shared secret keys. After that, those keys protect the traffic.[6] TLS does not hide how much data you send, though.[10]
RFC 8446 (TLS 1.3, August 2018) aims to provide authentication (the server always, the client optionally), confidentiality and integrity against an attacker with complete control of the network.[5] The handshake authenticates the parties, negotiates cryptographic modes and parameters, and establishes shared keying material, which the record protocol uses to protect traffic.[6] Authentication can use RSA, ECDSA or EdDSA signatures, or a pre-shared symmetric key.[11] TLS 1.3 removed static RSA and static Diffie-Hellman key exchange so that every public-key exchange provides forward secrecy, and it encrypts all handshake messages after the ServerHello.[12] Record lengths remain visible unless padded.[10] How VPNs work covers a related use of the same building blocks.
The quantum question
NIST warns that a powerful enough quantum computer could solve the math problems behind today’s encryption quickly and break it.[7] Some attackers may copy encrypted data now in the hope of decrypting it later.[13] In August 2024 NIST published its first three “post-quantum” standards to replace the vulnerable algorithms.[14]
A sufficiently capable quantum computer could search the solution space of today’s hard problems quickly enough to defeat current encryption.[7] The harvest-now-decrypt-later threat makes this a present concern for long-lived secrets.[13] NIST’s response is FIPS 203 (ML-KEM), FIPS 204 (ML-DSA) and FIPS 205 (SLH-DSA), finalised on 13 August 2024 by the NIST Post-Quantum Cryptography project.[14]
Read next
NIST Post-Quantum Cryptography project
NIST's open, multi-year competition that produced the ML-KEM, ML-DSA and SLH-DSA standards, plus HQC, FN-DSA and the work still in progress.
Questions readers ask
What is the difference between symmetric and asymmetric encryption?
Symmetric encryption uses the same secret key to encrypt and decrypt, so both sides must share it. Asymmetric, or public-key, cryptography uses two separate keys, one to encrypt or sign and the other to decrypt or verify.[2][4]
What does AES-256 mean?
AES is the Advanced Encryption Standard, based on the Rijndael cipher NIST selected in 2000. AES-256 encrypts data in 128-bit blocks using a 256-bit key; AES-128 and AES-192 use shorter keys.[3]
What does TLS do?
TLS authenticates the server and gives the connection confidentiality and integrity, so data cannot be read or changed in transit without detection, even by someone who controls the network.[5]
Is hashing the same as encryption?
No. A hash function produces a fixed digest of a message that is used to detect whether the message has changed. Encryption is designed to be reversed by someone with the key.[9][2]
Does TLS hide everything about my traffic?
Not everything. The TLS 1.3 standard notes that TLS does not hide the length of the data it carries, though endpoints can pad records to make traffic analysis harder.[10]
Sources
· 14 claims from 3 publishers
Each numbered claim is a statement we checked against the sources listed with it. Tap a number in the text to see its sources in place.
- [1]
NIST notes that encryption protects data such as email contents, medical records and photo libraries, and lets encrypted data cross public networks because it is unreadable to anyone but the sender and intended recipient. confirmedas of 2024-08-13
- NIST Releases First 3 Finalized Post-Quantum Encryption Standards · NIST · Primary source · 2024-08-13 · Body (retrieved 2026-11-07)
- NIST Releases First 3 Finalized Post-Quantum Encryption Standards · NIST · Primary source · 2024-08-13 · Body (retrieved 2026-11-07)
- [2]
NIST defines a symmetric-key algorithm as one that uses secret keying material shared between authorised parties, with the same secret key used for an operation and its inverse, such as encryption and decryption. confirmedas of 2026-11-07
- Glossary: symmetric key algorithm · NIST Computer Security Resource Center · Primary source · Definitions (NIST SP 800-56B Rev. 2) (retrieved 2026-11-07)
- Glossary: symmetric key algorithm · NIST Computer Security Resource Center · Primary source · Definitions (retrieved 2026-11-07)
- [3]
AES, the Advanced Encryption Standard, comes from the Rijndael block cipher family that NIST selected in 2000; FIPS 197 specifies AES-128, AES-192 and AES-256, each of which encrypts data in 128-bit blocks, with the number giving the key length in bits. confirmedas of 2023-05-09
- FIPS 197: Advanced Encryption Standard (AES) · NIST Computer Security Resource Center · Primary source · 2001-11-26 · Abstract (retrieved 2026-11-07)
- FIPS 197: Advanced Encryption Standard (AES) · NIST Computer Security Resource Center · Primary source · 2001-11-26 · Abstract (retrieved 2026-11-07)
- [4]
Public-key (asymmetric) cryptography uses two related keys, a public key and a private key that cannot feasibly be derived from the public one, using one to encrypt or digitally sign data and the other to decrypt it or verify the signature; it lets parties communicate securely without first sharing a secret key. confirmedas of 2026-11-07
- Glossary: public key cryptography · NIST Computer Security Resource Center · Primary source · Definitions (FIPS 204) (retrieved 2026-11-07)
- Glossary: public key cryptography · NIST Computer Security Resource Center · Primary source · Definitions (FIPS 204) (retrieved 2026-11-07)
- Glossary: public key cryptography · NIST Computer Security Resource Center · Primary source · Definitions (retrieved 2026-11-07)
- Glossary: public key cryptography · NIST Computer Security Resource Center · Primary source · Definitions (retrieved 2026-11-07)
- [5]
TLS aims to give two communicating parties a secure channel with authentication (the server is always authenticated), confidentiality and integrity, even against an attacker who controls the network. confirmedas of 2018-08-01
- RFC 8446: The Transport Layer Security (TLS) Protocol Version 1.3 · IETF (RFC Editor) · Primary source · 2018-08-01 · Section 1, Introduction (retrieved 2026-11-07)
- RFC 8446: The Transport Layer Security (TLS) Protocol Version 1.3 · IETF (RFC Editor) · Primary source · 2018-08-01 · Section 1, Introduction (retrieved 2026-11-07)
- RFC 8446: The Transport Layer Security (TLS) Protocol Version 1.3 · IETF (RFC Editor) · Primary source · 2018-08-01 · Section 1, Introduction (retrieved 2026-11-07)
- RFC 8446: The Transport Layer Security (TLS) Protocol Version 1.3 · IETF (RFC Editor) · Primary source · 2018-08-01 · Section 1, Introduction (retrieved 2026-11-07)
- RFC 8446: The Transport Layer Security (TLS) Protocol Version 1.3 · IETF (RFC Editor) · Primary source · 2018-08-01 · Section 1, Introduction (retrieved 2026-11-07)
- [6]
TLS has two main parts, a handshake protocol that authenticates the parties, negotiates cryptographic parameters and establishes shared keying material, and a record protocol that uses those keys to protect traffic. confirmedas of 2018-08-01
- RFC 8446: The Transport Layer Security (TLS) Protocol Version 1.3 · IETF (RFC Editor) · Primary source · 2018-08-01 · Section 1, Introduction (retrieved 2026-11-07)
- RFC 8446: The Transport Layer Security (TLS) Protocol Version 1.3 · IETF (RFC Editor) · Primary source · 2018-08-01 · Section 1, Introduction (retrieved 2026-11-07)
- [7]
Encryption relies on math problems that conventional computers find hard to solve, and NIST warns that a sufficiently capable quantum computer could solve them quickly and defeat current encryption. confirmedas of 2024-08-13
- NIST Releases First 3 Finalized Post-Quantum Encryption Standards · NIST · Primary source · 2024-08-13 · Body (retrieved 2026-11-07)
- [8]
Digital signatures are used to detect unauthorised changes to data and to authenticate who signed it, and can give a recipient evidence that the claimed signatory really produced the signature. confirmedas of 2023-02-03
- FIPS 186-5: Digital Signature Standard (DSS) · NIST Computer Security Resource Center · Primary source · 2023-02-03 · Abstract (retrieved 2026-11-07)
- FIPS 186-5: Digital Signature Standard (DSS) · NIST Computer Security Resource Center · Primary source · 2023-02-03 · Abstract (retrieved 2026-11-07)
- [9]
NIST's Secure Hash Standard specifies hash algorithms that produce message digests, which are used to detect whether a message has been changed since the digest was generated. confirmedas of 2015-08-04
- FIPS 180-4: Secure Hash Standard (SHS) · NIST Computer Security Resource Center · Primary source · 2015-08-04 · Abstract (retrieved 2026-11-07)
- [10]
TLS does not hide the length of the data it carries, though endpoints can pad records to make traffic analysis harder. confirmedas of 2018-08-01
- RFC 8446: The Transport Layer Security (TLS) Protocol Version 1.3 · IETF (RFC Editor) · Primary source · 2018-08-01 · Section 1, Introduction (retrieved 2026-11-07)
- [11]
In TLS 1.3, authentication can use asymmetric cryptography such as RSA, ECDSA or EdDSA, or a symmetric pre-shared key. confirmedas of 2018-08-01
- RFC 8446: The Transport Layer Security (TLS) Protocol Version 1.3 · IETF (RFC Editor) · Primary source · 2018-08-01 · Section 1, Introduction (retrieved 2026-11-07)
- [12]
TLS 1.3, published in August 2018, removed static RSA and Diffie-Hellman key exchange so that all public-key key exchanges provide forward secrecy, and it encrypts all handshake messages after the ServerHello. confirmedas of 2018-08-01
- RFC 8446: The Transport Layer Security (TLS) Protocol Version 1.3 · IETF (RFC Editor) · Primary source · 2018-08-01 · Section 1.2, Major Differences from TLS 1.2 (retrieved 2026-11-07)
- RFC 8446: The Transport Layer Security (TLS) Protocol Version 1.3 · IETF (RFC Editor) · Primary source · 2018-08-01 · Section 1.2, Major Differences from TLS 1.2 (retrieved 2026-11-07)
- [13]
In a "harvest now, decrypt later" attack, an adversary captures encrypted data today and stores it, hoping a future quantum computer will break the encryption. confirmedas of 2026-10-10
- What Is Post-Quantum Cryptography? · NIST · Primary source (retrieved 2026-10-10)
- NIST IR 8547 (Initial Public Draft): Transition to Post-Quantum Cryptography Standards · NIST · Primary source · 2024-11-12 (retrieved 2026-10-10)
- [14]
On 13 August 2024 NIST published its first three finalized post-quantum standards, FIPS 203 (ML-KEM), FIPS 204 (ML-DSA) and FIPS 205 (SLH-DSA). confirmedas of 2024-08-13
- NIST Releases First 3 Finalized Post-Quantum Encryption Standards · NIST · Primary source · 2024-08-13 (retrieved 2026-10-10)
- Post-Quantum Cryptography project page (updated August 5, 2026) · NIST Computer Security Resource Center · Primary source (retrieved 2026-10-10)
Revision history (1)
- Page created.
Created Nov 7, 2026. Last reviewed by an editor on Nov 8, 2026. Next scheduled review: May 7, 2027.
Cite this page
"How encryption works (symmetric, public-key and TLS)." ContentLora, updated Nov 7, 2026. https://contentlora.com/explain/how-encryption-works
Spotted an error? Suggest a correction or emailcorrections@contentlora.com.