Encryption at rest and in transit
Also called: Data at rest, Data in transit, Encryption in transit
Encryption at rest protects stored data, on disks, in databases and in backups, so a stolen device or drive does not expose it, and encryption in transit, usually with TLS, protects data while it moves over a network. Both protect the data only as well as the keys are managed, so who holds the keys and where they are kept matters as much as the encryption itself.
Feedback on this video?
Read the transcript
1. Two states of data
Data at rest is stored data: on a disk, in a database, or in a backup. Data in transit is data moving over a network, from a laptop to a server.
2. Encryption at rest
At rest, encryption mainly guards against a thief with the device itself: a stolen laptop, or a server's drive. Without encryption, the thief attaches the drive to another computer and reads it. With encryption, a key encrypts data as it is written and decrypts it when read. Without the key, the thief sees only scrambled data. Full disk encryption protects a laptop's whole drive. Databases can use transparent data encryption. Backups need encryption too.
3. Encryption in transit
In transit, the threat is someone on the network who intercepts or changes the data on the way. Encryption in transit uses TLS. HTTPS is HTTP over a TLS connection. TLS checks the server's identity, encrypts the data before it is sent, and lets the receiver detect changes. TLS is designed to hold even when the attacker controls the network: they see only encrypted data. On arrival, the data is decrypted. Once it is stored, it needs protection at rest.
4. Managing the keys
Encryption protects data only as well as its keys are protected. Keep keys apart from the data, with access control, for example in a key management service or a hardware security module. Replace keys after a set period, and plan for recovery: lose the key, and the encrypted data may be lost for good.
5. Recap
To recap: encryption at rest keeps a stolen disk unreadable. TLS protects data on the network. Both depend on well-protected keys.
Test yourself
One practice question on Encryption at rest and in transit. Pick an answer, then check it.
Question 1
A team worries that attackers on public networks could capture data flowing between customers' browsers and a web application. Which benefit does encryption in transit provide?
Practice questions by exam
Each exam below has at least 10 practice questions on this concept.