Chinese Telegraph Code Standard Telegraph Codebook · 1881
Seven thousand Chinese characters, four digits each — the codebook that put Chinese onto the global telegraph and onto every signals analyst’s desk.
Why This Matters
By the 1860s telegraphy was knitting the world together — except for the Chinese-speaking world, whose script could not be sent over a wire designed for Latin letters. In 1871 Septime Auguste Viguier, a French harbour-master in Shanghai, published the first systematic telegraph code for Chinese: every character received a unique 4-digit number. The 1881 standard edition by Zheng Guanying expanded it to over 7,000 characters and became the basis for every Chinese telegraph code that followed.
The codebook is still in active use today. Hong Kong identity cards, mainland Chinese passports, and Taiwanese name registrations all carry the four-digit Chinese Commercial Code (CCC) number for each character in the holder’s name — a direct, unbroken descent from the Viguier code of 1871.
The codebook is a giant lookup table. Each Chinese character maps to a fixed 4-digit number (0001–9999); the operator transmits the digits as Morse code. The receiver looks up each 4-digit group in their copy of the same codebook and recovers the character.
For confidentiality, codebook digits were super-enciphered by an additive: a numeric key (often supplied by a daily one-time pad page) was added to each code group modulo 10,000, then transmitted. The recipient subtracted the same additive before consulting the codebook. This is the architecture later adopted by the Japanese Navy in JN-25 and many other 20th-century military codebooks.
The demo above operates over the Latin alphabet to keep the round-trip transparent: each A–Z letter receives one of 26 stable 4-digit codes, and the additive key is your numeric input.
Civil traffic used the published codebook with no additive. Anyone with a copy could read the messages — the codebook was a transmission convenience, not a cipher.
When two messages were sent with overlapping additives, the difference of ciphertexts equalled the difference of underlying codegroups. Frequency analysis of common characters (the, of, to-style fillers in Chinese) recovered the additive. This is precisely the technique Rochefort’s team used against JN-25.
| CTC lesson | Modern echo |
|---|---|
| Codebook + additive = the workhorse military system of the 20th c. | Block cipher + nonce-based mode is the same architecture (lookup + masking) |
| Codebook ID numbers persist in identity systems | Unicode codepoints are the same idea, with cryptographic neutrality |
| Adapting a script to a hostile transport | Punycode / IDN encoding for non-ASCII domain names |
| Once the additive repeats, the system collapses | Why nonces must never repeat (AES-GCM, ChaCha20-Poly1305) |
| Origin | Septime Auguste Viguier, French harbour-master, Shanghai |
| Year | First codebook 1871; standard edition 1881 |
| Mapping | 4-digit code group per Chinese character (~10,000 entries) |
| Use | Civil telegraphy publicly; diplomatic / military traffic super-enciphered |
| Status | Still used today as a transliteration index for legal names |