[Contents]
Copyright © 2016 jsd

The Nundrum Cipher Machine

1  Overview

The challenge for today is to design a crypto machine that could have been built using WWII-era electromechanical technology (i.e. no electronics), yet offering greater security than the actual machines of that era. In particular, we want to avoid the known weaknesses discussed in section 4.

The objective is simple yet lofty: Even if the adversary captures the machine, including the whole ensemble of rotors, along with a goodly number of known plaintexts, they still won’t be able to decrypt other messages from that day, or any past or future day, assuming of course that they don’t capture the codebook containing the daily keys.

The proposed machine is called Nundrum.

It makes use of the following good ideas that were available at the time:

Each rotor in the Nundrum machine is made using PCB technology. It has two sub-boards laminated together, with a total of three metal layers. The front sub-board has metal on the front side, while the back sub-board has metal on both sides.

One sector of the front of a typical Nundrum rotor is shown in figure 1. The rotor has 24 rows, spaced every 15 around the circle, but for simplicity only three rows are shown in the figure. The rectangular areas are contact pads. These are the same on all rows of all rotors, so they don’t give away any information about the wiring. On each row there are ten pads, in five groups of two, which handle a five-bit binary code (such as Baudot code) using the two-wire representation. The generalization to six or more bits is straightforward.

An analogous mirror-image view of one sector of the back of the combined board is shown in figure 2.

rotor-pcb-blue   rotor-pcb-red
Figure 1: Front Side of Rotor   Figure 2: Back Side of Rotor (mirror image)
 

Figure 3 shows the wiring of the rotor. This is sandwiched in the middle, where nobody can see it. Figure 4 shows an Xray view of all three layers together.

rotor-pcb-green   rotor-pcb
Figure 3: Internal Wiring of Rotor   Figure 4: Combined Xray View of Rotor
 

The round blobs at the end of the wires are vias. This is where electrical connection is made from one layer to another, by soldering. Plated-through holes were not developed until 1947 (reference 9), so it would be ahistorical to rely on them. More generally, electroless autocatalytic deposition was not developed until 1946 (reference 10). The vias are positioned so that the contact fingers never rub against them.

The wiring is set up so that on the row that is horizontal in the diagram (the 9:00 row) each pad on the front is connected to the pad directly behind it on the back. Meanwhile, on the row above that (the 9:30 row), each pair of pads is cross-wired. Since we are using the two-wire representation, this is the logical NOT function. To say the same thing another way, on the horizontal row the input is XORed with subkey 00000, while on the row above that, the input is XORed with subkey 11111. On the row below horizontal (the 8:30 row), the input is XORed with subkey 10011.

Each rotor can rotate to 24 different positions. Each rotor can be flipped front-to-back, which means it cycles through its various subkeys in the reverse order.

The Nundrum machine uses N such rotors in series, where N is at least 12.

In the machine, there is a stator between each pair of rotors. On each side of the stator there are spring-loaded fingers that make contact with the pads on the rotors. Only one row of the rotor is active at any one time, so the stator needs only ten fingers on each side.

The main rotors used to encrypt a character are called the cipher rotors. In addition, there are N control rotors and N index rotors. The control and index rotors function as a PRNG, and are used to control the advance of the cipher rotors. After each character of the message, a random subset of the cipher rotors is advanced. On average, half of the rotors advance each time.

The advance of the control rotors themselves is influenced by the ciphertext. This implements ciphertext feedback (CFB) mode. It introduces an important nonlinearity. It means that Nundrum is not simply a stream cipher. It also means that encryption is not the same as decryption. A switch is needed to select ciphertext=output (during encryption) or ciphertext=input (during decryption). Note that the control rotors are advanced during one phase of the cycle, and the cipher wheels are advanced at a later phase. This implements a form of master/slave timing, so there are no glitches, no race conditions.

This setup provides 243N bits of state that can change during the message, even if one assumes that the adversary knows the choice of rotors, the order of rotors, and the wiring of each rotor. Note that 2436 ≈ 2165. This stands in contrast with a three-rotor Enigma, where the message keyspace was only 263 = 17576 ≈ 214.

There is additional state that is static, i.e. does not change during the message. We devalue this, because cryptanalytic strength depends more on the changes of state than on the state itself.

The combination of rotors and stators, arranged on the spindle, is called a basket of rotors. The choice of rotors does not change during a given message. Good practice is to change it on a daily basis, by installing a new basket of rotors. (The old basket should be kept around for a little while, to handle messages that were encoded before the changeover but not decoded until after.)

On a character-by-character basis, the order of rotors within the basket does not matter, because XOR is a linear operation, i.e. addition modulo 2. However, over the course of a message the order does matter, because the advance is different for each rotor position.

Each machine ships with a set of dice. Each session key (aka message indicator) is 3N characters long. For each character, operator rolls the dice and then looks into a small codebook. The importance of randomness is strongly emphasized. Headquarters keeps records of all session keys used. Any operator caught re-using a session key, or otherwise using a non-random session key, is in serious trouble.

The session key is encoded using the key of the day. Then the message payload is encoded using the session key.

2  Rotor Abundance versus Complexity

Here is one way of looking at the contrast between Nundrum and Enigma:

Nundrum uses a large number of simple rotors.   In contrast Enigma used a smaller number of more complicated rotors.

There is such a thing as an emergent property. One quill taken from a porcupine isn’t very scary, but the living porcupine as a whole is not to be trifled with.   The state space of the Enigma was too small. What’s worse, during a message, the state changed only slowly from one character to the next. The complexity of the rotors did not make up for the small keyspace and slowly changing state vector.

On a character-by-character basis, a single Nundrum rotor can implement any one of 25 different permutations of the alphabet. Putting N rotors in series does not change this number. It’s always a simple five-bit XOR.   A single Enigma rotor can implement an arbitrary permutation of the alphabet. There are 26 factorial ≈ 288 such permutations. Putting N rotors in series does not change this number.

It could be argued that Enigma devoted too much attention to character-by-character security, and not enough to message-by-message security. We prefer a balanced approach, with sufficient character-by-character security and vastly improved message-by-message security.

For a simple stream cipher, the nightmare scenario is when (a) the adversary obtains a known plaintext and the corresponding ciphertext, and (b) the key is reused. The adversary can trivially read all messages enciphered using that key.   With a more general substitution, knowing how letter A is encoded gives away very little about how letter B is encoded.

  On the other hand, this advantage comes at the cost of complicated and bulky rotors, and the advantage largely evaporates if/when the adversary learns the rotor wirings.

One way to proceed is to accept the inherent limitations of a stream cipher, and just do whatever is necessary to make sure no two messages are ever sent with related keys. This is easier to arrange when the keyspace is large.   Ray Dillinger pointed out that Enigma is vulnerable to “a related-key attack from hell.”

A second line of defense is to operate in CFB (ciphertext feedback) mode. This means the system is no longer simply a stream cipher. You’re still in trouble if the same key is used for similar plaintexts, so the fact remains that the primary source of strength is to make sure you never use a repeated key or a related key.  

3  Refinements, Extensions, and Other Remarks

4  Weakness of WWII-Era Crypto Machines

5  References

1.
Tony Sale,
“Lorenz ciphers and the Colossus”
https://www.codesandciphers.org.uk/lorenz/index.htm

2.
Adriano Garsia,
“Inside Purple”
https://math.ucsd.edu/~crypto/Projects/WillGarner/machine.htm

3.
Wikipedia article,
“Printed circuit board”
https://en.wikipedia.org/wiki/Printed_circuit_board

4.
Wikipedia article,
“Gilbert Vernam”
https://en.wikipedia.org/wiki/Gilbert_Vernam

5.
NSA Center for Cryptologic History,
“The SIGABA / ECM II Cipher Machine : A Beautiful Idea”
https://www.nsa.gov/about/cryptologic-heritage/historical-figures-publications/publications/assets/files/sigaba-ecm-ii/The_SIGABA_ECM_Cipher_Machine_A_Beautiful_Idea3.pdf

6.
National Cryptologic Museum,
“Exhibit Information”
https://www.nsa.gov/about/cryptologic-heritage/museum/exhibits/

7.
Wikipedia article,
“NEMA Machine”
https://en.wikipedia.org/wiki/NEMA_(machine)

8.
Ana María Gaggero,
“The Swiss cipher machine NeMa”
https://www.cryptolux.org/images/5/51/NeMaThesis.pdf

9.
James Brown,
“The History of Printed Circuit Boards”
http://www.rapidpcb.com/history-of-printed-circuit-boards.html

10.
Mordechay Schlesinger,
“ELECTROLESS DEPOSITION OF NICKEL”
http://www2.bren.ucsb.edu/~dturney/port/papers/Modern%20Electroplating/18.pdf

11.
James Lyons,
“Cryptanalysis of Enigma”
http://practicalcryptography.com/cryptanalysis/breaking-machine-ciphers/cryptanalysis-enigma/

12.
Crypto Museum,
“M-125 Fialka”
http://www.cryptomuseum.com/crypto/fialka/m125/index.htm
[Contents]
Copyright © 2016 jsd