Outworld

Surrogates

  • Realistic, never <PERSON_1>: John Smith becomes Kasimir Sandoval, John alone becomes Kasimir, JOHN SMITH becomes KASIMIR SANDOVAL, john.smith in a URL becomes kasimir.sandoval, John's keeps its 's.
  • Deterministic per vault (HMAC of a vault secret), consistent across requests and a whole corpus, collision-free, and never equal to any real value the vault or your dictionary knows.
  • Shape-preserving: emails stay valid on reserved example.com/.org/.net domains, phones use the fictional 555-01xx range with the original formatting, addresses keep number length, street suffix, unit and state (addresses outside the US style keep their street word, layout and postal code shape), phones in national formats keep the leading 0 or country code and the grouping, spoken numbers stay digit words, IPs use documentation ranges.
  • Locale-aware addresses: an address that reads as French, Spanish, Portuguese, Italian, German (including Austrian and Swiss forms), Dutch or UK gets a stand-in from the same country, with street names in that language’s grammar, a real mid-sized town and a postal code that fits it. 12 rue de Rivoli, 75001 Paris becomes something like 63 rue de Montreuil, 47000 Agen, and Lindenstraße 8, 50674 Köln something like Bergstraße 5, 35060 Marburg. Multi-word street and town names keep their word count and connectives (Jerez de la Frontera becomes something like Palencia de la Sierra). Detection covers street-first and number-first forms, postcodes with a country prefix (CH-8001), floor and unit parts (2º B, Appt 12, Top 3), multi-line blocks and a trailing country line. A postcode and town with no street are masked only next to an address label or a street line. Danish, Swedish and Norwegian street forms are detected and get a generic stand-in. US-style addresses are generated exactly as before.
  • Family-name-first names get stand-ins from the same origin with the same shape: Nguyen Van An becomes something like Kieu Van Phuc, and Park Ji-hoon something like Hwang Sook-kwan.
  • Handles do not keep the real initial: kchen becomes sradcliffe when the same request shows the person’s full name (so it matches their stand-in), and otherwise gets a different letter.
  • Name lists are bundled and generated for this project; once exhausted, a syllable generator takes over.
  • Gender-consistent: first names are replaced with first names of the same likely gender (a bundled list of common first names; unknown names get gender-neutral surrogates), so Priya ... her stays coherent. A dictionary gender column overrides the guess.
  • One identity per person: every alias of a dictionary entry maps onto parts of the same surrogate. Marcus Delaney becomes Ezra Sandoval, Delaney becomes Sandoval, and the nickname Marc becomes a nickname derived from Ezra (for example Ez), so the model sees one person.
  • A surrogate is never a word that appears capitalized anywhere in the same request, so a stand-in cannot collide with a real name you are sending.

Source: README.md in the Outworld repository.