Skip to content

DROP hashing and formatting rules

A DROP list is a set of hashes. To find a consumer on it, you format your own value by DROP’s rules, hash it, and compare. One stray character gives a completely different hash, so the formatting rules matter more than anything else.

These rules come from CalPrivacy’s technical documentation (version 1.3.0). Check there for changes.

  1. Standardize the value using the rule for its type, below.
  2. Hash it with SHA-256, reading the text as UTF-8.
  3. Write the result as standard Base64.

The result is always 44 characters and ends with =. It is Base64, not the hexadecimal form many tools print by default. There is no salt.

Remove all whitespace and convert to lowercase. Keep everything else, including dots and plus signs. [email protected] and [email protected] are different identifiers.

Your value Standardized
[email protected] [email protected]

Remove any extension, keep digits only, then use the last 10 digits.

Your value Standardized
+1 (415) 555-9317 ext. 22 4155559317

DROP does not remove extensions for you. If you leave one in, its digits end up in the last 10 and the hash is wrong.

Write it as YYYYMMDD, with no separators.

Your value Standardized
July 4, 1985 19850704

Trim spaces. If the value is a ZIP+4, drop the last four digits. Keep letters and digits, convert to lowercase, remove leading zeros, and keep the first five characters.

Your value Standardized
91790-1234 91790
02134 2134
00000 0

The leading-zero rule surprises people. A Boston ZIP code is hashed as four digits.

Standardize each one separately:

  1. Apply Unicode NFKC normalization and remove invisible control characters.
  2. Convert to lowercase.
  3. Replace Greek, Cyrillic and certain special Latin letters using DROP’s character mapping, for example ß to ss and ø to o.
  4. Convert accented Latin letters to plain ones, for example ñ to n.
  5. Keep only letters and digits. Spaces, hyphens and apostrophes go.
Your value Standardized
Juan Pablo juanpablo
María José mariajose
O'Connor oconnor
Иван ivan

Other writing systems, such as Chinese, Japanese, Korean, Arabic and Hebrew, are kept as they are.

Keep the hexadecimal characters, convert to lowercase. The result must be exactly 32 characters.

Your value Standardized
A3F1C2D4-5678-90AB-CDEF-1234567890AB a3f1c2d4567890abcdef1234567890ab

Trim, remove spaces and hyphens, convert to lowercase. The result must be 5 to 17 letters or digits. A VIN containing any other punctuation is invalid.

Keep letters and digits, convert to lowercase. The result must be 8 to 32 characters.

Two lists combine several fields into one hash.

  • NDZ: first name, last name, date of birth, ZIP
  • NameVIN: first name, last name, VIN

To build one:

  1. Standardize and hash each field on its own, to Base64.
  2. Join those Base64 strings in the order above, with nothing between them. Keep each trailing =.
  3. Hash the joined string again, to Base64.

Every field must be present. If you do not hold a date of birth, you cannot match the NDZ list for that person.

Use these, published by CalPrivacy, to check your own implementation.

Input Hash
Email [email protected] KA18MT/ph6IHYjzT9zwETySDQyvSh87YuoSBpOQtkhE=
Phone +1(415)555-9317 vGM7y5n+hBXRSEAklhHDPCbysyNgYTmXdMcagGUOY8E=
MAID a3f1c2d4-5678-90ab-cdef-1234567890ab 250KY6lOgzYUB3EHrkbDCE2kMEZQE69SF38muhoDudI=
Name Juan Pablo 91hIbrbzNeqHs3o81O5yNrXUj7wDd2shvZ6THKi9qz8=
NDZ: Danielle, Johnson, 1985-07-04, 91790 PQOfn1RffEKmqMmNAzDKKaoZCwxWbQZkQzPWmQo9REA=
NameVIN: Eve, Genesis, 1HGCM82633A004352 rtnDuXIe63jXYQQXW5r07GJ7lSsrib8+46QuKFwkOmk=

With DropNow installed you can reproduce any of them:

Terminal window
dropnow hash NDZ Danielle Johnson 1985-07-04 91790

The DROP sandbox also has a hashing tool you can compare against.

  • Printing the hash as hexadecimal instead of Base64.
  • Removing dots or plus tags from emails, as you might for de-duplication.
  • Leaving phone extensions or country codes in.
  • Keeping the leading zero on a ZIP code.
  • Hashing the full name as one value instead of first and last separately.
  • Putting a separator between the parts of a combined hash.
  • Hashing a value that was already hashed.