# E2EE is not TLS (https://docs.open-e2ee.dev/learn/e2ee-vs-tls.md)

Most teams that say "our data is encrypted" mean TLS in transit and encryption at rest. Both are real controls. Neither is end-to-end encryption, and the gap between them is the whole subject of this documentation.

TLS protects a connection. It terminates at your server. Your server decrypts, reads the plaintext, applies business logic, re-encrypts to storage with a key your infrastructure also holds, and re-encrypts to the next connection. Every one of those steps is intentional. The TLS design ends at the endpoint you operate because your server needs to read the message to do its job.

End-to-end encryption moves the endpoints. The two devices are the endpoints. Your infrastructure is in the middle.

The sending device encrypts content to keys that only receiving devices hold. The relay never needs message plaintext or device private keys. It still sees the envelope: who sent it, to whom, when, and how big it was. It does not need the inside.

TLS terminates at a server that reads plaintext. End-to-end encryption sends a sealed envelope across a relay that carries it without opening it.

{'TLS.'}

<rect x="16" y="44" width="116" height="80" rx="4" strokeWidth="4" />

<rect x="32" y="62" width="84" height="8" rx="2" strokeWidth="2" />

<rect x="32" y="80" width="68" height="8" rx="2" strokeWidth="2" />

<rect x="32" y="98" width="52" height="8" rx="2" strokeWidth="2" />

<path d="M132 84 H250" strokeWidth="2" />

<rect x="162" y="68" width="36" height="32" fill="currentColor" stroke="none" />

<path d="M166 62 V58 M174 62 V56 M182 62 V59 M190 62 V55" strokeWidth="1.5" />

<rect x="250" y="44" width="188" height="80" rx="4" strokeWidth="4" />

<rect x="270" y="62" width="148" height="8" rx="2" strokeWidth="2" />

<rect x="270" y="80" width="120" height="8" rx="2" strokeWidth="2" />

<rect x="270" y="98" width="92" height="8" rx="2" strokeWidth="2" />

<path d="M438 84 H572" strokeWidth="2" />

<rect x="472" y="68" width="36" height="32" fill="currentColor" stroke="none" />

<path d="M476 62 V58 M484 62 V56 M492 62 V59 M500 62 V55" strokeWidth="1.5" />

<rect x="572" y="44" width="116" height="80" rx="4" strokeWidth="4" />

<rect x="588" y="62" width="84" height="8" rx="2" strokeWidth="2" />

<rect x="588" y="80" width="68" height="8" rx="2" strokeWidth="2" />

<rect x="588" y="98" width="52" height="8" rx="2" strokeWidth="2" />

{'server · content readable here.'}

{'E2EE.'}

<rect x="16" y="218" width="116" height="80" rx="4" strokeWidth="4" />

<path d="M32 240 h30 v6 h6 v10 h-6 v6 h-30 z" fill="currentColor" stroke="none" />

<rect x="32" y="272" width="84" height="8" rx="2" strokeWidth="2" />

<path d="M162 208 V318" strokeWidth="1" strokeDasharray="2 6" />

{'seal.'}

<path d="M132 258 H282" strokeWidth="2" />

<rect x="206" y="242" width="36" height="32" fill="currentColor" stroke="none" />

<path d="M210 236 V232 M218 236 V230 M226 236 V233 M234 236 V229" strokeWidth="1.5" />

<path d="M296 222 h-14 v76 h14" strokeWidth="3" />

<path d="M424 222 h14 v76 h-14" strokeWidth="3" />

<rect x="326" y="242" width="64" height="36" fill="currentColor" stroke="none" />

<path d="M334 236 V230 M346 236 V228 M358 236 V232 M370 236 V227 M382 236 V231" strokeWidth="1.5" />

<path d="M438 258 H572" strokeWidth="2" />

<rect x="460" y="242" width="36" height="32" fill="currentColor" stroke="none" />

<path d="M464 236 V232 M472 236 V230 M480 236 V233 M488 236 V229" strokeWidth="1.5" />

<path d="M530 208 V318" strokeWidth="1" strokeDasharray="2 6" />

{'open.'}

<rect x="572" y="218" width="116" height="80" rx="4" strokeWidth="4" />

<path d="M588 240 h30 v6 h6 v10 h-6 v6 h-30 z" fill="currentColor" stroke="none" />

<rect x="588" y="272" width="84" height="8" rx="2" strokeWidth="2" />

{'relay · metadata remains visible.'}

Top: TLS is opaque in transit and readable at the server, by design. Bottom: the envelope stays sealed across the relay. The ticks along its top edge are the metadata that remains visible either way.

## Encryption at rest does not close the gap [#encryption-at-rest-does-not-close-the-gap]

Server-side encryption is often offered as the equivalent control. It is not, and the reason is narrow enough to state exactly: with encryption at rest, you hold the key. The key lives in your KMS, your environment, your IAM policy, your on-call engineer's session. An attacker who reaches your service reaches the thing that decrypts. The ciphertext and the key share a blast radius.

With end-to-end encryption, the private half of `identityKeyPair` and each derived message key exists on user devices. No configuration change or compromised admin credential can make stored relay envelopes readable. Compelled production access cannot make them readable either. The relay never held the material that opens them.

## Why regulators care about the difference [#why-regulators-care-about-the-difference]

Breach-notification law focuses on whether an attacker could understand the exposed data. That is where the architectural difference becomes a legal and operational difference.

- **California Civil Code §1798.82.** The notification duty attaches to unencrypted personal information. The law treats encrypted data as unencrypted if an attacker also gets the encryption key.
- **The FTC Safeguards Rule.** The notification event occurs when someone gets unencrypted customer information without authorization. Encrypted information counts as unencrypted if the attacker also accessed the key.
- **GDPR Article 34(3)(a).** Controllers can omit notice to affected data subjects under one condition. Applied protections must make personal data unintelligible to unauthorized people. Encryption is one example, and the protections must cover the affected data. Article 33 notification to the supervisory authority is a separate duty. The same provision does not waive it.

All three rules depend on whether the attacker also obtained the key. Server-side encryption puts the key in the same perimeter as the data. A full service compromise therefore defeats the exception. End-to-end encryption removes the key from your possession. You cannot disclose a key that your server never had. There is no server-side key custody to examine.

> **Tradeoff — Data you can act on vs. data you never hold**
>
> Holding plaintext buys you server-side search, moderation, analytics, support impersonation, and the ability to reconstruct a user's account when they lose everything. Holding nothing buys you a smaller breach surface, a narrower compelled-disclosure surface, and a notification posture that does not depend on key hygiene. There is no default answer here. The features you give up are real, and [How E2EE changes your architecture](https://docs.open-e2ee.dev/learn/e2ee-architecture.md) inventories them before you commit.

## Say this accurately [#say-this-accurately]

This documentation is not legal advice, and nothing here substitutes for your counsel reading your facts. Two claims in particular are wrong and we will not make them:

**Almost no regulation requires end-to-end encryption.** Frameworks like HIPAA, SOC 2, and GDPR use controls and risk as their basis. They ask for appropriate protection, and they accept server-side encryption as appropriate in most contexts. Anyone who presents E2EE as a compliance requirement misstates the requirement.

**End-to-end encryption is not compliance.** It can reduce liability and the scope of a compliance review. It reduces what a breach can expose or a subpoena can extract because you do not hold the material. These are commercial arguments, not certifications.

> **Not covered — What stays visible regardless**
>
> Envelope metadata, delivery timing, device counts, and IP addresses survive end-to-end encryption. This page covers content confidentiality. [Limits and metadata](https://docs.open-e2ee.dev/learn/limits-and-metadata.md) lists the remaining observable data. Read it before you make a customer privacy claim.

Version note: the SDK is 15.0.x. Public APIs and persisted formats follow semantic versioning.

## Next [#next]

- [How E2EE changes your architecture](https://docs.open-e2ee.dev/learn/e2ee-architecture.md): the inventory of logic that has to move off the server.
- [Limits and metadata](https://docs.open-e2ee.dev/learn/limits-and-metadata.md): precisely what the relay still observes.
- [Threat model](https://docs.open-e2ee.dev/learn/threat-model.md): adversary classes and what the SDK does and does not defend against.
- [Quickstart](https://docs.open-e2ee.dev/start/quickstart.md): two clients and one relay, running.
