1.Encryption in transit (TLS) vs encryption at rest
Encryption in transit (TLS) protects data while it moves across a network; encryption at rest protects data while it sits on a disk, in a backup, or in a database file. You need both — TLS does nothing once a request lands and the data is written to storage.
Key features
- TLS protects data between two endpoints (client-to-server, service-to-service) — it does not protect the data once it is written to disk at either end
- Encryption at rest protects stored data — database files, backups, snapshots, log files — from anyone who gets the raw storage medium without going through the application
- A stolen laptop, an exposed S3 bucket, or a leaked database backup all bypass TLS entirely — TLS was never in the request path for those
- TLS 1.3 (RFC 8446) is the current baseline; TLS 1.0 and 1.1 are deprecated and should be rejected by any service that still accepts them
- At-rest encryption is usually transparent to the application (disk- or database-level, e.g. AES-256) — the app reads and writes plaintext and the storage layer handles the encrypt/decrypt step
What each protection actually covers
- TLS in transit
- Stops an attacker sniffing traffic on the network path
- Active only while a request is moving between endpoints
- Useless against a stolen disk or leaked backup file
- Encryption at rest
- Stops an attacker who obtains the raw storage medium
- Active only while data is sitting still, not moving
- Useless against traffic sniffed off an unencrypted connection
Command
// In transit: negotiated per connection
client --TLS 1.3 handshake--> server
<---- encrypted channel ---->
// At rest: applied to the storage layer, not the request
disk / database volume: AES-256 encryption
backup snapshot: AES-256 encryption
(application reads/writes plaintext; storage layer
handles encrypt/decrypt transparently)TLS protects data in motion; encryption at rest protects data at standstill. A system needs both, because a stolen disk or leaked backup never touches the network path TLS covers.