Skip to content
About
Main content

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.

, and usually is not even good pseudonymization. A 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:

IdentifierCandidate valuesCost to try all
National phone numberabout 10^10seconds on commodity hardware
Email addressdrawn from leaked corpora of a few billionfeasible with a precomputed list
National ID numberoften a structured sequence with far less entropy than its length suggestsfeasible

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 ) is the standard fix, and it collides head-on with the reason you kept the identifier:

  • A per-record 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 , and you are back in key management with none of '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, , ) 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.