The 6B32NW ID format
The key words MUST, MUST NOT, SHOULD, SHOULD NOT and MAY mean what RFC 2119 says they mean. In short, breaking a MUST is a protocol violation. Breaking a SHOULD isn't one, but everyone will find it embarrassing.
1What an ID is
A 6B32NW ID is exactly six characters from the Crockford base-32 alphabet. Each character carries 5 bits, so an ID is a 30-bit number, and there are 326 = 1,073,741,824 of them: about a billion.
The number is random, and it means nothing. A six-character ID carries no version, no type and no owner. It names a neighborhood-sized thing, like a forge or a chat hub, not a person, and not a permanent identity. Those get long identifiers such as XIDs.
forge-p7mjas.lionsberg.world
chat-k3vq8d.lionsberg.world
2Alphabet
Digits 0–9, then letters, leaving out I, L, O and U.
- Leaving out I, L and O means no ID can contain a pair that's easy to confuse, like 1 and l or 0 and O. Leaving out U removes many of the accidental obscenities.
- IDs SHOULD be written in lowercase. They then work unchanged as DNS labels and in URLs.
- Readers MUST ignore case: P7MJAS and p7mjas are the same ID.
- Readers SHOULD accept the usual misreadings, taking i and l as 1 and o as 0. They MAY also ignore hyphens a person has typed in for readability.
3Generating an ID
- The 30 bits MUST come from a cryptographically secure random number generator, with every value equally likely.
- The most significant 5 bits give the first character.
- A generator SHOULD check a new ID against the IDs already in use in its namespace and draw again on a collision.
bits = csprng_uint32() >> 2 // 30 random bits
id = ""
repeat 6 times:
id = ALPHABET[bits & 31] + id
bits = bits >> 5
if contains_word(id): draw again // section 4
4No words
An ID SHOULD NOT contain a word of four or more letters in any of the twenty most-used languages written in the Latin script (listed below). Check after reading the ID the way a person would, with 0 as o and 1 as i or l. That way c00k1e reads as "cookie", m00n as "moon" and 1ag0 as "lago" (Spanish for lake), so none of them can be an ID. Bad words can't get through either.
This is a SHOULD, not a MUST, on purpose. Languages keep growing, so an ID that is clean today may spell something tomorrow. If you hit an ID with a word in it, that's embarrassing, not a protocol violation. Its holder MAY reassign it, and nobody has to. A MUST would also let anyone who coins a new word knock out an ID in use.
This generator throws away any ID that contains a word and draws again. About 1 draw in 30 gets thrown away.
- English
- Spanish
- Portuguese
- French
- German
- Indonesian
- Malay
- Turkish
- Vietnamese
- Italian
- Polish
- Tagalog
- Dutch
- Romanian
- Czech
- Hungarian
- Swedish
- Danish
- Slovak
- Croatian
The word list holds the 50,000 most frequent words of each language in the FrequencyWords corpus (drawn from OpenSubtitles 2018). Accents are stripped, and each word is rewritten in ID form. That makes 107,165 entries. Swahili, Hausa, Yoruba and Javanese are among the twenty largest Latin-script languages, but the corpus doesn't include them. Until it does, they are a known gap.
5Growing past six
A billion IDs should last for years, but not forever. When more are needed, IDs get longer and the six-character ones stay as they are. You can tell which kind an ID is by counting its characters, the same way ISBN-10 and ISBN-13 differ. A six-character ID is always just a random number. A longer form MAY use its first character for a version or a kind, so that the rest can carry more meaning.
6Names belong to people
IDs are random on purpose. You and your agent give each one a local name. To your circle, p7mjas might be "the Falcon server", while another circle calls it "Squirrel". Names travel between circles and may never fully settle, and that's fine. No central list is needed.
7For agents and scripts
GET https://6b32nw.lionsberg.world/ids.txt ten IDs, one per line
GET https://6b32nw.lionsberg.world/ids.txt?n=50 up to 100
GET https://6b32nw.lionsberg.world/ids.txt?case=upper
GET https://6b32nw.lionsberg.world/check/p7mjas ok | malformed | contains-word <w>
GET https://6b32nw.lionsberg.world/words.txt the word list, in ID form