| Enigma Home Page |
Raw dataBlistIn early 1940, Hut 6 at Bletchley Park housed the British cryptanalysts tasked with deciphering Enigma messages. They received intercepted ciphertexts from Y-stations. The Blists contained message headers and all the information needed to use Zygalski sheets. Here is an excerpt from a Blist: Number Call-sign Time Part number Length Grund. The first Three groups 236 2EX RN2 1525 176 =DOT= OUPWO NEQAI JKLFU 237 TOH IDM 1755 2TL=1TL 145 =OUN= ULZNU WDKYD JMZFM 238 TOH IDM 2TL 69 =BNC= ARNDQ CEPKN DDGKR ... The first group contains the Kengruppe, which identifies the network to which the message belongs. The recipient examines this group to determine whether the message is intended for them. By examining a set of multi-part messages, one can deduce the daily Kengruppes for each network. For instance, the Kengruppes ZNU and NDQ belong to the same network. Message InterceptionBletchley Park naturally receives the complete encrypted messages. They are indexed using the number listed in the Blist. Here, for example, is message number 237:
237 TOH IDM 1755 2TL=1TL 145 =OUN= ULZNU WDKYD JMZFM TZSOX ZBEBJ IYUQS PTSRL PIZWD EVAXB BROLN GORMS DHWVZ CPVIM TRJIV DEEKJ UIVKI GIOLT ZDBLC QOBKK PGEWN PSRNY CKGKA MJDBX RGFYC FTDIK XIPAE FODOA TJHRN ISEIO Females derived from trafficFrom the B-lists, we extract all messages containing indicators that include females for the same network. From these, we deduce the Grundstellungs for the first letter of the female. grund. indicators type of females grund. for menus HKH CVZCQQ 1-4 HKH RTK KISSHS 3-6 RTM QTS TDCTCO 1-4 QTS IVU ZJEZZG 1-4 IVU OUN WDKYDY 2-5 OUO LLC OYLOTW 1-4 LLC EZA TFETRS 1-4 EZA NSK CCMPCP 2-5 NSL DUE PTUPBR 1-4 DUE BYL MPCKPG 2-5 BYM IRE AWXAKK 1-4 IRE QRJ USLUMX 1-4 QRJ JUB AOGCOR 2-5 JUC JUS TFJTIR 1-4 JUSNotes:
Writing the menusWe must now write the menus used by the personnel handling the sheets. Note: To simplify the example, we assume that only the three rotors I, II, and III are being used. For each Walzenlage, we list the Grundstellungs to be tested. Walzenlage Grundstellungs I-II-III HKH, RTM, OUO, LLC, EZA, NSL, DUE, BYM, IRE, QRJ, JUC I-III-II HKH, RTM, QTS, EZA, OUO, NSL, BYM, QRJ, IVU, JUS II-I-III HKH, RTM, OUO, LLC, EZA, NSL, DUE, BYM, IRE, QRJ, JUC II-III-I HKH, QTS, LLC, EZA, NSL, BYM, DUE, IRE, QRJ, JUC, JUS III-I-II HKH, RTM, QTS, EZA, OUO, NSL, BYM, QRJ, IVU, JUS III-II-I HKH, QTS, LLC, EZA, NSL, BYM, DUE, IRE, QRJ, JUC, JUSNote: For rotor arrangements ending with rotor III, ground settings ending in STUV, which entail a turnover are omitted (specifically QTS, IVU, JUS). For those ending with rotor II, ground settings ending in BCDE are omitted (specifically LLC, EZA, DUE, IRE, JUC). For those ending with rotor I, ground settings ending in NOPQ are omitted (specifically OUO). Find the Walzenlage and the RingstellungFirst attempt: I-II-IIIWe test Ringstellungs A, B, C, ...$ python3 zygal_sheets.py 123 A HKH,RTM,OUO,LLC,EZA,NSL,DUE,BYM,IRE,QRJ,JUC $ python3 zygal_sheets.py 123 B HKH,RTM,OUO,LLC,EZA,NSL,DUE,BYM,IRE,QRJ,JUC $ python3 zygal_sheets.py 123 C HKH,RTM,OUO,LLC,EZA,NSL,DUE,BYM,IRE,QRJ,JUCIt can be seen that, in every case, there are no holes at the end of the stacking process. However, when testing Ringstellung V, a result is obtained: Ringstellung VON. Notes:
$ python3 zygal_sheets.py 123 V HKH,RTM,OUO,LLC,EZA,NSL,DUE,BYM,IRE,QRJ,JUC
123 V ['HKH', 'RTM', 'OUO', 'LLC', 'EZA', 'NSL', 'DUE', 'BYM', 'IRE', 'QRJ', 'JU
C']
Grunds: ['HKH:L']
A stacked sheets for left Ring V and Walzenlage 123
H I J K L M N O P Q R S T U V W X Y Z A B C D E F G
Z Y X W V U T S R Q P O N M L K J I H G F E D C B A
K Z * * * * * * *
L Y * * * * * * * *
M X * * * * * * *
N W * * * * * * * * * * * * * *
O V * * * * * *
P U * * * * * * * * * * * *
Q T * * * * * * * * * * * *
R S * * * * * *
S R * * * * *
T Q * * * * * *
U P * * * * * * * * * * * * * *
V O * * * * * * * * * * * * * *
W N * * * * * * * * *
X M * * * * * * * * * * *
Y L * * * * * * * * * *
Z K * * * * * * * * *
A J * * * *
B I * * * * * * * * *
C H * * * * * * * * *
D G * * * * * *
E F * * * * * * *
F E * * * * * * * * *
G D * * * * * * * * *
H C * * * * * * * * *
I B * * * * * * * * * * *
J A * * * * * * * * * * *
Grunds: ['HKH:L', 'RTM:V']
A stacked sheets for left Ring V and Walzenlage 123
M N O P Q R S T U V W X Y Z A B C D E F G H I J K L
Z Y X W V U T S R Q P O N M L K J I H G F E D C B A
T Z * * *
U Y * * * *
V X * * * *
W W * * * * * *
X V * * *
Y U * * * *
Z T * * * * * * *
A S
B R * *
C Q * *
D P
E O * * * * * *
F N * * * * * * *
G M * * * *
H L * * *
I K
J J
K I * * * *
L H * * * * * *
M G * *
N F *
O E * * * *
P D * * *
Q C * * *
R B * * * * * *
S A * * * *
...
Grunds: ['HKH:L', 'RTM:V', 'OUO:S', 'LLC:P']
A stacked sheets for left Ring V and Walzenlage 123
C D E F G H I J K L M N O P Q R S T U V W X Y Z A B
Z Y X W V U T S R Q P O N M L K J I H G F E D C B A
L Z *
M Y *
N X
O W *
P V *
Q U *
R T
S S
T R
U Q
V P
W O * *
X N * * *
Y M *
Z L
A K
B J
C I
D H *
E G * *
F F
G E
H D *
I C
J B
K A
...
Grunds: ['HKH:L', 'RTM:V', 'OUO:S', 'LLC:P', 'EZA:I', 'NSL:R', 'DUE:H', 'BYM:F'
]
A stacked sheets for left Ring V and Walzenlage 123
M N O P Q R S T U V W X Y Z A B C D E F G H I J K L
Z Y X W V U T S R Q P O N M L K J I H G F E D C B A
Y Z
Z Y *
A X
B W
C V
D U
E T
F S
G R
H Q
I P
J O *
K N
L M
M L
N K
O J
P I
Q H
R G
S F
T E
U D
V C
W B
X A
Grunds: ['HKH:L', 'RTM:V', 'OUO:S', 'LLC:P', 'EZA:I', 'NSL:R', 'DUE:H', 'BYM:F'
, 'IRE:M']
A stacked sheets for left Ring V and Walzenlage 123
E F G H I J K L M N O P Q R S T U V W X Y Z A B C D
Z Y X W V U T S R Q P O N M L K J I H G F E D C B A
R Z
S Y
T X
U W
V V
W U
X T
Y S
Z R
A Q
B P
C O *
D N
E M
F L
G K
H J
I I
J H
K G
L F
M E
N D
O C
P B
Q A
...
Note: We were lucky; we found the correct solution with the very first Walzenlage
tested. In fact, there are other possible Ringstellungs, but they turn out to be
incorrect when tested.
321: Nothing 312: GXE, NST, RAN 213: HYR 231: Nothing 132: HKJ, KYB, PMT, SAI, SBB Find the SteckersThe general principle is to attempt to decipher the indicators and identify the plugboard settings (steckers) that reveal the key, which must correspond to a repeated trigram. However, we first look for grundstellungs with only two "females" assuming no steckers are active, as these must correspond to plain letter and the corresponding ciphered letter. You can easily see the stecker being used in the grundstellung found in the traffic (or potentially the absence of a stecker). Here are the indicators and their associated Grundstellung, valid for Walzenlage I-II-III: grund. indicators type of females HKH CVZCQQ 1-4 RTK KISSHS 3-6 OUN WDKYDY 2-5 LLC OYLOTW 1-4 EZA TFETRS 1-4 NSK CCMPCP 2-5 DUE PTUPBR 1-4 BYL MPCKPG 2-5 IRE AWXAKK 1-4 QRJ USLUMX 1-4 JUB AOGCOR 2-5 Searching for CyclesOnce the Ringstellung has been determined, the absolute position of the Grundstellung derived from the traffic can be deduced. Then, using the Cyclometer, the cycles associated with each ground setting can be calculated. To save time, I explore the catalog generated by the Cyclometer: $ grep 'LVT$' sheets/123.txt 1-1-2-2-5-5-5-5 IXOCE:PMRAK:VUQLG:YZNHD:WS:JF:T:B I,II,III ZZZ LVTThus, for the Grundstellung HKH, we obtain the two females T:B. We then extract all the females by proceeding in the same way. POS = GRUND – RING – [1,1,1], Cycles of length 1 (females) HKH – VON – [1,1,1] = LVT T:B RTM – VON – [1,1,1] = VEY Q:N OUO – VON – [1,1,1] = SFA T:X:D:L LLC – VON – [1,1,1] = PWO Z:R EZA – VON – [1,1,1] = IKM Y:T:O:J NSL – VON – [1,1,1] = RDX F:B DUE – VON – [1,1,1] = HFQ I:F:N:L BYM – VON – [1,1,1] = FJY N:G:U:T IRE – VON – [1,1,1] = MCQ O:E QRJ – VON – [1,1,1] = UCV W:T JUC – VON – [1,1,1] = NFO R:S:B:OWith T:B cycles, the plaintext letter T yields the ciphertext letter B (or vice versa). With T:X:D:L cycles, the plaintext letter T yields the ciphertext letter X, D, or L. As can be seen, it is easier to use only the Grundstellungs associated with just two females. Initial deductionsLet us consider the first indicator (CVZCQQ, or rather CxxCxx). For the associated Grundstellung HKH, the two cycles T:B indicates that, in the absence of Steckers, encrypting the letter T yields the letter B (or encrypting B yields the letter T). Consequently, there are two mutually exclusive possibilities for the steckers: BC or CT. We can thus construct the following table, based solely on the pairs of females. This yields the following possible plug connections (steckers): (1) HKH CxxCxx B:T BC or CT (2) RTK xxSxxS Q:N SN or SQ (3) LLC OxxOxx Z:R OZ or OR (4) NSL xCxxCx F:B CF or CB (5) IRE AxxAxx O:E AO or AE (6) QRJ UxxUxx W:T UW or UTHypotheses 1 and 4 dictate that only the BC stecker is possible. Hypotheses 3 and 5 dictate that the AO and OZ/OR steckers are incompatible; therefore, only the AE stecker is possible. In conclusion, we have identified two steckers: BC and AE. We also have three pairs of hypotheses: (SN or SQ), (OZ or OR), and (UW or UT). Subsequent deductionsWe take the first indicator, CVZCQQ, and test the two steckers, SN and SQ. $ echo CVZCQQ |python M3.py B I II III "BC:AE:SN" VON HKH TCPTAB $ echo CVZCQQ |python M3.py B I II III "BC:AE:SQ" VON HKH TCPTCETCxTCx decryption involves the SQ and VV steckers. Next, take the third indicator WDKYDY, and test the two UW or UT steckers: $ echo WDKYDY |python M3.py B I II III "BC:AE:SQ:UW" VON OUN MTQMTM $ echo WDKYDY |python M3.py B I II III "BC:AE:SQ:UT" VON OUN EUQMUMFull RCDRCD decryption involves OR and GG steckers. Now we have five steckers. Then you just have to try all the possible letters for each stecker of which you have a single letter. The goal is to decipher the indicators and to have key twice each time, as before RCDRCD. We take the sixth indicator CCMPCP, and we try all the letters associated with the letter P?: PD, PF, PG, PH, PI, PJ, PK, PL, PM, PN. In the latter case we obtain the MFxMFx decryption. $ echo CCMPCP |python M3.py B I II III "BC:AE:SQ:UW:OR:PN" VON NSK MFYMFVThen for the same indicator we try all the letters associated with the letter M?: MD, MF, MG, MH, MI, MJ, MK. In the latter case, we obtain the KFVKFV decryption. $ echo CCMPCP |python M3.py B I II III "BC:AE:SQ:UW:OR:PN:MK" VON NSK KFVKFVNext, we take the indicator associated with the Grund DUE and test all the Steckers involving T?: TD, TF, TG, TH, TI, TJ. In the last case, we obtain the decryption LJWLJW. $ echo PTUPBR |python M3.py B I II III "BC:AE:SQ:UW:OR:PN:MK:ZX:TJ" VON DUE LJWLJWFinally, we take the indicator associated with the Grund EZA and test all the Steckers involving F?: FD, FG, FH, FI. In the last case, we obtain the decryption YMRYMR. $ echo TFETRS |python M3.py B I II III "BC:AE:SQ:UW:OR:PN:MK:ZX:TJ:FI" VON EZA YMRYMRThere you go, we’ve found all 10 Steckers: "BC:AE:SQ:UW:OR:PN:MK:ZX:TJ:FI". Deciphering trafficKey of the DayHere is a summary of the key of the day: Walzenlage : I-II-III Ringstellung : VON (22-15-14) Steckers : AE, BC, FI, JT, KM, NP, OR, QS, UW, XZ Deciphering message 237The Grundstellung OUN and the indicator WDKYDJ are extracted from the Blist. The indicator is deciphered: $ echo WDKYDJ |python M3.py B I II III "AE:BC:FI:JT:KM:NP:OR:QS:UW:XZ" VON OUN KJEKJEThus, the key to the message is KJE. We can then decipher the message:
$ cat msg_237.cry
MZFM TZSOX ZBEBJ IYUQS PTSRL PIZWD EVAXB BROLN
GORMS DHWVZ CPVIM TRJIV DEEKJ UIVKI GIOLT ZDBLC QOBKK PGEWN
PSRNY CKGKA MJDBX RGFYC FTDIK XIPAE FODOA TJHRN ISEIO
$ python M3.py B I II III "AE:BC:FI:JT:KM:NP:OR:QS:UW:XZ" VON KJE < msg_237.cry
ANXGENERALXDIETLXVOMGENERALSTABXSIESINDMITDEMGEBIRGSJAEGERREGIMENTEINSDREINEUNX
INNARVIKGELANDETXIHRETRUPPENSTAERKESCHEINTAUSREICHENDUM
ReferencesNetz simulator |