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.
The hash
Section titled “The hash”- Standardize the value using the rule for its type, below.
- Hash it with SHA-256, reading the text as UTF-8.
- 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.
Rules for each identifier
Section titled “Rules for each identifier”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.
Date of birth
Section titled “Date of birth”Write it as YYYYMMDD, with no separators.
| Your value | Standardized |
|---|---|
July 4, 1985 |
19850704 |
ZIP or postal code
Section titled “ZIP or postal code”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.
First name and last name
Section titled “First name and last name”Standardize each one separately:
- Apply Unicode NFKC normalization and remove invisible control characters.
- Convert to lowercase.
- Replace Greek, Cyrillic and certain special Latin letters using DROP’s character
mapping, for example
ßtossandøtoo. - Convert accented Latin letters to plain ones, for example
ñton. - 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.
Mobile advertising ID (MAID)
Section titled “Mobile advertising ID (MAID)”Keep the hexadecimal characters, convert to lowercase. The result must be exactly 32 characters.
| Your value | Standardized |
|---|---|
A3F1C2D4-5678-90AB-CDEF-1234567890AB |
a3f1c2d4567890abcdef1234567890ab |
Vehicle identification number (VIN)
Section titled “Vehicle identification number (VIN)”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.
Connected TV identifier
Section titled “Connected TV identifier”Keep letters and digits, convert to lowercase. The result must be 8 to 32 characters.
Combined lists
Section titled “Combined lists”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:
- Standardize and hash each field on its own, to Base64.
- Join those Base64 strings in the order above, with nothing between them. Keep each
trailing
=. - 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.
Test values
Section titled “Test values”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:
dropnow hash NDZ Danielle Johnson 1985-07-04 91790The DROP sandbox also has a hashing tool you can compare against.
Common mistakes
Section titled “Common mistakes”- 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.