Data at rest, in transit and in use

8 min 5 sections 5 practice questions 8 sources citedISC2 objective 2.6

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

One payslip in three states, each with its guardThree rows, one for each state of a payslip: stored on disk, crossing the network, open on screen. In each row a threat must pass that state's own control: encryption, TLS or VPN, access and screen lock.Thieftakes the deviceDisk and fileencryptionStored on diskat restEavesdropperon the networkTLS or VPNencrypted linkCrossing the networkin transit, or in motionOnlookerat the screenAccess andscreen lockOpen on screenin useOne payslip in three states, each with its guardThree rows, one for each state of a payslip: stored on disk, crossing the network, open on screen. In each row a threat must pass that state's own control: encryption, TLS or VPN, access and screen lock.Thieftakes the deviceDisk and fileencryptionStored on diskat restEavesdropperon the networkTLS or VPNencrypted linkCrossing the networkin transit, or in motionOnlookerat the screenAccess andscreen lockOpen on screenin use
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.

  1. At rest, the payslip is stored on a disk. The threat is loss or theft of the laptop, disk or tape that holds it.
  2. To reach the stored payslip the thief must get past disk and file encryption, backed by access control.
  3. 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.
  4. To reach it the eavesdropper must get past an encrypted connection or tunnel: TLS or a VPN.
  5. 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.
  6. To reach it the onlooker must get past access control, a screen lock and a clean desk.
  7. 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.
Link encryption and end-to-end encryption
PointLink encryptionEnd-to-end encryption
Where it is appliedSeparately on each link between two neighbouring points of a networkOnce by the sender, and removed only by the final recipient
What is hiddenEverything on that link, addresses includedThe content. Addresses stay visible so that the network can deliver it
Where the data is in clearInside every device between one link and the nextNowhere on the way
Who must be trustedEvery operator along the pathOnly 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

The three states compared
StateWhere the data isMain threatMain controls
At restOn disks, tapes, databases and cloud storageLoss or theft of the storage, and access by the wrong accountDisk, file, database and backup encryption. Access control. Physical security
In transit, or in motionCrossing a networkInterception and alterationTLS, a VPN, SSH, end-to-end encryption
In useOpen in a program, in memory, on a screenThe user, other programs, onlookersAccess 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?

  1. Full disk encryption on the database server
  2. TLS on all connections to the database server
  3. Column encryption with the keys held elsewhere
  4. A VPN for all administrators' remote sessions
Decide on your answer, then open the reasoning
  1. 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.
  2. Rule out a: it is already in place. Disk encryption unlocks when the server starts, so every authorised account reads the data in clear.
  3. Rule out b and d: both protect data in transit. No one listened in. The administrator asked the database and it answered.
  4. 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.
  5. 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

A payroll spreadsheet is open in a program on a manager's screen while she edits it. Which state is that copy of the data in?

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

  1. 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.

    Read this part again

  2. 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.

    Read this part again

  3. 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.

    Read this part again

  4. 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.

    Read this part again

Sources