Data encryption deep dive: TLS in-transit + mTLS east-west, envelope encryption (DEK wrapped by KMS/HSM CMK), TDE + field-level encryption for PII, E2EE Signal-style (X3DH + Double Ratchet), and an ADR on when E2EE is worth its UX cost.
Encryption protects confidentiality only within a stated threat boundary. Authenticated encryption, unique nonces, key purpose and hierarchy, transport identity, backup policy, and endpoint trust are required; encryption does not replace authorization or input safety.
| Component | Responsibility |
|---|---|
client | Authenticated Client |
tls-endpoint | TLS 1.3 Endpoint |
application | Authorized Application |
kms | Key Management Service |
hsm | Protected Key Boundary |
key-metadata | Key Version and Nonce Metadata |
database | Encrypted Data Store |
backup | Encrypted Backup and Retention |
e2ee-peer | End-to-End Peer |
audit-log | Key and Decrypt Audit |
attacker | Network, Storage, or Endpoint Attacker |
Topology edges represent authenticated or otherwise explicit communication paths. Responses reuse those physical paths in reverse; no response-only or bypass edges are added.
tls-in-transit — TLS protects data in transit between authenticated endpointsTLS 1.3 authenticates the server and protects records; client authentication or application credentials are added when the server must authenticate the caller.
envelope-encryption — Envelope encryption separates data and key-encryption keysA fresh data-encryption key encrypts the object with AEAD; KMS wraps the DEK under a versioned KEK that remains inside its protected boundary.
aead-nonce-and-aad — AEAD nonce uniqueness and associated dataFor a given key, AES-GCM IV reuse can destroy security. Associated data binds immutable context such as tenant, object id, schema, and key version.
key-rotation — Rotate KEKs without rewriting plaintextNew writes use the active key version; wrapped DEKs can be rewrapped under a new KEK, while data re-encryption is a separate explicit migration when required.
backup-encryption — Backups have independent encryption and restore policyEncrypted primary storage does not automatically protect exports, snapshots, logs, or backups; restore must prove key access and integrity.
end-to-end-encryption — End-to-end encryption excludes the intermediary from plaintextEndpoints establish content keys so the service transports ciphertext; metadata and compromised endpoints remain outside the confidentiality guarantee.
authorized-endpoint-compromise — Encryption does not stop an authorized application compromiseAn application permitted to decrypt can expose plaintext after compromise; least privilege, isolation, audit, and data minimization bound this threat.
kms-outage — KMS outage fails closed at the decrypt boundaryRequired key service unavailability does not trigger plaintext fallback or use of an unbounded local master-key cache.
cryptographic-erasure — Cryptographic erasure depends on key reachabilityDestroying the only usable wrapping key can make ciphertext unrecoverable, but copies, escrow, replicas, caches, and backups must be included in the deletion proof.
Введите числа или выберите пресет