Hashing and salting identifiers
Why does hashing an enumerable identifier protect almost nothing?
Hashing and salting of identifiers
This is where the strongest correction of the article belongs.
Hashing an identifier is not anonymization, and usually is not even good pseudonymization. A hash function is one-way, but its resistance to inversion depends entirely on the entropy of the input (how many equally likely values it could have), not on the strength of the function. Identifiers come from small, enumerable domains:
| Identifier | Candidate values | Cost to try all |
|---|---|---|
| National phone number | about 10^10 | seconds on commodity hardware |
| Email address | drawn from leaked corpora of a few billion | feasible with a precomputed list |
| National ID number | often a structured sequence with far less entropy than its length suggests | feasible |
So "we hash the PII" gives approximately no protection against anyone who cares. Treat any claim that hashed identifiers are de-identified as false, unless the input domain is genuinely large and unguessable.
Salting (adding extra data to the input before hashing) is the standard fix, and it collides head-on with the reason you kept the identifier:
- A per-record salt defeats precomputation completely, and destroys the join, because the same person hashes differently in every row.
- A global salt keeps the join, and so it keeps a single stable pseudonym across the dataset. And because the salt must be secret for the scheme to mean anything, a global salt is a key. The construction is now keyed hashing, and you are back in key management with none of encryption's reversibility.
The structural statement underneath is the bridge to the next article: any transformation that lets you link records across datasets has, by definition, preserved identity. Linkage is what identity is in a data system. So no deterministic transformation (hashing, tokenization, deterministic encryption, FPE) can ever be anonymization. The reason is logical, not cryptographic, and no stronger algorithm fixes it. The only exit is to break the linkage, which means destroying information. That is the subject of Privacy.
In one sentence: hash strength is irrelevant when the input domain is enumerable, and any hash you can still join on is a pseudonym, not an anonymization.