Digital Nerve
Explained

Why Pseudonymous Keys Can Still Link Records

· 3 min read

Replacing a customer’s email with a code such as “EMAIL_3f9a12bc” feels like a privacy win. The code hides the address, yet it can still point to the same person in every document where it appears. This guide explains why a pseudonym is not anonymity, using what the documentation of our local redaction library says.

This guide describes behaviour documented for our local text-redaction library (version 0.1.5). It describes our own tool, not a statement about any customer machine, business or result. The documentation says the output must be reviewed by a person, and that it is not a legal or compliance determination.

Two Replacement Styles

  • Mask: the value is replaced by a fixed label such as [EMAIL]. The label does not depend on the value.
  • Pseudonym: the value is replaced by a token derived from it with a secret key. The same value and the same key give the same token.

How the Tokens Are Made

The documentation says tokens are a keyed HMAC-SHA256 value truncated to 8 hexadecimal characters. They cannot be reversed without guessing.

Why They Still Link Records

  • Same value, same token. The documentation says tokens are linkable across documents. That is the purpose of a pseudonym, since you can count or follow one customer. It also means anyone with several documents can follow that customer too.
  • Guessable. Anyone who holds the key and can guess a value can test the guess and compare. Short or low-entropy values, such as short numbers, can be recovered this way.
  • A weak or shared key defeats it. If many people hold the key, or it is easy to guess, the protection is gone.
  • Collisions. The token is 32 bits, so two different values can share one.

Masking Does Not Fix Everything Either

The documentation says mask mode writes tokens that do not depend on the value, but it does not make records unlinkable. Context, file names, hashes and the remaining text can still link them. A message that says “the manager of the Alexandria branch” is identifying even with the email masked.

Words to Avoid

The documentation says not to call the output anonymised, de-identified or compliant. A pseudonymised record is still personal data in many legal frameworks. Take advice on the rules that apply to you.

Good Practice

  • Store the key apart from the data, restrict who can use it, and rotate it according to a plan you have written down.
  • Share as few documents as possible with each recipient.
  • Decide how long redacted outputs are kept, and delete them on schedule.
  • Have a person review samples before anything is shared outside your team.

Explained

Related articles