The grill method (Polish: metoda rusztu), in cryptology, was a method used chiefly early on, before the advent of the cyclometer, by the mathematician-cryptologists of the Polish Cipher Bureau in decrypting German Enigma machine ciphers. The Enigma rotor cipher machine changes plaintext characters into cipher text using a different permutation for each character, and so implements a polyalphabetic substitution cipher.
Background The German navy started using Enigma machines in 1926; it was called Funkschlüssel C ("Radio cipher C"). By 15 July 1928, the German Army (Reichswehr) had introduced their own version of the Enigma—the Enigma G; a revised Enigma I (with plugboard) appeared in June 1930. The Enigma I used by the German military in the 1930s was a 3-rotor machine. Initially, there were only three rotors labelled I, II, and III, but they could be arranged in any order when placed in the machine. Polish cryptologist Marian Rejewski identified the rotor permutations by L, M, and N; the encipherment produced by the rotors altered as each character was encrypted. The rightmost permutation (N) changed with each character. In addition, there was a plugboard that did some additional scrambling. The number of possible different rotor wirings is:
26 3 = 17 , 536 {\displaystyle 26^{3}=17,536}
The number of possible different reflector wirings is:
26 ! 2 13 13 ! = 7 , 905 , 853 , 580 , 625 {\displaystyle {\frac {26!}{2^{13}\,13!}}=7,905,853,580,625}
A perhaps more intuitive way of arriving at this figure is to consider that 1 letter can be wired to any of 25 others, leaving 24 further letters to connect. The next chosen letter can connect to any of 23 others, leaving 22 further letters to connect. Repeating this process yields:
25 ∗ 23 ∗ 21 ∗ 19... ∗ 3 ∗ 1 = 7 , 905 , 853 , 580 , 625 {\displaystyle 25*23*21*19...*3*1=7,905,853,580,625}
The number of possible different plugboard wirings (for six cables) is:
26 ! 2 6 6 ! 14 ! = 100 , 391 , 791 , 500 {\displaystyle {\frac {26!}{2^{6}\,6!\,14!}}=100,391,791,500}
To encrypt or decrypt, the operator made the following machine key settings:
the rotor order (Walzenlage) the ring settings (Ringstellung) the plugboard connections (Steckerverbindung) an initial rotor position (Grundstellung) In the early 1930s, the Germans distributed a secret monthly list of all the daily machine settings. The Germans knew that it would be foolish to encrypt the day's traffic using the same key, so each message had its own "message key". This message key was the sender-chosen initial rotor positions (e.g., YEK). The message key had to be conveyed to the recipient operator, so the Germans decided to encrypt it using the day's pre-specified daily ground setting (Grundstellung). The recipient would use the daily machine settings for all messages. He would set the Enigma's initial rotor position to the ground setting and decrypt the message key. The recipient would then set the initial rotor position to the message key and decrypt the body of the message. The Enigma was used with radio communications, so letters were occasionally corrupted during transmission or reception. If the recipient did not have the correct message key, then the recipient could not decipher the message. The Germans decided to send the three-letter message key twice to guard against transmission errors. Instead of encrypting the message key "YEK" once and sending the encrypted key twice, the Germans doubled the message key to "YEKYEK" ("doubled key"), encrypted the doubled key with the ground setting, and sent the encrypted doubled key. The recipient could then recognize a garbled message key and still decrypt the message. For example, if the recipient received and decrypted the doubled key as "YEKYEN", then the recipient could try both message keys "YEK" and "YEN"; one would produce the desired message and the other would produce gibberish. The encrypted doubled key was a huge cryptographic mistake because it allowed cryptanalysts to know two encipherments of the same letter, three places apart, for each of the three letters. The Polish codebreakers exploited this mistake in many ways. Marian Rejewski used the doubled key and some known daily keys obtained by a spy, to determine the wiring of the three rotors and the reflector. In addition, code clerks often did not choose secure random keys, but instead chose weak keys such as "AAA", "ABC", and "SSS". The Poles later used the doubled weak keys to find the unknown daily keys. The grill method was an early exploitation of the doubled key to recover part of the daily settings. The cyclometer and the bomba kryptologiczna were later exploitations of the doubled key.
Example message
Frode Weierud provides the procedure, secret settings, and results that were used in a 1930 German technical manual.
Daily settings (shared secret): Wheel Order : II I III Ringstellung : 24 13 22 (XMV) Reflector : A Plugboard : A-M, F-I, N-V, P-S, T-U, W-Z Grundstellung: 06 15 12 (FOL)
Operator chosen message key : ABL Enciphered starting with FOL: PKPJXI
Message to send and resulting 5-letter groups of clear text: Feindliche Infanteriekolonne beobachtet. Anfang Südausgang Bärwalde. Ende 3 km ostwärts Neustadt.
FEIND LIQEI NFANT ERIEK OLONN EBEOB AQTET XANFA NGSUE DAUSG ANGBA ERWAL DEXEN DEDRE IKMOS TWAER TSNEU STADT
… excerpt ends here. Continue reading the full article.

