// HACKER NEWS — CYBERSECURITY
Sing-song: a speakable encoding for long numbers and keys
Converting hex numbers like 51ac0759fc4d into singable and memorable sirings like kalo-tadu-komu-tigi.
This is a fun experiment that started as a way to generate deterministic "usernames" for
Nostr npub keys (see the last section).
English is really hard to deal with even
for simple syllables, so the result is not as good as I'd want it to be (a string you can
read to an other person over the phone and make sure they get it right), but it's not
bad either —if everyone spoke Itallian sing-song would be much more valuable :-)
Sing-song is a reversible encoding of arbitrary byte strings as
pronounceable CV syllables. Its 64-syllable alphabet maps each 6-bit
value directly to one syllable. Complete encodings preserve byte length
and leading zero bytes, require no external length metadata, and are
canonical.
The encoding is prefix-stable: shared input prefixes produce shared
syllable prefixes. An optional variant suffix provides alternative
reversible representations of the same byte string.
Machine-oriented encodings such as hex and Base58 are compact but
awkward to speak, transcribe, and remember. Sing-song trades some
written density for a small, regular pronunciation grammar while
remaining deterministic, reversible, and computationally simple.
The encoding should be deterministic, reversible,
prefix-stable, speakable and transcribable without training,
self-sizing for complete byte strings, and self-delimiting
without load-bearing punctuation.
Consonants and vowels strictly alternate, producing 64 open CV syllables
with no clusters or codas. Position parity determines the symbol table.
h, y, and e are omitted because their pronunciation is
comparatively unstable.
Each syllable encodes exactly 6 bits. Display groups contain two
syllables (zila, sibo) separated by cosmetic hyphens.
Parsers MUST
ignore hyphens: zilasibotivajuzu and zila-sibo-tiva-juzu are
identical. Groups provide natural speaking checkpoints.