Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Enigma machine
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Operation == === Basic operation === [[File:Encrypting and decrypting using an enigma machine.webm|thumb|Enciphering and deciphering using an Enigma machine]] A German Enigma operator would be given a plaintext message to encrypt. After setting up his machine, he would type the message on the Enigma keyboard. For each letter pressed, one lamp lit indicating a different letter according to a [[Pseudorandomness|pseudo-random]] substitution determined by the electrical pathways inside the machine. The letter indicated by the lamp would be recorded, typically by a second operator, as the [[cyphertext]] letter. The action of pressing a key also moved one or more rotors so that the next key press used a different electrical pathway, and thus a different substitution would occur even if the same plaintext letter were entered again. For each key press there was rotation of at least the right hand rotor and less often the other two, resulting in a different [[Pseudorandomness|substitution alphabet]] being used for every letter in the message. This process continued until the message was completed. The cyphertext recorded by the second operator would then be transmitted, usually by radio in [[Morse code]], to an operator of another Enigma machine. This operator would type in the cyphertext and — as long as all the settings of the deciphering machine were identical to those of the enciphering machine — for every key press the reverse substitution would occur and the plaintext message would emerge. === Details === [[File:Kenngruppenheft.jpg|thumb|German Kenngruppenheft (a U-boat [[codebook]] with grouped key codes)]] [[File:Enigma keylist 3 rotor.jpg|thumb|Monthly key list number 649 for the German Air Force Enigma, including settings for the reconfigurable reflector (which only change once every eight days)]] In use, the Enigma required a list of daily key settings and auxiliary documents. In German military practice, communications were divided into separate networks, each using different settings. These communication nets were termed ''keys'' at [[Bletchley Park]], and were assigned [[code name]]s, such as ''Red'', ''Chaffinch'', and ''Shark''. Each unit operating in a network was given the same settings list for its Enigma, valid for a period of time. The procedures for German Naval Enigma were more elaborate and more secure than those in other services and employed auxiliary [[codebook]]s. Navy codebooks were printed in red, water-soluble ink on pink paper so that they could easily be destroyed if they were endangered or if the vessel was sunk. An Enigma machine's setting (its [[Key (cryptography)|cryptographic key]] in modern terms; ''Schlüssel'' in German) specified each operator-adjustable aspect of the machine: * Wheel order (''Walzenlage'') – the choice of rotors and the order in which they are fitted. * Ring settings (''Ringstellung'') – the position of each alphabet ring relative to its rotor wiring. * Plug connections (''Steckerverbindungen'') – the pairs of letters in the plugboard that are connected together. * In very late versions, the wiring of the reconfigurable reflector. * Starting position of the rotors (''Grundstellung'') – chosen by the operator, should be different for each message. For a message to be correctly encrypted and decrypted, both sender and receiver had to configure their Enigma in the same way; rotor selection and order, ring positions, plugboard connections and starting rotor positions must be identical. Except for the starting positions, these settings were established beforehand, distributed in key lists and changed daily. For example, the settings for the 18th day of the month in the German Luftwaffe Enigma key list number 649 (see image) were as follows: * Wheel order: IV, II, V * Ring settings: 15, 23, 26 * Plugboard connections: EJ OY IV AQ KW FX MT PS LU BD * Reconfigurable reflector wiring: IU AS DV GL FT OX EZ CH MR KN BQ PW * Indicator groups: lsa zbw vcj rxn Enigma was designed to be secure even if the rotor wiring was known to an opponent, although in practice considerable effort protected the wiring configuration. If the wiring is secret, the total number of possible configurations has been calculated to be around {{val|3e114}} (approximately 380 bits); with known wiring and other operational constraints, this is reduced to around {{val|e=23}} (76 bits).<ref name="engima_cryptographic_mathematics">{{cite journal |last1=Miller |first1=A. Ray |title=The cryptographic mathematics of Enigma |journal=Cryptologia |date=January 1995 |volume=19 |issue=1 |pages=65–80 |doi=10.1080/0161-119591883773 |url=https://www.tandfonline.com/doi/abs/10.1080/0161-119591883773|url-access=subscription }}</ref> Because of the large number of possibilities, users of Enigma were confident of its security; it was not then feasible for an adversary to even begin to try a [[brute-force attack]]. === Indicator === {{See also|Cryptanalysis#Indicator}} Most of the key was kept constant for a set time period, typically a day. A different initial rotor position was used for each message, a concept similar to an [[Initialization vector|initialisation vector]] in modern cryptography. The reason is that encrypting many messages with identical or near-identical settings (termed in cryptanalysis as being ''in [[Cryptanalysis#Depth|depth]]''), would enable an attack using a statistical procedure such as [[William F. Friedman|Friedman's]] [[Index of coincidence]].<ref>{{cite book|last=Friedman| first=W.F.|author-link=William F. Friedman|title=The index of coincidence and its applications in cryptology|series=Department of Ciphers. Publ 22|publisher=Riverbank Laboratories|location=Geneva, Illinois, USA|oclc=55786052|year=1922}}</ref> The starting position for the rotors was transmitted just before the ciphertext, usually after having been enciphered. The exact method used was termed the ''indicator procedure''. Design weakness and operator sloppiness in these indicator procedures were two of the main weaknesses that made cracking Enigma possible. [[File:Enigma-rotor-windows.jpg|left|thumb|With the inner lid down, the Enigma was ready for use. The finger wheels of the rotors protruded through the lid, allowing the operator to set the rotors, and their current position, here ''RDKP'', was visible to the operator through a set of windows.]] One of the earliest ''indicator procedures'' for the Enigma was cryptographically flawed and allowed Polish cryptanalysts to make the initial breaks into the plugboard Enigma. The procedure had the operator set his machine in accordance with the secret settings that all operators on the net shared. The settings included an initial position for the rotors (the ''Grundstellung''), say, ''AOH''. The operator turned his rotors until ''AOH'' was visible through the rotor windows. At that point, the operator chose his own arbitrary starting position for the message he would send. An operator might select ''EIN'', and that became the ''message setting'' for that encryption session. The operator then typed ''EIN'' into the machine twice, this producing the encrypted indicator, for example ''XHTLOA''. This was then transmitted, at which point the operator would turn the rotors to his message settings, ''EIN'' in this example, and then type the plaintext of the message. At the receiving end, the operator set the machine to the initial settings (''AOH'') and typed in the first six letters of the message (''XHTLOA''). In this example, ''EINEIN'' emerged on the lamps, so the operator would learn the ''message setting'' that the sender used to encrypt this message. The receiving operator would set his rotors to ''EIN'', type in the rest of the ciphertext, and get the deciphered message. This indicator scheme had two weaknesses. First, the use of a global initial position (''Grundstellung'') meant all message keys used the same polyalphabetic substitution. In later indicator procedures, the operator selected his initial position for encrypting the indicator and sent that initial position in the clear. The second problem was the repetition of the indicator, which was a serious security flaw. The message setting was encoded twice, resulting in a relation between first and fourth, second and fifth, and third and sixth character. These security flaws enabled the Polish Cipher Bureau to break into the pre-war Enigma system as early as 1932. The early indicator procedure was subsequently described by German cryptanalysts as the "faulty indicator technique".{{sfn|Huttenhain|Fricke|1945|pp=4,5}} During World War II, codebooks were only used each day to set up the rotors, their ring settings and the plugboard. For each message, the operator selected a random start position, let's say ''WZA'', and a random message key, perhaps ''SXT''. He moved the rotors to the ''WZA'' start position and encoded the message key ''SXT''. Assume the result was ''UHL''. He then set up the message key, ''SXT'', as the start position and encrypted the message. Next, he transmitted the start position, ''WZA'', the encoded message key, ''UHL'', and then the ciphertext. The receiver set up the start position according to the first trigram, ''WZA'', and decoded the second trigram, ''UHL'', to obtain the ''SXT'' message setting. Next, he used this ''SXT'' message setting as the start position to decrypt the message. This way, each ground setting was different and the new procedure avoided the security flaw of double encoded message settings.<ref>Rijmenants, Dirk; [https://www.ciphermachinesandcryptology.com/en/enigmaproc.htm Enigma message procedures] Cipher Machines & Cryptology</ref> This procedure was used by ''Heer'' and ''Luftwaffe'' only. The ''Kriegsmarine'' procedures for sending messages with the Enigma were far more complex and elaborate. Prior to encryption the message was encoded using the ''[[Kurzsignale|Kurzsignalheft]]'' code book. The ''Kurzsignalheft'' contained tables to convert sentences into four-letter groups. A great many choices were included, for example, logistic matters such as refuelling and rendezvous with supply ships, positions and grid lists, harbour names, countries, weapons, weather conditions, enemy positions and ships, date and time tables. Another codebook contained the ''[[Discriminant Book|Kenngruppen]]'' and ''Spruchschlüssel'': the key identification and message key.<ref>Rijmenants, Dirk; [https://www.ciphermachinesandcryptology.com/en/kurzsignale.htm Kurzsignalen on German U-boats] Cipher Machines & Cryptology</ref> === Additional details === The Army Enigma machine used only the 26 alphabet characters. Punctuation was replaced with rare character combinations. A space was omitted or replaced with an X. The X was generally used as full-stop. Some punctuation marks were different in other parts of the armed forces. The ''Wehrmacht'' replaced a comma with ZZ and the question mark with FRAGE or FRAQ. The ''Kriegsmarine'' replaced the comma with Y and the question mark with UD. The combination CH, as in "''Acht''" (eight) or "''Richtung''" (direction), was replaced with Q (AQT, RIQTUNG). Two, three and four zeros were replaced with CENTA, MILLE and MYRIA. The ''Wehrmacht'' and the ''Luftwaffe'' transmitted messages in groups of five characters and counted the letters. The ''Kriegsmarine'' used four-character groups and counted those groups. Frequently used names or words were varied as much as possible. Words like ''Minensuchboot'' (minesweeper) could be written as MINENSUCHBOOT, MINBOOT or MMMBOOT. To make cryptanalysis harder, messages were limited to 250 characters. Longer messages were divided into several parts, each using a different message key.<ref>{{cite web|url=http://www.codesandciphers.org.uk/documents/egenproc/eniggnix.htm|title=The translated 1940 ''Enigma General Procedure''|publisher=codesandciphers.org.uk|access-date=16 October 2006}}</ref><ref>{{cite web|url=http://www.codesandciphers.org.uk/documents/officer/officerx.htm|title=The translated 1940 ''Enigma Officer and Staff Procedure''|publisher=codesandciphers.org.uk|access-date=16 October 2006}}</ref>{{Clear}} === Example enciphering process === The character substitutions by the Enigma machine as a whole can be expressed as a string of letters with each position occupied by the character that will replace the character at the corresponding position in the alphabet. For example, a given machine configuration that enciphered A to L, B to U, C to S, ..., and Z to J could be represented compactly as LUSHQOXDMZNAIKFREPCYBWVGTJ and the enciphering of a particular character by that configuration could be represented by highlighting the enciphered character as in D > LUS(H)QOXDMZNAIKFREPCYBWVGTJ Since the operation of an Enigma machine enciphering a message is a series of such configurations, each associated with a single character being enciphered, a sequence of such representations can be used to represent the operation of the machine as it enciphers a message. For example, the process of enciphering the first sentence of the main body of the famous "Dönitz message"<ref>{{cite web|url=https://www.cryptomuseum.com/crypto/enigma/msg/p1030681.htm|title=Message from Dönitz — 1 May 1945|access-date=27 November 2018}}</ref> to RBBF PMHP HGCZ XTDY GAHG UFXG EWKB LKGJ can be represented as 0001 F > KGWNT(R)BLQPAHYDVJIFXEZOCSMU CDTK 25 15 16 26 0002 O > UORYTQSLWXZHNM(B)VFCGEAPIJDK CDTL 25 15 16 01 0003 L > HLNRSKJAMGF(B)ICUQPDEYOZXWTV CDTM 25 15 16 02 0004 G > KPTXIG(F)MESAUHYQBOVJCLRZDNW CDUN 25 15 17 03 0005 E > XDYB(P)WOSMUZRIQGENLHVJTFACK CDUO 25 15 17 04 0006 N > DLIAJUOVCEXBN(M)GQPWZYFHRKTS CDUP 25 15 17 05 0007 D > LUS(H)QOXDMZNAIKFREPCYBWVGTJ CDUQ 25 15 17 06 0008 E > JKGO(P)TCIHABRNMDEYLZFXWVUQS CDUR 25 15 17 07 0009 S > GCBUZRASYXVMLPQNOF(H)WDKTJIE CDUS 25 15 17 08 0010 I > XPJUOWIY(G)CVRTQEBNLZMDKFAHS CDUT 25 15 17 09 0011 S > DISAUYOMBPNTHKGJRQ(C)LEZXWFV CDUU 25 15 17 10 0012 T > FJLVQAKXNBGCPIRMEOY(Z)WDUHST CDUV 25 15 17 11 0013 S > KTJUQONPZCAMLGFHEW(X)BDYRSVI CDUW 25 15 17 12 0014 O > ZQXUVGFNWRLKPH(T)MBJYODEICSA CDUX 25 15 17 13 0015 F > XJWFR(D)ZSQBLKTVPOIEHMYNCAUG CDUY 25 15 17 14 0016 O > FSKTJARXPECNUL(Y)IZGBDMWVHOQ CDUZ 25 15 17 15 0017 R > CEAKBMRYUVDNFLTXW(G)ZOIJQPHS CDVA 25 15 18 16 0018 T > TLJRVQHGUCXBZYSWFDO(A)IEPKNM CDVB 25 15 18 17 0019 B > Y(H)LPGTEBKWICSVUDRQMFONJZAX CDVC 25 15 18 18 0020 E > KRUL(G)JEWNFADVIPOYBXZCMHSQT CDVD 25 15 18 19 0021 K > RCBPQMVZXY(U)OFSLDEANWKGTIJH CDVE 25 15 18 20 0022 A > (F)CBJQAWTVDYNXLUSEZPHOIGMKR CDVF 25 15 18 21 0023 N > VFTQSBPORUZWY(X)HGDIECJALNMK CDVG 25 15 18 22 0024 N > JSRHFENDUAZYQ(G)XTMCBPIWVOLK CDVH 25 15 18 23 0025 T > RCBUTXVZJINQPKWMLAY(E)DGOFSH CDVI 25 15 18 24 0026 Z > URFXNCMYLVPIGESKTBOQAJZDH(W) CDVJ 25 15 18 25 0027 U > JIOZFEWMBAUSHPCNRQLV(K)TGYXD CDVK 25 15 18 26 0028 G > ZGVRKO(B)XLNEIWJFUSDQYPCMHTA CDVL 25 15 18 01 0029 E > RMJV(L)YQZKCIEBONUGAWXPDSTFH CDVM 25 15 18 02 0030 B > G(K)QRFEANZPBMLHVJCDUXSOYTWI CDWN 25 15 19 03 0031 E > YMZT(G)VEKQOHPBSJLIUNDRFXWAC CDWO 25 15 19 04 0032 N > PDSBTIUQFNOVW(J)KAHZCEGLMYXR CDWP 25 15 19 05 where the letters following each mapping are the letters that appear at the windows at that stage (the only state changes visible to the operator) and the numbers show the underlying physical position of each rotor. The character mappings for a given configuration of the machine are in turn the result of a series of such mappings applied by each pass through a component of the machine: the enciphering of a character resulting from the application of a given component's mapping serves as the input to the mapping of the subsequent component. For example, the 4th step in the enciphering above can be expanded to show each of these stages using the same representation of mappings and highlighting for the enciphered character: <nowiki> G > ABCDEF(G)HIJKLMNOPQRSTUVWXYZ P EFMQAB(G)UINKXCJORDPZTHWVLYS AE.BF.CM.DQ.HU.JN.LX.PR.SZ.VW 1 OFRJVM(A)ZHQNBXPYKCULGSWETDI N 03 VIII 2 (N)UKCHVSMDGTZQFYEWPIALOXRJB U 17 VI 3 XJMIYVCARQOWH(L)NDSUFKGBEPZT D 15 V 4 QUNGALXEPKZ(Y)RDSOFTVCMBIHWJ C 25 β R RDOBJNTKVEHMLFCWZAXGYIPS(U)Q c 4 EVTNHQDXWZJFUCPIAMOR(B)SYGLK β 3 H(V)GPWSUMDBTNCOKXJIQZRFLAEY V 2 TZDIPNJESYCUHAVRMXGKB(F)QWOL VI 1 GLQYW(B)TIZDPSFKANJCUXREVMOH VIII P E(F)MQABGUINKXCJORDPZTHWVLYS AE.BF.CM.DQ.HU.JN.LX.PR.SZ.VW F < KPTXIG(F)MESAUHYQBOVJCLRZDNW</nowiki> Here the enciphering begins trivially with the first "mapping" representing the keyboard (which has no effect), followed by the plugboard, configured as AE.BF.CM.DQ.HU.JN.LX.PR.SZ.VW which has no effect on 'G', followed by the VIII rotor in the 03 position, which maps G to A, then the VI rotor in the 17 position, which maps A to N, ..., and finally the plugboard again, which maps B to F, producing the overall mapping indicated at the final step: G to F. This model has 4 rotors (lines 1 through 4) and the reflector (line R) also permutes (garbles) letters.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)