Ciphers

Note that the intercepted message does not appear to use any single cipher introduced here. Station HYDRA suspects multiple encryption (superencipherment): an additional outer layer must be removed first. For that outer layer, you’re on your own.

1 Monoalphabetic Substitution Cipher

1.1 Description

The Monoalphabetic Substitution Cipher is a fundamental encryption system that relies on a fixed, one-to-one mapping between plaintext and ciphertext characters. This method replaces every instance of a specific letter in the original message with a corresponding character from a mixed cipher alphabet. Unlike polyalphabetic ciphers, the relationship between a plaintext letter and its cipher replacement remains constant throughout the message, creating a simple yet effective obfuscation for those without the key.

1.2 Prerequisites

To use a monoalphabetic substitution cipher, both the sender and receiver require:

1.3 Encrypt a Message

  1. Prepare the Plaintext Message

    Select or compose the message to be sent.

    Example: A Roman general wants to send ATTACK AT DAWN to a garrison leader.
  2. Consult the Substitution Key

    For each letter in the message, consult the pre-arranged cipher alphabet to find the corresponding replacement character.

    The general consults his key, which maps plaintext to ciphertext:
    PlaintextCiphertext
    AM
    CA
    DL
    KX
    ND
    TC
    WI
  3. Perform the Substitution

    Replace every letter in the plaintext with its specific counterpart from the cipher alphabet.

    The general proceeds to swap the characters:
    • ATTACK becomes MCCMAX
    • AT DAWN becomes MC LMID
  4. Build the Complete Message

    Assemble the final ciphertext. Spacing and punctuation may be kept for readability or removed for security.

    The general assembles the final message as MCCMAX MC LMID.

1.4 Decrypt a Message

  1. Receive the Ciphertext

    Obtain the encrypted message.

    The garrison leader receives the message MCCMAX MC LMID.
  2. Reverse the Key Mapping

    Using the shared key, identify the reverse mapping by locating ciphertext letters in the key and finding their plaintext origins.

    The leader looks at the key to interpret the incoming letters:
    • Cipher letter M corresponds to Plaintext A
    • Cipher letter C corresponds to Plaintext T
    • ...
  3. Restore the Plaintext

    Substitute the cipher characters back into their original alphabet forms to reveal the meaning.

    He translates the characters back:
    • MCCMAX becomes ATTACK
    • MC LMID becomes AT DAWN

2 JN-25

2.1 Description

JN-25 is a two-stage encryption system that combines a large codebook with additive encryption. The cipher consists of approximately 45,000 five-digit code groups (each representing a word or phrase), which are further encrypted using five-digit additive numbers to mask the original codebook values. This creates a formidable security layer that requires cryptanalysts to strip away the additive before recovering the underlying code meanings.

2.2 Prerequisites

To use JN-25, both the sender and receiver require:

2.3 Encrypt a Message

  1. Prepare the Plaintext Message

    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 send ATTACK AT DAWN to a fleet.
  2. Look Up Code Groups

    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: 97851
    • AT DAWN corresponds to code group: 45612
  3. Determine the Indicator

    Select a random starting point (called indicator) in the additive table.

    The operator chooses index 34 as the starting position.
  4. Encipher the Message with Additives

    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,000 addition to create the cipher groups.

    From position 34, the operator retrieves two sequential additives:
    • Additive 1: 12345
    • Additive 2: 67890
    Now he adds each additive to its corresponding code word.
    • ATTACK (code group 97851) becomes (97851 + 12345) mod 100,000 = 09196
    • AT DAWN (code group 45612) becomes (45612 + 67890) mod 100,000 = 02402
  5. Build the Complete Message

    Assemble the final message as:

    • The indicator
    • The enciphered message text
    The operator assembles the final message as 34 09196 02402

2.4 Decrypt a Message

  1. Extract Message Components

    Separate the indicator and enciphered message body.

    The operator receives 34 09196 02402 and correctly identifies 34 as the indicator and 09196 02402 as the enciphered message body.
  2. Locate Additive Sequences

    Using the recovered indicator, identify the correct position in the additive table and prepare to use the sequential additive numbers from that point.

    From position 34, the operator retrieves the same two sequential additives:
    • Additive 1: 12345
    • Additive 2: 67890
  3. Remove Additives from Message

    For each five-digit cipher group in the message body, subtract the corresponding sequential additive number using modulo 100,000 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 = 97851
    • 02402 becomes (02402 - 67890 + 100,000) mod 100,000 = 02402
  4. Consult the Codebook

    Look 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: ATTACK
    • 45612 corresponds to code group: AT DAWN