Loading...

Skip to main content

Techniques Reference

Per-technique reference cards for the eight core anonymization and pseudonymization techniques. Each card uses consistent fields for quick comparison. Restructured from Module 03 for lookup during technique selection and client conversations.

Abbreviations used throughout: SDP = Sensitive Data Protection (GCP's PII detection and transformation service); HMAC = keyed-hash message authentication code; FPE = format-preserving encryption; DDM = dynamic data masking (BigQuery policy tags); ARX = open-source structural anonymization tool; CDR = Call Detail Record; MSISDN = subscriber phone number (Mobile Station International Subscriber Directory Number).

For the privacy models applied on top of techniques, see the privacy models reference. For GCP tool implementations, see the tooling reference. For where techniques fit in the zone architecture, see architecture patterns.

Decision tree: which technique do I need?​

Key: Reversible techniques (FPE, deterministic encryption, tokenization) = pseudonymization β€” still personal data under GDPR. One-way pseudonymization (HMAC) preserves joins but cannot re-identify. Information-destroying techniques (generalization, suppression) with formal privacy models = structural anonymization. Aggregate/synthetic outputs with DP = strongest privacy guarantee.


Comparison matrix​

All techniques side-by-side β€” use this for quick comparison, then jump to the detailed card.

TechniqueReversibleGDPR statusUtility preservedJoin capabilityGCP serviceBest for
Suppression / redactionNoAnonymizationLowN/ASDP RedactConfigFields with no analytical value
GeneralizationNoAnonymization (if k-anonymous)MediumReducedSDP BucketingConfig; ARXQuasi-identifiers in tabular data
Plain hashingNo (but attackable)Not effective pseudonymizationMediumYesβ€” (no GCP service; use discouraged)Avoid β€” vulnerable to dictionary attacks
HMAC-keyed hashNo (without key)PseudonymizationHighYes (same key)SDP CryptoHashConfig; Cloud KMSDirect identifier pseudonymization
Tokenization (vaulted)Yes (vault)PseudonymizationHighYes (same vault)Custom on Cloud SQL/SpannerHigh-security identifier replacement (random, stateful)
Deterministic encryption (AES-SIV)Yes (key)PseudonymizationHighYes (same key)SDP CryptoDeterministicConfigReversible pseudonymization without format constraints (stateless)
FPEYes (key)PseudonymizationVery highYes (same key)SDP CryptoReplaceFfxFpeConfigLegacy system compatibility (format-preserving)
Static maskingNoDepends on techniqueMediumPreserved (ref. consistency)Custom Dataflow/Spark; DelphixNon-production environments
Dynamic maskingN/APersonal dataHighN/ABigQuery DDM + policy tagsRole-based access control
Perturbation / noiseNoAnonymization (if DP)MediumNoBigQuery DIFFERENTIAL_PRIVACY; Privacy on BeamNumerical fields, aggregates
Synthetic dataNoNot personal data (if no memorization)High (statistical)NoGretel (SaaS); SDV (OSS); Vertex AIML training, dev/test, data sharing

Card 1: Suppression and redaction​

FieldDetail
MechanismRemove data entirely (suppression) or replace with placeholder β€” null, ***, [REDACTED]
ReversibilityNo
Privacy guaranteeComplete for the suppressed field β€” no value exists to attack. Does not protect the record if other quasi-identifiers remain untreated.
GDPR statusAnonymization
Utility impactTotal loss for the suppressed field
GCP serviceBigQuery DDM (nullify/default-value masking rules); SDP RedactConfig
When to useField's privacy risk outweighs its analytical value; free-text fields (support notes, delivery instructions); pure direct identifiers with no downstream use; outlier records that cannot be generalized without creating singletons
When NOT to useWhen the field has analytical value; when quasi-identifiers remain untreated (suppressing direct IDs alone is insufficient)
Key riskOver-suppression destroys utility. Under-suppression β€” suppressing only direct IDs while leaving behavioral patterns intact β€” is "the most consistently broken approach in the field"

Card 2: Generalization and aggregation​

FieldDetail
MechanismReduce data granularity so multiple records share the same attribute values, creating equivalence classes
ReversibilityNo
Privacy guaranteePrevents singling out if equivalence classes are large enough (foundation of k-anonymity)
GDPR statusAnonymization (if k-anonymous with sufficient k)
Utility impactMedium β€” reduces analytical resolution proportional to generalization level
GCP serviceSDP BucketingConfig, DateShiftConfig, TimePartConfig; ARX for optimized generalization hierarchies
When to useQuasi-identifier treatment in tabular data; when k-anonymity framework applies; when reduced-granularity analytics is sufficient
When NOT to useWhen record-level precision is required; when fields have very high cardinality and all generalization levels destroy utility; not for direct identifiers (use pseudonymization)
Key riskOver-generalization destroys utility. Under-generalization leaves individuals identifiable. Location data is particularly resistant β€” even coarsened spatio-temporal data retains high re-ID potential. A grid square with one subscriber at 3 AM is effectively a direct identifier.

Common generalization patterns​

Original valueGeneralized valueContext
Birthdate (1987-03-15)Birth year (1987) or age band (35–39)All verticals
Street addressDistrict or postal code prefixRetail, finance, energy
GPS coordinateGrid square (100m²–1kmΒ²)Telco, energy
Cell tower IDCell cluster (5–10 towers)Telco CDRs
Timestamp (14:23:07)Hour bucket (14:00–15:00)All verticals
Transaction amount (€47.83)Range bucket (€25–€50)Finance, retail
Call duration (3m42s)Category (1–5 min)Telco CDRs
Smart meter reading (15-min)Hourly or daily aggregateEnergy/utilities

Card 3: Hashing (plain, salted, HMAC)​

FieldDetail
MechanismCryptographic hash maps input to fixed-length digest. Plain: SHA-256(input). Salted: SHA-256(inputβ€–salt). HMAC: HMAC-SHA256(key, input) β€” standardized keyed-hash construction.
ReversibilityNo (computationally irreversible) β€” but plain hashing of finite-domain inputs is trivially reversible via dictionary attack
Privacy guaranteePlain: NONE for finite-domain inputs. HMAC: resistant to precomputation attacks as long as key is secret.
GDPR statusHMAC: pseudonymization. Plain/salted hashing of finite-domain identifiers: not effective pseudonymization (enumerable β€” see comparison matrix above).
Utility impactHigh utility preserved β€” deterministic output enables joins and aggregations
GCP serviceSDP CryptoHashConfig (SHA-256); BigQuery DDM SHA-256 masking rule; Cloud KMS for HMAC key management
When to useHMAC-SHA256 with Cloud KMS: the standard production pattern for identifier pseudonymization when join capability is needed and re-identification is not required
When NOT to usePlain hashing: never for finite-domain identifiers. Salted: when cross-dataset joins are needed. HMAC: when re-identification/detokenization is required (use FPE or tokenization).
Key riskPlain hashing is "equivalent to cleartext for any attacker who can enumerate the input domain"

Hash variant comparison​

PropertyPlain SHA-256Salted SHA-256HMAC-SHA256
Dictionary attack resistantNoPrevents precomputed rainbow tables, but if the salt is known (standard practice), finite domains are still enumerable per saltYes β€” key must remain secret
Cross-dataset joinsYesNo (different salts)Yes (same key)
ConsistencyYesPer-saltPer-key
Key management requiredNoPer-saltYes β€” centralized
Recommended for productionNoSituationalYes

Dictionary attack enumeration times​

IdentifierDomain sizeEnumeration time
MSISDN~10⁸Minutes
IBAN~10⁹–10¹⁰Hours
Credit card (per BIN)~10⁢Seconds
IPv4~4.3Γ—10⁹Hours
SSN~10⁹Minutes

Card 4: Tokenization (vaulted and vaultless)​

FieldDetail
MechanismReplace sensitive value with random or algorithmically derived token with no mathematical relationship to original. Vaulted: secure database maps originals β†’ tokens. Vaultless: derived cryptographically (typically FPE-based).
ReversibilityYes β€” via vault lookup (vaulted) or via key (vaultless)
Privacy guaranteeRandomized vaulted tokens reveal nothing about the original without vault access. Deterministic tokens (including FPE-based vaultless) preserve equality β€” same input produces the same token β€” enabling linkability without key access.
GDPR statusPseudonymization
Utility impactHigh β€” consistent tokens preserve join capability and referential integrity
GCP serviceSDP CryptoReplaceFfxFpeConfig (vaultless/FPE-based); custom vault implementations on Cloud SQL/Spanner
When to useWhen re-identification/detokenization is required AND maximum security needed; PCI-DSS mandated scenarios; reversible pseudonymization for operational processes
When NOT to useHigh-throughput pipelines where vault latency is unacceptable (consider HMAC); when irreversibility is preferred
Key riskVaulted: vault becomes single point of failure + performance bottleneck at scale. Vaultless: reintroduces key management as security dependency.

Vaulted vs. vaultless comparison​

PropertyVaultedVaultless (FPE-based)
Security modelVault compromise = full exposureKey compromise = full exposure
LatencyVault lookup per operationCrypto operation (fast)
ScalabilityVault becomes bottleneck at scaleScales with compute
ReversibilityVia vaultVia key
InfrastructureHigh-availability databaseKMS/HSM
PCI-DSS scopeFull reduction (random token)Partial (depends on assessment)

Card 5: Format-preserving encryption (FPE)​

FieldDetail
MechanismEncrypts data while maintaining original value's length, character set, and structure. A 15-digit MSISDN encrypts to another 15-digit numeric string. Uses NIST FF1 algorithm (AES-based Feistel network, 10 rounds).
ReversibilityYes β€” anyone with the encryption key can decrypt
Privacy guaranteeEncrypted value does not reveal the plaintext without key. However, deterministic output exposes equality and frequency patterns (same plaintext = same ciphertext), and the preserved format reveals length and alphabet. Linkability is preserved without decryption.
GDPR statusPseudonymization (reversible β†’ still personal data)
Utility impactVery high β€” preserves format, length, character set; passes downstream validation
GCP serviceSDP CryptoReplaceFfxFpeConfig (AES-FFX mode); Cloud KMS for key management
When to useFormat compatibility is a hard constraint β€” legacy system integration, schema migration avoidance, phased rollouts
When NOT to useGreenfield architectures (HMAC is simpler and avoids reversibility surface); small-domain fields (< 1M possible values); fields where deterministic linkability is unacceptable
Key risksFormat leakage (encrypted MSISDN starting with +36 reveals country β€” always encrypt entire value). Small-domain vulnerability (FF1 minimum domain = 1,000,000 values). Does not preserve checksums (Luhn, IBAN check digits) β€” downstream validation may fail.

FF1 reference​

PropertyDetail
Rounds10
Minimum domain size1,000,000 values (Rev. 1 draft)
Tweak sizeArbitrary length
GCP supportCryptoReplaceFfxFpeConfig (AES-FFX mode)
NoteFF3-1 removed from NIST SP 800-38G Rev. 1 (2025 draft); FF1 is the only retained algorithm

Card 6: Data masking (static and dynamic)​

FieldDetail
MechanismStatic (SDM): permanently transforms a copy of production data using per-field transformations. Dynamic (DDM): masks values at query time based on caller's identity/role; stored data unchanged.
ReversibilitySDM: No. DDM: N/A β€” original data never modified.
Privacy guaranteeSDM: depends on component techniques. DDM: none β€” it's access control, not a privacy transformation.
GDPR statusSDM: depends on techniques used. DDM: still personal data.
Utility impactSDM: medium β€” preserves schema, types, distributions, referential integrity. DDM: high β€” different users see different masking levels.
GCP serviceDDM: BigQuery via policy tags + masking rules (SHA256, Nullify, Default Value, Last 4 Characters) with Fine-Grained Reader / Masked Reader roles. SDM: custom Dataflow/Spark pipelines or commercial tools (Delphix, Informatica).
When to useSDM: non-production environments (dev/test/staging), data sharing. DDM: role-based access control within production β€” data scientists get full detail, business analysts get masked view. Common: DDM on Zone 1 for access control, SDM for exports.
When NOT to useDDM alone is never sufficient for anonymization claims. SDM: when reversibility is required.
Key riskDDM is frequently mistaken for anonymization. "We mask the data" may mean only that certain roles see masked values while data at rest is fully identifiable. SDM without referential consistency breaks foreign key relationships.

SDM field transformation patterns​

Field typeMasking approachExample
NameRealistic substitution"Maria KovΓ‘cs" β†’ "Anna TΓ³th"
EmailDomain-preserving substitutionmaria@example.com β†’ user4821@example.com
PhoneRandom replacement or FPE"+36 30 123 4567" β†’ "+36 30 847 9213"
AddressStreet/number randomization, postal code preserved"VΓ‘ci ΓΊt 33" β†’ "AndrΓ‘ssy ΓΊt 78"
Date of birthDate shifting (Β± random days)"1987-03-15" β†’ "1987-06-22"
Account balanceProportional noise or range bucketing"€12,847.33" β†’ "€13,100.00"
Foreign keyConsistent substitution across all tables"CUST-0042" β†’ "CUST-7819" (same everywhere)

Card 7: Perturbation and noise injection​

FieldDetail
MechanismAdds controlled randomness (typically Laplace or Gaussian noise) to data values. Individual records become unreliable; population-level statistics are preserved (noise is symmetric, mean zero).
ReversibilityNo
Privacy guaranteeIndividual values unreliable. With DP framework: formal mathematical guarantee. Standalone: "rough privacy improvement" without quantifiable guarantee.
GDPR statusAnonymization if within a DP framework; otherwise depends on noise calibration
Utility impactMedium β€” individual record values unreliable; aggregate statistics converge to true values for large groups
GCP serviceBigQuery DIFFERENTIAL_PRIVACY clause (calibrated noise on aggregate queries); Privacy on Beam / PipelineDP for batch pipelines
When to useWithin a DP framework for formal guarantees on external sharing and regulatory compliance. Standalone for internal use cases where approximate privacy improvement is acceptable.
When NOT to useStandalone for external data sharing, regulatory compliance claims, or formal privacy guarantees. Not for categorical/text fields.
Key riskStandalone perturbation cannot answer "how much noise is enough" or "how privacy degrades across multiple queries." Spatial perturbation with too-small radius β€” consistent nighttime location still reveals home address. Without composition tracking, repeated queries erode privacy.

Card 8: Synthetic data generation​

FieldDetail
MechanismCreates entirely artificial records preserving statistical properties (distributions, correlations, relationships) of original dataset. No record in output corresponds to any real person.
ReversibilityNo
Privacy guaranteeIf no memorization: output contains no real individuals. With DP-SGD training: formal guarantee that no individual record influenced output beyond bounded amount.
GDPR statusNot personal data β€” IF no model memorization (must be validated)
Utility impactHigh at the statistical level (distributions, correlations preserved); individual records are fictional
GCP serviceNo native GCP service. Gretel (SaaS, has DP mode). SDV (open-source β€” tabular, relational, time-series). Custom training via Vertex AI.
When to useML training requiring record-level data; dev/test environments with realistic-looking data; external data sharing where record-level output is required
When NOT to useWhen exact record-level fidelity is critical; when training data is too small for the model to learn distributions rather than memorize; when formal guarantees are needed without DP-SGD quality cost (consider k-anonymity)
Key riskModel memorization β€” if the generative model memorizes training records (especially outliers or small datasets), synthetic output may contain near-exact copies of real individuals. Must validate with privacy testing: SDV includes disclosure-risk and attribute-inference metrics; for a full membership inference attack (can an attacker determine if a specific record was in the training data?), implement the train/holdout attack-model approach from Module 12.

Validation requirements​

CheckWhat it testsTool
Membership inference testCan an attacker determine if a specific record was in the training data?Custom train/holdout attack model (see Module 12); SDV's built-in metrics cover disclosure risk and attribute inference but not full MIA
Distribution comparisonDo synthetic distributions match original?Statistical tests (KS test, chi-squared)
Correlation preservationAre inter-column relationships preserved?Correlation matrix comparison
Fairness / representationDoes synthetic data preserve or amplify bias?Per-subgroup distribution analysis (required for EU AI Act compliance)

Technique application by vertical​

Telco CDR pipeline​

FieldTechniqueRationale
MSISDN, IMSIHMAC-SHA256Pseudonymize direct IDs; preserve joins
IMEIHMAC or suppressionDevice ID; no join requirement in most analytics
Cell tower IDGeneralization (tower β†’ cluster)Reduce location precision
Call timestampTemporal bucketing (β†’ hourly)Prevent trajectory reconstruction
Call durationRange bucketingReduce behavioral specificity
SMS/call contentFull suppressionExtreme sensitivity, no analytical value
Aggregate outputsDifferential privacyFormal guarantee for external stats

Retail / e-commerce​

FieldTechniqueRationale
Customer IDHMAC or deterministic encryptionCross-domain joins
PAN (payment card)Tokenization (PCI-DSS)Scope reduction
SKUs / productsCategory generalizationReduce basket uniqueness
AddressesPostal prefix onlyLocation QI treatment
ClickstreamDP aggregationBehavioral patterns

Financial services​

FieldTechniqueRationale
Account numbersTokenization or HMACPseudonymize; original retained under AML
Transaction amountsRange bucketingReduce precision for analytical zone
MerchantsMCC category generalizationReduce transaction uniqueness
Fraud statisticsDifferential privacyCross-institutional sharing

Energy / utilities​

FieldTechniqueRationale
Meter IDsHMACPseudonymize
Consumption readingsTemporal aggregation (15-min β†’ hourly)Counter NILM inference
LocationGrid square generalizationReduce precision
Demand forecasting outputSynthetic data generationAggregate patterns without individual data