Generating Format-Preserving, Checksum-Valid Fake PII for Safe Data Sharing
Sharing real customer spreadsheets with vendors, contractors, or training pipelines raises a problem: deleting personal fields kills the data's usefulness, while random replacements break formats and downstream systems. A usable substitute must preserve the original format, such as keeping an 11-digit phone number at 11 digits. It also has to pass checksum validation, including Luhn for bank cards and the ISO 7064 MOD 11-2 check digit for Chinese ID numbers, or validators will reject it. Replacements should be consistent and deterministic, so the same real value maps to the same fake everywhere and joins keep working. The article's approach derives digits from an HMAC of the real value using a secret key, then repairs the check digit, while keeping embedded dates plausible.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in