Most pseudonymisation that fails does so because engineers chose a technique, usually an unkeyed hash, without deciding who the pseudonyms must be hidden from and where the secret lives. Under the GDPR and UK GDPR, pseudonymised data stays personal data for anyone who holds the additional information, but done well it lowers risk, supports data protection by design and limits the damage of a breach. This guide covers the method selection engineers actually face: the vocabulary from EDPB Guidelines 01/2025, the main transformation techniques and their weaknesses, deterministic versus randomised policies, protecting the pseudonymisation secret, and how to test and operate the result. It is for data and platform engineers, security architects and privacy teams. For the wider family of privacy-enhancing technologies, see the Privacy-Enhancing Technologies Guide.
Key takeaways
- Define the pseudonymisation domain first. The technique only works relative to the people and systems it must prevent from attributing data, so name them before choosing a method.
- Keyed functions beat plain hashes. HMAC or similar keyed one-way functions resist the dictionary and brute force attacks that make SHA-256 of an email address or phone number trivially reversible.
- The secret is the control. Keys and lookup tables are additional information under GDPR Article 4(5); keep them outside the domain, in an HSM or KMS, with logged and rate-limited use.
- Linkability is a design choice. Deterministic pseudonyms allow joins and analytics but also let records be linked and re-identified; randomise per purpose where joins are not needed.
- Pseudonymised is not anonymous. Quasi-identifiers left in the record can still single people out, so pair pseudonymisation with minimisation, generalisation and access control.
What pseudonymisation means in law and in engineering
GDPR Article 4(5) defines pseudonymisation as processing personal data so that it can no longer be attributed to a specific data subject without the use of additional information, provided that information is kept separately and protected by technical and organisational measures. Three consequences follow for engineers.
- It remains personal data: the EDPB Guidelines 01/2025 on Pseudonymisation (adopted for public consultation on 16 January 2025) say pseudonymised data that could be attributed using additional information remains personal data, even when someone else holds that information. The ICO says the same for anyone holding the additional information.
- The recipient view can differ: in Case C-413/23 P, EDPS v SRB (4 September 2025), the Court of Justice held that pseudonymised data should not be treated as personal data in every case and for every person, because pseudonymisation can stop recipients other than the controller from identifying individuals. The ICO likewise says data shared without the additional information may be anonymous in the recipient's hands. The controller's own obligations are still assessed from its point of view, so do not treat this as a way out of transparency duties.
- It earns benefits: the EDPB lists pseudonymisation as relevant to legitimate interests balancing (Article 6(1)(f)), compatibility of further processing (Article 6(4)), data protection by design (Article 25), security of processing (Article 32), safeguards for research and statistics (Article 89(1)), accountability (Article 5(2)) and limiting breach impact (Articles 33 and 34).
UK readers should note that the ICO's pseudonymisation guidance is under review following the Data (Use and Access) Act and may change. See the UK GDPR and Data Protection Act 2018 Guide.
The vocabulary: domain, secrets and transformation
| Term (EDPB Guidelines 01/2025) | Meaning | Engineering question it forces |
|---|---|---|
| Pseudonymising transformation | The procedure that replaces direct identifiers with pseudonyms, and may also remove, generalise or add noise to other attributes | Which fields are direct identifiers, and what happens to the quasi-identifiers? |
| Pseudonymisation secrets | The secret elements of the transformation, usually cryptographic keys or lookup tables | Where is the key or table stored, who can use it, and how is use logged? |
| Additional information | Anything that enables attribution, including the secrets and tables mapping pseudonyms to identifiers | What other data sets could act as a key, such as an unpseudonymised copy in a backup? |
| Pseudonymisation domain | The context, such as a set of recipients or systems, in which attribution is precluded | Who exactly must not be able to re-identify: analysts, a processor, a research partner, a SIEM vendor? |
The domain is what turns "we hashed it" into a security claim. The same HMAC pseudonym can be strong against an external analytics partner and worthless against an internal team that can call the pseudonymisation service at will. The EDPB notes that effectiveness depends heavily on how the domain is chosen and isolated from the additional information.
Transformation techniques compared
ENISA's 2019 report Pseudonymisation techniques and best practices groups the basic techniques into counters, random number generators, cryptographic hash functions, message authentication codes and encryption, and considers three attack types: brute force, dictionary search and guesswork using statistical knowledge of identifiers. Its central conclusion is that there is no single easy solution that works for every scenario.
| Technique | How it works | Reversible by the holder? | Strengths | Weaknesses |
|---|---|---|---|---|
| Counter or random token with lookup table | Each new identifier gets a sequential or random value recorded in a mapping table (tokenisation) | Yes, via the table | No mathematical link to the identifier; resistant to cryptanalysis | The table is personal data and a single point of compromise; needs a record per person and synchronisation |
| Plain cryptographic hash (SHA-256) | Pseudonym = hash(identifier) | No, but recomputable by anyone | Simple, deterministic, no secret to manage | Low-entropy identifiers (emails, phone numbers, national IDs, IP addresses) fall to dictionary and brute force attacks; avoid |
| Salted or peppered hash | Hash with a per-record salt or a secret pepper | No | Per-record salts prevent linkage; a secret pepper blocks outsiders | Per-record salts break joins; a pepper is a key and must be managed like one |
| Keyed hash or MAC (HMAC-SHA-256) | Pseudonym = HMAC(key, identifier) | No; recomputable only with the key | The EDPB generally prefers keyed one-way functions; deterministic, so joins work inside the domain | Anyone with key access can confirm guesses; rotating the key breaks linkage with historic data |
| Deterministic or format-preserving encryption | Encrypt the identifier with a secret key, optionally keeping its format (NIST FF1) | Yes, with the key | Authorised re-identification is possible; FPE keeps schemas and validation intact | Key compromise reverses everything; format-preserving modes need care with small domains |
| Randomised encryption | Encrypt with a fresh nonce each time | Yes, with the key | Unlinkable ciphertexts | No joins or counts on the pseudonymised value |
| Advanced techniques | Asymmetric encryption, group pseudonyms, chaining across parties, secure multi-party computation (ENISA 2021) | Depends on design | Split trust between parties, cross-organisation linkage without a shared key | Complexity, specialist review, limited tooling |
Notes on specific methods
- Hashing passwords versus pseudonymising identifiers: where hash functions must be used without a key, the EDPB points to specialised password-hashing designs such as Argon2, and the ICO advises salts, peppers or keys and avoiding MD5 and SHA-1. A keyed function is usually the better answer for identifiers that must be joinable.
- Format-preserving encryption: NIST SP 800-38G (2016) specified FF1 and FF3. The second public draft of SP 800-38G Rev. 1 (February 2025) removes FF3 after a weakness in its tweak schedule and increases the minimum domain size for FF1. Use FF1, and treat small domains (for example four-digit values) as weak regardless of the mode.
- IP addresses and emails: ENISA describes prefix-preserving pseudonymisation for IP addresses, which keeps subnet structure for network analysis, and format-preserving encryption for emails. Both leak structure by design: a preserved /24 prefix can identify a small office.
- Tokenisation services: a vault that issues random tokens is pseudonymisation with a lookup table. See the Tokenisation and Data Masking Guide.
Choosing a pseudonymisation policy: deterministic or randomised
ENISA distinguishes three policies. The choice decides what analytics remain possible and how much linkage an attacker gains.
| Policy | Behaviour | Use when | Main risk |
|---|---|---|---|
| Deterministic | The same identifier always gets the same pseudonym across all data sets | Longitudinal analysis, joins across tables, security correlation over time | Pseudonyms become stable identifiers; linking data sets can re-identify |
| Document-randomised | Same identifier gets the same pseudonym within one data set or release, different across releases | Periodic research extracts or partner shares that must not be joined with each other | Linkage within a release still possible |
| Fully randomised | Every occurrence gets a different pseudonym | Counting events without tracking people, publishing samples | No per-person analysis possible |
Decision guidance
- One key per purpose: use a separate key (or key derivation context) per purpose and per recipient domain. A marketing analytics domain and a fraud domain should not share pseudonyms, so a leak from one cannot be joined with the other.
- Need re-identification? If authorised reversal is a requirement (customer support, fraud follow-up, incident response), choose encryption or a token vault with a controlled re-identification workflow. If not, choose a keyed one-way function and do not keep a reverse table.
- Small organisations: a managed tokenisation feature in your database or cloud provider, or HMAC with a key held in a cloud KMS, covers most needs. Avoid building a bespoke vault.
- Large organisations and data sharing: run pseudonymisation as a central service with per-domain keys, published method descriptions and an audit trail. Consider split trust (a third party or secret sharing) when the recipient must be sure the controller cannot re-identify unilaterally.
Protecting the pseudonymisation secret
The EDPB says secrets should have enough entropy to resist guessing and brute force, be kept separate from the pseudonymised data and outside the domain, and be under strict access control with logging and rate limiting, mentioning hardware security modules and secret sharing as options. The ICO adds separate storage, restricted access, encryption with secure key management, access review, tested backups and destruction when no longer needed.
- Key generation: generate HMAC keys of at least 256 bits from a cryptographic RNG inside the KMS or HSM. Never derive them from passwords or reuse an application secret.
- Use, not export: call the KMS or HSM to compute pseudonyms so the key never reaches application memory or configuration. See the HSM Deployment and Operations Guide.
- Rate limiting: an identity that can call the pseudonymisation function can run a dictionary attack through it. Limit call rates per caller, alert on volume, and separate the "pseudonymise new data" role from any "re-identify" role.
- Lookup tables: treat the mapping table as the most sensitive data set in the system: encrypted, access-logged, backed up, and excluded from analytics copies.
- Rotation and retirement: rotating a deterministic key breaks linkage with historic pseudonyms, so plan rotation as a re-pseudonymisation project, and, as the EDPB advises, plan for replacing weakened algorithms ideally without reconstituting the original data.
Where identity fits
The pseudonymisation service and its key are reached by non-human identities: ETL jobs, stream processors, SIEM pipelines and analytics service accounts. Those service accounts are the real re-identification risk, because they can submit guesses at machine speed. Give each pipeline its own workload identity with permission to pseudonymise only, keep re-identification behind a separate, human-approved role, and review those grants in access certifications. See the Cryptographic Key Management Guide.
How to implement: a phased approach
- Define the purpose and domain: write down the processing purpose, the recipients or systems in the domain, and who must be unable to re-identify. Record this in the DPIA. See the DPIA Guide.
- Classify fields: label each field as direct identifier, quasi-identifier (postcode, date of birth, job title, device ID), sensitive attribute or other. Drop fields the purpose does not need.
- Choose technique and policy per field: HMAC for joinable identifiers, encryption or a vault where reversal is required, generalisation or removal for quasi-identifiers, and a per-purpose key.
- Build in a test environment: run on a sample, then attempt re-identification: dictionary attacks against pseudonyms using public lists, linkage against other internal data sets, and uniqueness counts on quasi-identifier combinations.
- Pilot one pipeline: deploy to one data flow with the key in KMS, logging on every call and alerting on unusual volumes. Keep the original pipeline available until analysts confirm the output supports the purpose.
- Roll out and remove clear copies: extend to other flows, then find and delete clear-text copies in staging tables, exports, logs and backups. A single clear copy inside the domain defeats the design.
- Roll back safely: if output is unusable, revert the pipeline configuration, not the key policy; never solve analytics problems by giving the domain access to the secret.
- Review: reassess annually and whenever new data sets enter the domain, since added attributes raise re-identification risk.
Detection and measurement
- Key use logs: every pseudonymise and re-identify call, by caller identity, volume and purpose tag.
- Clear-text discovery: data discovery scans for direct identifiers in data sets labelled pseudonymised.
- Re-identification requests: a ticketed workflow with approver, reason and outcome.
| Metric | What good looks like |
|---|---|
| Share of analytics and sharing data sets where direct identifiers are pseudonymised or removed | Close to 100% for data leaving production |
| Pseudonymisation keys held in KMS or HSM with no export | All keys |
| Clear-text identifiers found by discovery scans in pseudonymised domains | Zero, each finding remediated within 30 days |
| Re-identification events without an approved ticket | Zero |
| Records unique on their quasi-identifier combination in shared extracts | Below an agreed threshold set in the DPIA |
Framework mapping
| Framework | Reference | Relevance |
|---|---|---|
| GDPR and UK GDPR | Articles 4(5), 25, 32, 89(1) | Definition, data protection by design, security of processing, research safeguards |
| NIST SP 800-53 Rev. 5 | SI-19 De-identification; SI-19(4) Removal, Masking, Encryption, Hashing, or Replacement of Direct Identifiers | Control for removing or replacing direct identifiers |
| NIST SP 800-53 Rev. 5 | SC-12 Cryptographic Key Establishment and Management; SA-8 Security and Privacy Engineering Principles | Managing pseudonymisation keys; designing privacy in |
| NIST CSF 2.0 | PR.DS-01, PR.DS-10, ID.AM-07 | Protecting data at rest and in use; data inventories that identify fields to pseudonymise |
| ISO/IEC 27001:2022 | Annex A 8.11 Data masking; 8.24 Use of cryptography | Masking and pseudonymisation techniques; key management |
Common failure patterns
- Unkeyed hashes of low-entropy identifiers: SHA-256 of email addresses or phone numbers shared with ad platforms or partners, which anyone can reverse with a list of candidates.
- Key in the same place as the data: the HMAC key stored in the pipeline configuration or the same database, so the domain holds the additional information.
- One global deterministic key: the same pseudonym used across marketing, product analytics, security and research, creating a cross-organisation identifier.
- Quasi-identifiers left intact: pseudonymising the name but keeping full postcode, date of birth and gender, a combination that singles out many people. See the Anonymisation and Re-identification Risk Guide.
- Clear copies behind the scenes: staging tables, debug logs and backups of the source still sitting inside the analytics environment.
- Calling it anonymous: labelling pseudonymised data as anonymous and dropping it out of retention, rights handling and breach processes.
Practitioner checklist
- Write down the purpose, the pseudonymisation domain and who must not be able to re-identify, and record it in the DPIA.
- Classify every field as direct identifier, quasi-identifier or other, and remove what the purpose does not need.
- Use HMAC or another keyed function for joinable identifiers; never plain hashes of emails, phone numbers or IDs.
- Use a separate key per purpose and recipient domain, generated and held in a KMS or HSM.
- Limit and log calls to the pseudonymisation function, and separate pseudonymise and re-identify roles.
- Generalise or remove quasi-identifiers, and measure uniqueness before sharing extracts.
- Run dictionary and linkage re-identification tests before go-live and after schema changes.
- Scan pseudonymised domains for clear-text identifiers and delete stray copies.
- Treat pseudonymised data as personal data for rights, retention and breach handling.
- Track the final EDPB Guidelines 01/2025, the ICO's updated guidance and SP 800-38G Rev. 1.
Standards and references
- EDPB: Guidelines 01/2025 on Pseudonymisation
- ENISA: Pseudonymisation techniques and best practices
- ENISA: Data Pseudonymisation: Advanced Techniques and Use Cases
- ICO: Pseudonymisation
- Court of Justice of the EU: Press release on Case C-413/23 P, EDPS v SRB
- NIST: SP 800-38G Rev. 1 (Second Public Draft), Methods for Format-Preserving Encryption
- NIST: SP 800-53 Rev. 5
Related NHI Mgmt Group resources: Privacy-Enhancing Technologies Guide · Tokenisation and Data Masking Guide · Anonymisation and Re-identification Risk Guide · Privacy in Security Logging and Monitoring Guide · Privacy by Design Guide for Engineering Teams