Data at rest, in transit and in use
A payslip can be sitting in a folder, travelling in an email or open on a screen. These are the three states of data, and the same payslip needs different protection in each. No background is assumed beyond the everyday idea of encryption: scrambling information so that only someone with the key can read it. A control that covers one state does nothing in another, so a security professional must be able to say which state data is in and what protects it there.
By the end of this unit you will be able to:
- Tell apart data at rest, data in transit and data in use
- Choose between full disk, file and database encryption for a described risk
- Tell apart link encryption and end-to-end encryption
- Explain why data in use is the hardest state to protect, and choose controls for it
- Explain what encryption does not protect against
An encrypted laptop on the 17.42
An illustrative example
A firm of solicitors is proud that every laptop has full disk encryption. A partner works on a client's merger papers on the train home. She opens the file and reads it with a stranger in the next seat.
The firm's email is slow, so she sends a draft to the client from her personal web mail, over the train's free Wi-Fi. At her station she closes the lid without signing out and leaves the laptop asleep on the seat while she fetches a coffee.
The disk was encrypted throughout. At which moments did that encryption not protect the client's information?
One file, three states
Data is always in at least one of three states.
Data at rest is stored and not being moved or worked on: on a disk, a tape, a memory stick, in a database or in cloud storage. Data in transit, also called data in motion, is travelling across a network: an email on its way, a web page loading, a backup being copied to another site. Data in use is being worked on: open in a program, held in the computer's working memory, shown on a screen.
One payslip in three states, each with its guard
Read this figure as text
Data is always in at least one of three states, and one file is often in all three at once: the saved copy is at rest, a copy is travelling to a colleague, and a third is open on the screen. Each copy needs the protection for its own state.
- At rest, the payslip is stored on a disk. The threat is loss or theft of the laptop, disk or tape that holds it.
- To reach the stored payslip the thief must get past disk and file encryption, backed by access control.
- In transit, also called in motion, the payslip is being emailed across a network. The threat is an eavesdropper who intercepts or alters it on the way.
- To reach it the eavesdropper must get past an encrypted connection or tunnel: TLS or a VPN.
- In use, the payslip is open in a program and held in memory. The threat is a person at the keyboard or beside it, or another program on the machine.
- To reach it the onlooker must get past access control, a screen lock and a clean desk.
- Each control stands in its own row and guards only its own state. Encrypting the disk does nothing for the email, and TLS does nothing for the open screen.
One file is often in all three states at once. The saved copy is at rest, a copy is travelling to a colleague, and a third is open on the screen. Each copy needs the protection for its own state.
The threats differ. Data at rest is exposed to loss or theft of the thing that stores it. Data in transit is exposed to interception and alteration on the way. is exposed to the person at the keyboard, to other programs on the machine and to anyone who can see the screen.
Encrypting data at rest
at rest turns stored data into , so that whoever takes the storage without the key has nothing readable.
- Full disk encryption
- Encrypts everything on a device's disk. The disk unlocks when the user signs in. It protects a laptop or phone that is lost or stolen while switched off or locked.
- File and folder encryption
- Encrypts chosen files, which stay encrypted when copied or attached. It protects a file that leaves the device, and keeps users of a shared machine out of one another's files.
- Database encryption
- Encrypts a whole database, or chosen columns such as card numbers. Column encryption, with keys held elsewhere, also keeps the values from administrators who have no need to read them.
- Backup and media encryption
- Encrypts tapes, memory sticks and copies sent off site, which travel and are easily lost.
Encryption moves the problem from protecting the data to protecting the key. A key stored beside the data it protects is a door key taped to the door. Keys are kept apart from the data, backed up safely and limited to those who need them. A lost key means lost data.
Common misconception
“A laptop with full disk encryption is protected at all times.”
Full disk encryption protects a device that is off or locked. Once the user has signed in, the disk is unlocked. Every program, and anyone at the keyboard, then reads the data in clear.
Encrypting data in transit
Data on a network passes through equipment its sender does not control. Encryption in transit makes the passing traffic unreadable and reveals tampering.
- Transport Layer Security (TLS)
- The protection behind the padlock in a web browser. It encrypts the connection between two programs, such as a browser and a website, or two email servers.
- Virtual private network (VPN)
- An encrypted tunnel across the internet between a device, or a whole office, and another network. Everything sent through the tunnel is protected. IPsec is a common standard for building one.
- Secure Shell (SSH)
- Encrypts the sessions administrators use to control distant computers, and file transfers between them.
| Point | Link encryption | End-to-end encryption |
|---|---|---|
| Where it is applied | Separately on each link between two neighbouring points of a network | Once by the sender, and removed only by the final recipient |
| What is hidden | Everything on that link, addresses included | The content. Addresses stay visible so that the network can deliver it |
| Where the data is in clear | Inside every device between one link and the next | Nowhere on the way |
| Who must be trusted | Every operator along the path | Only the two ends |
Ordinary email shows the difference. TLS between mail servers protects each hop, yet every server on the way holds the message in clear. Only end-to-end encryption, applied by the sender's own program, keeps the message from them.
Protecting data in use
To be read, edited or calculated with, data has to be . Data in use is therefore the hardest state to protect: the usual tool has to be taken off.
- , so that only the right people and programs can open the data, with no more access than the work needs
- Screen locks that start after a short idle time, and filters that narrow a screen's viewing angle in public places
- A clean desk, and care over printouts
- Clearing temporary copies and working memory when a program closes or a session ends
- Limits on copying, printing and screen capture for the most sensitive files
A trusted execution environment (TEE), sometimes called a secure enclave, is a protected area inside the computer's processor chip. Data is decrypted and worked on there, out of reach of the rest of the computer, its operating system included.
Homomorphic encryption is a kind of encryption that allows calculations on data while it stays encrypted. The party doing the calculating never sees the data. Its use is still specialised.
Three states, three threats, three sets of controls
| State | Where the data is | Main threat | Main controls |
|---|---|---|---|
| At rest | On disks, tapes, databases and cloud storage | Loss or theft of the storage, and access by the wrong account | Disk, file, database and backup encryption. Access control. Physical security |
| In transit, or in motion | Crossing a network | Interception and alteration | TLS, a VPN, SSH, end-to-end encryption |
| In use | Open in a program, in memory, on a screen | The user, other programs, onlookers | Access control, screen lock, clean desk, cleared memory, trusted execution environment |
Encryption has limits in every state.
- It does not stop an authorised person misusing what that person may read.
- It protects only while the key stays secret.
- It does not protect data in use.
- It hides content. It does not hide that data exists or is being sent.
On the train, the partner's file was in use on an unlocked laptop beside a stranger. It was then in transit over an open network through a personal mail service. Last, it was at rest on a disk that was still unlocked. The disk encryption applied at none of those moments.
A question, worked through
A regional bank encrypts the disks of all its servers. An internal audit finds that a database administrator, whose job is to keep the customer database running, ran queries that listed customers' full card numbers and saved the results. The administrator's account has the access the job requires. The audit committee asks which control would have kept the card numbers from the administrator.
Which control BEST addresses the finding?
Decide on your answer, then open the reasoning
- The card numbers were read on a running system by an account with proper access. Nothing was stolen in storage and nothing was intercepted on a network.
- Rule out a: it is already in place. Disk encryption unlocks when the server starts, so every authorised account reads the data in clear.
- Rule out b and d: both protect data in transit. No one listened in. The administrator asked the database and it answered.
- What is left must keep the values unreadable to a person who can run the database. Encrypting the card number column, with keys the administrator does not hold, does that.
- Option c lets the administrator keep the database running without being able to read what the column holds.
Answer: C. Column encryption with the keys held elsewhere
Choosing between good answers
- A laptop, phone, tape or memory stick is lost or stolen
- the data was at rest. Choose encryption of the device or the media.
- The risk is interception on a network or on public Wi-Fi
- the data is in transit. Choose TLS or a VPN.
- Systems along the route must not be able to read the content
- choose end-to-end encryption. Link encryption leaves the data in clear inside every device between links.
- An authorised user or administrator reads what the job does not require
- rule out disk encryption. Choose tighter access, or encryption of the field with keys held elsewhere.
- A question asks which state is hardest to protect
- choose data in use, because data must be decrypted to be worked on.
Check your understanding
5 questions on this unit, easiest first. Confirm an answer to see the reasoning for it, then the right answer, the other options and the rule to reuse. Your answers are kept in this browser and feed readiness and review.
These questions are drafts that no named reviewer has approved yet.
Question 1 of 5
What to remember
- Data at rest is stored. Data in transit, or in motion, is crossing a network. Data in use is open in a program, in memory or on a screen.
- Full disk encryption protects a lost or stolen device that is off or locked. It does nothing once the user has signed in.
- File, database and backup encryption protect particular data wherever it is stored, provided the keys are kept apart from the data.
- TLS, VPNs and SSH protect data in transit. End-to-end encryption keeps content from every system on the way. Link encryption does not.
- Data in use is protected by access control, screen locks, clean desks, cleared memory and trusted execution environments.
- Encryption does not stop misuse by an authorised user, and it is only as good as the secrecy of its keys.
Say it from memory
What are the three data states, and what mainly protects each?
At rest: stored on a disk, tape, database or cloud storage, protected by encryption of the storage and by access control. In transit, or in motion: crossing a network, protected by TLS, a VPN or end-to-end encryption. In use: open in a program or in memory, protected by access control, screen locks and trusted execution environments.
How does link encryption differ from end-to-end encryption?
Link encryption is applied separately on each link, hides everything on that link including addresses, leaves data in clear inside every device between links, and needs every operator along the path to be trusted. End-to-end encryption is applied once by the sender and removed only by the final recipient. It hides the content, leaves addresses visible, and needs only the two ends trusted.
What are a trusted execution environment and homomorphic encryption?
A trusted execution environment, or secure enclave, is a protected area inside the processor chip. Data is decrypted and worked on there, out of reach of the rest of the computer, its operating system included. Homomorphic encryption allows calculations on data while it stays encrypted, so the party calculating never sees it.
What is the main threat to data in each state, and what are the limits of encryption?
At rest: loss or theft of the storage, and access by the wrong account. In transit: interception and alteration. In use: the user, other programs and onlookers. Encryption does not stop an authorised person's misuse, protects only while the key stays secret, does not protect data in use, and does not hide that data exists or is being sent.
Sources
- SP 800-53 Rev. 5, Security and Privacy Controls for Information Systems and Organizations, NISTInformation at rest as information that is not in process or in transit, and the protection of the confidentiality and integrity of information at rest and of transmitted information.
- NIST SP 800-111: Guide to Storage Encryption Technologies for End User Devices, NISTFull disk encryption, volume and virtual disk encryption, and file and folder encryption as the types of storage encryption for end user devices.
- NIST SP 800-52 Rev. 2: Guidelines for TLS Implementations, NISTTLS as protection for data in transit between two programs.
- NIST SP 800-77 Rev. 1: Guide to IPsec VPNs, NISTIPsec as a standard for building virtual private networks.
- RFC 4251: The Secure Shell Protocol Architecture, IETFSecure Shell as a protocol for secure remote login and other network services over an insecure network.
- NIST SP 800-12 Rev. 1: An Introduction to Information Security, NISTLink encryption as encryption at the data link level between two points of a network, and end-to-end encryption as leaving routing information visible.
- NIST CSRC Glossary: Trusted Execution Environment, NISTA trusted execution environment as an area or enclave protected by a system processor.
- Privacy-Enhancing Cryptography: Fully Homomorphic Encryption, NISTFully homomorphic encryption as allowing computation over encrypted data without the decryption key.