CISSP-111 · Lesson 7 of 12 · 28 min
Data states and protection methods
Sub-domain 2.6 of the 2024 outline asks you to determine data security controls, starting with the states data can be in: at rest, in transit and in use. Each state faces different threats and calls for different protections. This lesson covers the three states, then the main protection methods that apply across them: encryption, hashing, tokenization, masking, and anonymization and pseudonymization. Choosing among these is one of the most common practical decisions in asset security, and the exam often asks which method best fits a scenario.
Data at rest
Data at rest is stored on media: disks in servers and laptops, databases, file shares, cloud storage, backup tapes, removable drives and mobile devices. The main threats are theft or loss of the media, unauthorized access by people or processes with access to the storage, and improper disposal. Controls include access control on the storage, encryption, physical security, and secure sanitization at the end of life.
Encryption at rest comes in several layers. Full-disk encryption, such as BitLocker on Windows, FileVault on macOS or self-encrypting drives, protects a device that is lost or stolen while switched off, but provides no protection once the device is running and unlocked. Volume or file-system encryption protects particular storage areas. Database encryption, including transparent data encryption, protects database files and backups. Application-level or field-level encryption protects particular values, such as a national identifier, so that even database administrators and anyone who copies the database cannot read them without the application's keys. The closer encryption sits to the data, the more threats it addresses, but the more complex key management and application changes become.
Data in transit
Data in transit is moving across a network: between a browser and a website, between application services, between data centres, across a wireless network or over a virtual private network. The main threats are interception (eavesdropping), modification and impersonation of either end. Controls include strong encryption with authentication of the endpoints. Transport Layer Security (TLS) 1.2 and 1.3 protect most application traffic; IPsec and modern VPNs protect network-level links; SSH protects administrative sessions; and secure file transfer protocols protect bulk transfers. Older protocols such as SSL, TLS 1.0 and 1.1, plain FTP and Telnet should be disabled. Mutual TLS, where both client and server present certificates, is increasingly used between services inside a zero trust architecture, so that traffic inside the data centre is protected as carefully as traffic across the internet.
Data in use
Data in use is being processed: loaded in memory, displayed on a screen or held in a processor's registers. It is the hardest state to protect, because most processing requires plaintext. Threats include malware that reads memory, privileged users who can inspect running processes, screen capture, and side-channel attacks. Traditional controls include strong endpoint security, least privilege, session controls such as watermarking and blocking screenshots for sensitive applications, and keeping sensitive processing on hardened, monitored systems.
Newer technologies aim to protect data even while it is processed. Confidential computing uses hardware-based trusted execution environments, such as secure enclaves, that keep data encrypted in memory and isolate it from the operating system, the hypervisor and the cloud provider's administrators. Homomorphic encryption allows certain computations on encrypted data without decrypting it, though it remains slow for most uses. Secure multi-party computation lets several parties compute a joint result without revealing their inputs to each other. These are useful to know for the exam at a conceptual level: they extend protection to the one state that conventional encryption leaves exposed.
Encryption and key management
Encryption is only as strong as its key management. Keys must be generated securely, stored separately from the data they protect, rotated on a schedule, backed up so data is not lost, and destroyed when no longer needed. Hardware security modules (HSMs) and cloud key management services store keys in tamper-resistant hardware and log their use. In cloud services, customers can choose provider-managed keys, customer-managed keys held in the provider's key service, or keys held entirely outside the provider, sometimes called hold your own key, which gives the customer more control at the cost of more responsibility. Domain 3 covers cryptography in depth; for asset security, the key points are that keys are themselves restricted assets, and that destroying keys can be a form of data destruction, as lesson 8 explains for crypto-erase.
Hashing
A cryptographic hash function turns any input into a fixed-length digest, such that the same input always gives the same digest, a small change gives a completely different digest, and it is infeasible to find the input from the digest or two inputs with the same digest. Hashes protect integrity: comparing the hash of a file with a known-good value shows whether it has changed. SHA-256 and the SHA-3 family are current choices; MD5 and SHA-1 are broken for security purposes. Hashing is not encryption: there is no key and no way to reverse it. Passwords are stored as salted hashes using slow, purpose-built algorithms such as Argon2, scrypt, bcrypt or PBKDF2, so that a stolen password database does not reveal the passwords. Simple unsalted hashes of low-entropy data such as phone numbers or postal codes are not a privacy protection, because an attacker can hash every possible value and compare.
Tokenization
Tokenization replaces a sensitive value with a random substitute, a token, that has no mathematical relationship to the original. The mapping between tokens and real values is kept in a secure token vault, or derived using vaultless techniques that still require a protected secret. Systems that only need to refer to the value, such as order history or customer service screens, store the token; only the few systems that genuinely need the real value can call the vault to detokenize. Tokenization is widely used for payment card numbers because it can remove most systems from the scope of the Payment Card Industry Data Security Standard (PCI DSS), now at version 4.0.1, which greatly reduces compliance effort and breach impact.
Encryption and tokenization are often compared. Encryption transforms the value with an algorithm and key, so anyone with the key can decrypt any encrypted value, and the ciphertext's format usually differs from the original unless format-preserving encryption is used. Tokenization substitutes values through a lookup, so stealing tokens without access to the vault reveals nothing, and tokens can easily keep the original format, such as a 16-digit number with the last four digits preserved for display.
| Method | Reversible? | Main purpose | Typical use |
|---|---|---|---|
| Encryption | Yes, with the key | Confidentiality | Disks, databases, network traffic, backups |
| Hashing | No | Integrity, password storage | File integrity, passwords with salt and slow algorithms |
| Tokenization | Yes, through the vault | Confidentiality and scope reduction | Payment cards, national identifiers |
| Masking (static) | No, in the masked copy | Safe non-production data | Test and training environments |
| Masking (dynamic) | Original kept; view is masked | Limit what users see | Showing last four digits to service agents |
| Pseudonymization | Yes, with separately held key or table | Reduce identifiability while keeping linkability | Research, analytics |
| Anonymization | No, if done properly | Remove personal information from scope | Open data, published statistics |
Masking
Data masking hides some or all of a value. Static masking creates a permanently altered copy, for example a test database in which names, addresses and account numbers are replaced with realistic but fictitious values, so developers and testers can work without seeing real data. Dynamic masking leaves the stored value intact but changes what particular users see, for example showing only the last four digits of an account number to call centre agents while the fraud team sees the full value. Good masking preserves the format and relationships the application needs, such as valid-looking postal codes and consistent customer identifiers across tables, without exposing real people. Synthetic data, generated to have the statistical properties of real data without containing real records, is an increasingly common alternative for testing and machine learning.
Pseudonymization and anonymization
Pseudonymization replaces direct identifiers, such as names or account numbers, with pseudonyms, while keeping the information needed to re-link records held separately under strict control. A research data set in which each patient is labelled with a study code, while the key linking codes to patients is held by a separate team, is pseudonymized. Pseudonymized data is still personal information under the GDPR and most Canadian and US privacy laws, because re-identification is possible, but it reduces risk and is recognized as a safeguard.
Anonymization goes further: it transforms data so that individuals can no longer be identified, by anyone, using reasonably available means. Properly anonymized data falls outside many privacy laws. But true anonymization is hard. Removing names is not enough: combinations of quasi-identifiers such as postal code, date of birth and sex can single out most people, and rich data sets such as location traces or purchase histories can be re-identified by linking with other sources. Techniques such as generalization (reporting age bands instead of birth dates), suppression of rare values, k-anonymity (ensuring each record matches at least k others on its quasi-identifiers) and differential privacy (adding calibrated noise to results) reduce the risk. Quebec's Law 25, for example, allows anonymized information to be kept after its purpose is fulfilled only if anonymization is irreversible and done according to generally accepted best practices set by regulation.
Worked problem
Choosing a method
For each need, choose the best method: (a) a call centre needs to confirm the last four digits of a customer's card number; (b) developers need realistic data to test a new billing system; (c) the company must store card numbers for recurring billing but wants most systems out of PCI DSS scope; (d) researchers need to link patients' visits over time without knowing who they are; (e) a laptop holding confidential files might be lost.
Show solution
- (a) Dynamic masking shows only the last four digits to agents.
- (b) Static masking or synthetic data gives realistic values without real customers.
- (c) Tokenization keeps real card numbers only in the vault and payment systems.
- (d) Pseudonymization with study codes, keeping the linking key with a separate custodian.
- (e) Full-disk encryption protects the data if the powered-off laptop is lost.
Answer: Dynamic masking, static masking or synthetic data, tokenization, pseudonymization and full-disk encryption. Each method fits a different combination of needs.
Worked problem
Testing k-anonymity
A published table lists age band, first three characters of the postal code and diagnosis. For the quasi-identifiers age band and postal prefix, the smallest group contains 2 records. Does the table meet a target of k = 5, and what could fix it?
Show solution
- k-anonymity requires every combination of quasi-identifiers to appear at least k times.
- The smallest group has 2 records, so k = 2, below the target of 5.
- Fixes: widen the age bands, generalize the postal prefix to a region, or suppress the rare records.
Answer: No; the table is only 2-anonymous. Generalize or suppress until every group has at least 5 records, and remember that k-anonymity alone does not prevent all inference.
Thinking like a manager
Exam scenarios usually point to the right method through what must be preserved. If authorized systems must recover the original value, choose encryption or tokenization; if most systems never need the real value, tokenization reduces scope. If only integrity matters, choose hashing. If people should see less than the whole value, choose dynamic masking. If non-production work needs realistic data, choose static masking or synthetic data. If data must leave the scope of privacy law, true anonymization is required, and the manager's job is to be sceptical of claims that removing names is enough.
Common mistakes
MistakeAssuming full-disk encryption protects a running, unlocked laptop.
InsteadIt protects powered-off devices; running systems need other controls.
MistakeTreating hashing as reversible encryption.
InsteadHashing has no key and cannot be reversed; it protects integrity and passwords.
MistakeHashing phone numbers and calling the data anonymous.
InsteadLow-entropy values can be hashed exhaustively and re-identified.
MistakeCalling pseudonymized data anonymous.
InsteadPseudonymized data can be re-linked and remains personal information.
MistakeStoring encryption keys alongside the encrypted data.
InsteadKeep keys separately, ideally in an HSM or key management service.
Summary and key terms
- Data exists at rest, in transit and in use, each with different threats and controls.
- Encryption at rest ranges from full disk to field level; closer to the data covers more threats but adds complexity.
- Use TLS 1.2 or 1.3, IPsec, SSH and mutual TLS in transit; disable obsolete protocols.
- Data in use is hardest to protect; confidential computing and related techniques extend protection.
- Hashing protects integrity; tokenization substitutes values and reduces compliance scope; masking limits what users see.
- Pseudonymized data remains personal information; true anonymization is hard and must resist re-identification.
- Key management determines the real strength of encryption.
- Data at rest
- Data stored on media.
- Data in transit
- Data moving across a network.
- Data in use
- Data being processed in memory or displayed.
- Confidential computing
- Hardware-based isolation that protects data while it is processed.
- Tokenization
- Replacing a sensitive value with a random token mapped in a secure vault.
- Static masking
- Permanently altering data in a copy, typically for non-production use.
- Dynamic masking
- Altering what users see without changing the stored value.
- Pseudonymization
- Replacing identifiers with pseudonyms while keeping a separately held means to re-link.
- Anonymization
- Irreversibly transforming data so individuals cannot be identified.
- k-anonymity
- A property where each record matches at least k others on its quasi-identifiers.
Practice problems
Work each problem on paper first, then reveal the answer to check.
Name the three states of data.
Show answer
At rest, in transit and in use.
Which state is hardest to protect, and why?
Show answer
In use, because processing usually needs plaintext in memory.
What does field-level encryption protect against that full-disk encryption does not?
Show answer
Reading of specific values by database administrators or anyone with access to a running system or a database copy.
Which TLS versions are acceptable today?
Show answer
1.2 and 1.3.
Why is tokenization popular for payment card data?
Show answer
It removes most systems from PCI DSS scope.
Give an example of dynamic masking.
Show answer
Showing only the last four digits of an account number to call centre agents.
Is pseudonymized data still personal information under the GDPR?
Show answer
Yes.
Why is removing names not enough to anonymize data?
Show answer
Quasi-identifiers can be combined or linked to re-identify people.
What does differential privacy add to published results?
Show answer
Calibrated noise that limits what can be learned about any individual.
Where should encryption keys be kept?
Show answer
Separately from the data, ideally in an HSM or key management service.
Lesson quiz · 5 questions
Score 60% or more to complete this lesson.
Create a free account to save your progress, take quizzes and earn a certificate.