Implementing

Blocklist filtering

View this section in the spec ↗

Generation that guarantees the TNID string contains none of a user-supplied set of substrings, such as profanity. The 64-character data alphabet can spell recognizable words; filtered generation retries until none match.

Blocklist

Patterns matched against the 17 data characters after the .. User-supplied; no default list. Implementations:

  • MUST match case-insensitively, as substrings;
  • MUST NOT modify the patterns during matching.

Generation strategy

TNIDv1

All payload bits are random: regenerate until nothing matches.

TNIDv0

Data characters, counted from 0, come from different bit sources:

CharactersBitsChanges with
0–5TimestampTimestamp
6Timestamp (4), TNID variant (2, always 00)Timestamp
7Timestamp (3), random (3)Random bits
8–16RandomRandom bits
MatchImplementations SHOULD
Touches character 7 or laterRegenerate the random bits
Entirely within characters 0–6Advance the timestamp just far enough to change the match's rightmost (least significant) character: the smallest jump sure to change the match, instead of stepping 1 ms at a time through a possibly long run of matching timestamps

Implementations MUST return an error rather than block indefinitely.

TNIDv0 with encryption

With TNIDv0/TNIDv1 encryption, implementations SHOULD check both the TNIDv0 and the encrypted TNIDv1 data strings, resolving TNIDv0 matches with the TNIDv0 strategy and TNIDv1 matches by regenerating the random bits.

Interoperability

Non-deterministic: implementations need not produce identical output. They MUST detect matches by case-insensitive substring matching, and returned TNIDs MUST contain no blocklisted words in their data string.