Showing posts with label Enigma Machine. Show all posts
Showing posts with label Enigma Machine. Show all posts

June 4, 2013

Secret Services & Cracking Enigma: The Bombe

"In the years that followed the First World War, the British cryptanalysts in Room 40 continued to monitor German communications. In 1926 they began to intercept messages that baffled them completely. Enigma had arrived, and as the number of Enigma machines increased, Room 40’s ability to gather intelligence diminished rapidly.[...]The speed with which the Allied cryptanalysts abandoned hope of breaking Enigma was in sharp contrast to their perseverance just a decade earlier in the First World War.[...]One nation, however, could not afford to relax. After the First World War, Poland reestablished itself as an independent state, but it was concerned about threats to its newfound sovereignty. To the east lay Russia,[...] and to the west lay Germany[...]Sandwiched between these two enemies, the Poles were desperate for intelligence information, and they formed a new cipher bureau, the Biuro Szyfrów. If necessity is the mother of invention, then perhaps adversity is the mother of cryptanalysis."

[The Code Book, Simon Singh]

The whole process started indeed in Polland in the Biuro Szyfrówwhere the disappointed German Hans-Thilo Schmidt, a public dependent of the Chiffrierstelle, brought the papers in which was represented the general structure of the Enigma machine and thanks to a machine intercepted in the Polish mail (They then bought a commercial Enigma machine and used the gathered information to convert it into a military one)
This was actually a great step since, before these info, they only had mathematical analysis data, which, let's be honest here, were more or less useless without the machine. But even in this case "The strength of the cipher depends not on keeping the machine secret, but on keeping the initial setting of the machine (the key) secret"...an expedient that by itself was capable to lay approximately 1.58 x 10^20 possible keys between the Allies and the solution...a result which was more or less impossible to reach in useful time...
This was true untill the matematician Marian Rejewski found a leak in the comunication system: the repetition. The German infact used to comunicate with the daily key the message one (3 letters, one for each rotor) twice (for a total of 6)...Rejewski tabulated the relationships between the first and fourth characters as follows:

   ABCDEFGHIJKLMNOPQRSTUVWXYZ
      O                                   L                K
Given enough messages intercepted in one day, he could complete this table, giving him something like:

   ABCDEFGHIJKLMNOPQRSTUVWXYZ
   FOXPVBUNWYACRIZELDTQGJMKHS

I know that it seems to be leading nowhere, but Rejewski kept playing at it and discovered a property which was going to overturn their work.
He noticed that "A" in the top row was related to "F" in the bottom. He went to "F" in the top row and saw that it was related to "B" in the bottom. He went to "B" in the top row and saw that it was related to "O" in the bottom. He continued this search until he ended up with the "A" in the top row again, and then repeated this game through the rest of the table until there were no more characters left. The example above gives:

   A -> F -> B -> O -> Z -> S -> T -> Q -> L -> C -> X -> K -> A
   D -> P -> E -> V -> J -> Y -> H -> N -> I -> W -> M -> R -> D
   G -> U -> G

Rejewski did the same operationd with different sets of messages sent on different days, and noticed that the pattern of the number of chains and the number of links in the chains varied widely from day to day and he cleverly realized that this pattern provided a fingerprint characteristic of the initial rotor setup. The important thing about it is that it dependeds only on the number of chains and on the number of links in the chains; the exact characters in the chains were irrelevant.


Example of fingerprints structure
  1 chain with 10 characters
  2 chains with 5 characters
  1 chain with 6 characters      rotor order ACB rotor                                 position XHJ

  1 chain with 13 characters
  1 chain with 5 characters
  2 chains with 4 characters     rotor order BAC rotor                                 position FCD

Once the catalog containing all fingerprints was finished, the Poles could then identify the right key and decode all intercepted messages sent during the day, and start over again the day after knowing that most of the work was already done...at least until the Germans altered their usual way of transmitting messages, but Rejewski fought back. Even if his old fingerprints catalog was useles,but instead of rewriting it, he devised a mechanized version of it, which could automatically search for the correct scrambler settings. Rejewski’s invention was an adaptation of the Enigma machine, able to rapidly check each of the 17,576 settings until it spotted a match. Because of the six possible scrambler arrangements, it was necessary to have six of Rejewski’s machines working in parallel, each one representing one of the possible arrangements. Together, they formed a unit that was about three feet high, capable of finding the day key in roughly two hours. The units were called bombes, a name that might reflect the ticking noise they made while checking scrambler settings.

Bomba kryptologiczna  drawing 
from M.Rejewski’s papers

"The bombes effectively mechanized the process of decipherment. It was a natural response to Enigma, which was a mechanization of encipherment"

If you feel like you've missed something go on and check the previous posts related to this one, which are Secret Services & Patents: The Enigma Machine and Technology & The Enigma Machine
If you wanna dig deeper,you can satisfy your thirst for knowledge, you can click on the word links  or on the links of my sources.


Continues...

Sources:
The Code Book, Simon Singh
http://www.bletchleypark.org.uk/content/machines.rhtm
http://www.vectorsite.net/ttcode_08.html#m1
http://en.wikipedia.org/wiki/Bombe
http://en.wikipedia.org/wiki/Cryptanalysis_of_the_Enigma




May 31, 2013

Technology & The Enigma Machine

The Enigma machine is actually one of the best thing I ever seen in my life... I know now is just an antique, but at the time it was one of the most incredible devices ever builted for its complexity, the extreme safeness of its encrypted messages and its handiness.
Exploded structure of a rotor
Let's dig a little bit deeper into this machine: the principal compontents of the first machine presented by Arthur Scherbious consisted of  a keyboard, a plugboard, 3/4 rotors, a reflector and a lamp display pannel.
The machine workedpretty much in the following way: the operator press a character in the typewriter starting an electric impulse that is going to follow a certain pattern which is swapped when it passes into the plugbloard, then it goes trough the rotors, come back thanks to the reflector and it light a lamp wich corresponds to a certain letter (result). Explained in that way it may looks that it is an easy code to break, but there is a lot more going on in that machine... in fact the rotors are not fixed in that position, but they change at each pression like the odometer does, meaning that the first rotors moves each   time, meanwhile the second one makes a step only after the first one has done an entire cycle, and the third one does the same with respect to the second one, moreover the plugboard disposition could have been changed and the first position of the rotors choosed freely. To sum up with all those basilar elements the machine already disposed of a number of possible combinations way big to be discovered in useful time.

Schematic representation of the classic enigma operation

And that it was just the classical machine, if we also consider the additional complexity given by the appendix devoloped later in time (which you can find in the previous post Secret Services & Patents: The Enigma Machine)  the number of possible combinations increases exponentially..

Here you can find other information about what was new in each evolution of the machine:
And in this one a programme that simulates the operation


And now a little bit of humor...



The argument of this post is related to the one contained in Secret Services & Patents: The Enigma Machine

Sources:
[The Code BookSimon Sing];
http://ciphermachines.com/enigma;
http://en.wikipedia.org/wiki/Enigma_machine;
http://www.bletchleypark.org.uk/content/machines.rhtm;
http://www.codesandciphers.org.uk/enigma/;






May 30, 2013

Entire Collection of Chipher and Other

As it is well known secret services are a very well diffused practise, especially useful during war, or more generally in periods of international tension.. In the link below you can find an interesting collection of photos of devices used by various agencies in the world during the 20th century, such as chiper machines, spy equipement, radio, telegraph machines etc...

http://ciphermachines.com/photos/index.php




The argument of this post is related to the ones contained in Secret Services & Spy SetsSecret Services & Patents: The Enigma Machine, Secret Services & The Enigma Machine, Secret Services & RadioSecret Services & Cracking Enigma: The BombeSecret Services & Bombe 2.0Telegraph & Morse CodeMinicameras 2.0 and in Minicameras...micro optics at the service of the spies

May 29, 2013

Secret Services & Patents: The Enigma Machine

The patent I chose to represent my blog is the one about the Enigma Machine, because in the field of Cryptography is the first form of mechanization of this long process of encrypting messages, for its internal complexity, involving both mechanical and electronic circuits, that makes it a real artwork. The images below are taken from the first Enigma-related Patent, the one presented by Arthur Scherbius the 23 February 1918 and released the 8 July 1925.






 Later in time other patents were filed, most of them proposing implementations to the original machine: for example the possibility to use tubes fulfilled with water instead of electric wires, or to change the letter circuit with a multi-switches pannel (number of possible swaps incresing in time from 6 to 10), to remove rotors and  trade their places (UKW), to add a ring that make the rotor, on which it is applied, to do an additional movement after a key-press....

There are also two evolutions of the machine: the Enigma A and the Zahlwerk Enigma (or Enigma G), respectively filed on March, 26th, 1924 and on November, 9th, 1928. There were more developpements of the machine depending on the branch of the German army in which it was used.





Following: a family tree of the Enigma evolution created by Paul Reuvers & Frode Weierud (second link between sources for further informations) and here on the right the legend to better understand how it has been organized by the autors.
Enjoy...








Continues....

Sources:
http://www.cryptomuseum.com/crypto/enigma/patents/
http://www.cryptomuseum.com/crypto/enigma/tree.htm