Note that the intercepted message you are tasked with decrypting does not seem to be encrypted with any of the ciphers introduced here. Station HYDRA suspects the use of superencipherment. For the first layer of defense, you are on your own.
JN-25 was a two-stage encryption system that combined a large codebook with additive encryption. The cipher consisted of approximately 45,000 five-digit code groups (each representing a word or phrase), which were further encrypted using five-digit additive numbers to mask the original codebook values. This created a formidable security layer that required cryptanalysts to strip away the additive before recovering the underlying code meanings.
To use JN-25 effectively, both the sender and receiver required:
Select or compose the message to be sent. Break it down into logical units that can be represented by codebook entries.
Example: A Japanese naval commander wants to sendATTACK AT DAWN to a fleet.For each word or phrase in the message, consult the JN-25 codebook and record the corresponding five-digit code group.
Continuing our example, the operator consults the codebook:ATTACK corresponds to code group: 97851AT DAWN corresponds to code group: 45612Select a starting point in the additive table.
The operator chooses index34 as the starting position.Beginning from the selected starting point in the additive table, take sequential five-digit additive numbers. Add each additive to its corresponding code group using modulo 100,00 addition to create the cipher groups.
From position34, the operator retrieves two sequential additives:1234567890ATTACK (code group 97851) becomes (97851 + 12345) mod 100,000 = 09196AT DAWN (code group 45612) becomes (45612 + 67890) mod 100,000 = 02402Assemble the final message as:
34 09196 02402Separate the indicator and enciphered message body.
The operator receives34 09196 02402 and correctly identifies 34 as the indicator and 09196 02402 as the enciphered message body.Using the recovered indicator, identify the correct position in the additive table and prepare to use the sequential additive numbers from that point.
From position34, the operator retrieves the same two sequential additives:1234567890For each five-digit cipher group in the message body, subtract the corresponding sequential additive number using non-carrying subtraction. This yields the original five-digit code group.
Now he adds each additive to its corresponding code word.09196 becomes (09196 - 12345 + 100,000) mod 100,000 = 9785102402 becomes (02402 - 67890 + 100,000) mod 100,000 = 02402Look up each recovered five-digit code group in the JN-25 codebook to find its meaning.
The operator consults the codebook:97851 corresponds to code group: ATTACK45612 corresponds to code group: AT DAWNA monoalphabetic substitution cipher (also called a simple substitution cipher) is one of the most fundamental encryption methods. It works by replacing each letter of the plaintext alphabet with a corresponding letter in a cipher alphabet, using a fixed, one-to-one mapping. For example, if the letter "A" is mapped to "M", then every instance of "A" in the plaintext will become "M" in the ciphertext. The security of this cipher relies entirely on keeping the substitution key (the mapping) secret[4].
To use a monoalphabetic substitution cipher, both parties require:
Develop a shuffled alphabet that serves as the cipher alphabet. This can be created by randomly rearranging the 26 letters of the alphabet.
Example Key:
Prepare the message to be encrypted, typically in uppercase for clarity.
Example plaintext: "ATTACK AT DAWN"
For each letter in the plaintext, find it in the plaintext alphabet and replace it with the corresponding letter in the cipher alphabet.
| Plaintext | A | T | T | A | C | K | A | T | D | A | W | N |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Cipher | M | C | C | M | A | X | M | C | L | M | I | D |
Decide whether to preserve word breaks and punctuation or remove them for increased security. Both approaches are valid depending on the security requirements.
Send only the ciphertext. The substitution key must be communicated through a separate secure channel.
Using the example key above:
Acquire the correct cipher alphabet key through a secure channel.
Example key:
Create the reverse mapping by identifying each ciphertext letter's position in the cipher alphabet and finding the corresponding plaintext letter.
Prepare the encrypted message.
Example ciphertext: "KOZZY DYOXN"
For each letter in the ciphertext, find it in the cipher alphabet and replace it with the corresponding plaintext letter.
| Ciphertext | K | O | Z | Z | Y | D | Y | O | X | N |
|---|---|---|---|---|---|---|---|---|---|---|
| Plaintext | H | E | L | L | O | W | O | R | L | D |
Reassemble the decrypted message with original spacing and punctuation.
Result: "HELLO WORLD"
The most powerful attack against monoalphabetic substitution ciphers exploits the predictable frequency distribution of letters in English and other languages. In English:
An attacker analyzes the frequency distribution of letters in the ciphertext and compares it to known frequency distributions for the suspected plaintext language. High-frequency ciphertext letters likely correspond to common plaintext letters[4].
Attackers exploit patterns such as:
These patterns significantly reduce the search space for the correct substitution key.
If an attacker knows or can guess a portion of the plaintext, they can immediately determine the substitution mappings for those letters. This partial key knowledge can then be extended through frequency analysis and pattern matching to recover the complete key.
If an attacker can convince the cipher operator to encrypt a message containing known plaintext (such as a repeated word or phrase), they can directly observe the corresponding ciphertext mappings and recover portions of the key.
While there are 26! (approximately 4.0 × 10²⁶) possible monoalphabetic substitution keys, this number is still computationally feasible for modern computers. A brute force approach tries all possible keys and checks which one produces intelligible plaintext. This would take only seconds on contemporary hardware.
The attacker uses a dictionary of common words in the suspected plaintext language. For each identified word pattern in the ciphertext, the attacker checks which dictionary words match that pattern, reducing the key search space dramatically.
An experienced cryptanalyst uses knowledge of:
This human-driven analysis can significantly accelerate key recovery compared to purely algorithmic approaches.
Modern attacks use statistical methods to score candidate keys based on how well the decrypted text matches expected English (or other language) characteristics, including n-gram frequencies (digraph, trigraph frequencies), entropy measures, and chi-squared testing[4].
| Property | JN-25 | Monoalphabetic Substitution |
|---|---|---|
| Cipher Type | Code + Additive | Substitution |
| Key Size | 45,000 code groups + additives | 26! ≈ 4.0 × 10²⁶ |
| Complexity | Very High (two-stage) | Low (single stage) |
| Historical Period | WWII (1939-1945) | Classical era and earlier |
| Primary Attack | Depth analysis, stereotypes | Frequency analysis |
| Mathematical Structure | Additive-based encoding | Permutation-based |
| Vulnerability | Operator error, reuse of additives | Fixed mappings, letter frequency |
JN-25 and monoalphabetic substitution ciphers represent two distinct points in cryptographic history and complexity. While the monoalphabetic substitution cipher is elementary and highly vulnerable to frequency analysis, it serves as a fundamental building block for understanding encryption concepts. JN-25, by contrast, represents a sophisticated attempt to layer multiple security mechanisms through code-based encryption combined with additive masking.
However, both systems ultimately fell to determined cryptanalytic effort. JN-25's vulnerabilities stemmed not from mathematical weakness but from operational issues: human error in selecting additive starting positions, reuse of additives creating depths, and stereotyped message patterns. The monoalphabetic substitution cipher's fundamental weakness—the fixed relationship between plaintext and ciphertext letters—cannot be overcome by any operational discipline.
Modern cryptography has learned from these historical lessons, moving toward systems with strong mathematical foundations (such as RSA and AES) combined with rigorous operational security practices.