the engima cipher

36
The Engima Cipher Dr. Vicki Schell Pensacola Junior College [email protected] 9 September 2008

Upload: guestfaf89d

Post on 15-May-2015

1.257 views

Category:

Education


7 download

DESCRIPTION

Presentation at University of West Florida's "lunch 'n learn" series, 8 September 2008

TRANSCRIPT

Page 1: The Engima Cipher

The Engima Cipher

Dr. Vicki SchellPensacola Junior College

[email protected] September 2008

Page 2: The Engima Cipher

Qm gajkd bck afevbhkj, axvi afevbhd hqvv pbok gajkd.

If codes are outlawed, only outlaws will have codes.

Page 3: The Engima Cipher

Taxonomy of Cryptology

Page 4: The Engima Cipher

ACTIVITY #1:

How many possible keys are there when you swap each letter of the alphabet with

another letter?

26*25*24*23*22*21*20*19*18*17*16*15*14*13812*11*10*9*8*7*6*5*4*3*2*1

=26!

= 400 000 000 000 000 000 000 000 000

Page 5: The Engima Cipher

400 septillion keys

6.5 billion people in the world

31 million seconds in a year

If everyone in the world checked one key per second, it would still take 2

billion years to check them all!

Page 6: The Engima Cipher

Code Breaking Tips

•Common letters•One letter words•Common words•Double letters

•Clues

Page 7: The Engima Cipher

The Enigma MachineAn Enigma cipher machine consisted

of five variable components:• a plugboard which could contain

from 0 to 13 dual-wired cables • 3 ordered rotors which wired 26

input contact points to twenty-six output contact points positioned on alternate faces of a disc

• 26 serrations around the periphery of the rotors, which allowed the operator to specify an initial rotational position for the rotors

• a moveable ring on each of the rotors, which controlled the rotational behavior of the rotor immediately to the left by means of a notch

• a reflector half-rotor (which did not in fact rotate) to fold inputs and outputs back onto the same face of contact points

Page 8: The Engima Cipher

The Plugboard• On the front of the

machine was a section called the "plugboard".

• The Enigma machine had several cables with a plug at each end that could be used to plug pairs of letters together.

• If A were plugged to B then, on typing the letter A, the electric current would follow the path that was normally associated with the letter B, and vice versa.

• Enigma machines had 10 cables with which to link up pairs of letters.

Page 9: The Engima Cipher

• Activity: How many ways are there to link up pairs of letters on this simplified plugboard?

• 5*3*1= 15 ways

Simplified Plugboard

Page 10: The Engima Cipher

The Plugboard

Activity: How many ways are there to link up pairs of letters on

the Enigma machine? [10 cables]

26*24*22*20*18*16*14*12*10*8 1 000 000 000 000

Page 11: The Engima Cipher

Rotor Cipher Machines

• First rotor machine built in 1915 by two Dutch naval officers, van Hengel and Spengler

• Number of inventors independently developed similar rotor machines

• Most of the rotor machines used a typewriter-like keyboard for input and lighted letters for the output. Some of the later devices used punch card and paper tape for input and/or output

Page 12: The Engima Cipher

The Rotors• First rotor rotates

each time a character is input.

• The second rotor rotates once each time the first rotor makes one full turn.

• The third rotor rotates once each time the second rotor has rotated completely.

Page 13: The Engima Cipher

The Rotors

Setup:1. Select left/center/right rotors2. Position initial wheel positions by

sliding the indicated window letter up to the first row.

Page 14: The Engima Cipher

The Rotors

Operation:1. If the notch appears in the

window row, shift that rotor and the rotor to the left up one row [the Right Rotor is always shifted up one row before each letter is encoded/decoded]

Page 15: The Engima Cipher

The Rotors: Operations

2. Select letter to encode/decode in the Input column.

3. Read adjacent letter, X, in the right hand column of the Right Rotor; select the letter X in the left hand column of the Rotor.

Page 16: The Engima Cipher

The Rotors: Operations

4. Repeat for Center Rotor.

5. Repeat for Left Rotor.

6. Read the adjacent letter, R, in the Reflector; select the other letter R in the Reflector.

Page 17: The Engima Cipher

The Rotors: Operations

7. Read adjacent letter, Y, in the left hand column of the Left Rotor; select the letter Y in the right hand column of the Rotor.

8. Repeat for Center Rotor.

9. Repeat for Right Rotor.

Page 18: The Engima Cipher

The Rotors: Operations

10.Write down the adjacent letter, Z, in the output column.

Repeat for each letter of the message!!!!

Page 19: The Engima Cipher

The Rotors: Example

Initial setting: – I-II-III: MCK– Letter E encodes to Q

Sample Message: QMJIDO MZWZJFJR

Page 20: The Engima Cipher

Settings of the Daily Keys

• Order of the 3 rotors inside the machine– 6 combinations

• Plugboard connections– 1 x 1012 combinations

• Initial positions of the rotors– 263 = 17,576 combinations

• Positions of rings that determined reflecting postions of 2 rotors– 262 = 676 combinations

= 6 x [1 x 1012 ] x 263 x 262 7 x 10 20 combinations= 70,000,000,000,000,000,000

Page 21: The Engima Cipher

Bletchley House

During World War II, codebreakers at Bletchley Park solved messages from a large number of Axis code and cipher systems, including the German Enigma machine. For this purpose, the Bletchley Park mansion was soon joined by a host of other buildings. The mansion's facade is an idiosyncratic mix of architectural

styles.

Page 22: The Engima Cipher

Bletchley House• *Hut 1 — the first hut, built in

1939• Hut 3 — intelligence:

translation & analysis of Army & Air Force Enigma decrypts

• *Hut 4 — Naval intelligence: analysis of Naval Enigma decrypts

• Hut 6 — Cryptanalysis of Army & Air Force Enigma

• Hut 8 — Cryptanalysis Naval Enigma

• Hut 10 — Meteorological section

• Hut 11 — The first Bombe building     

• Hut 14 — main teleprinter building

Page 23: The Engima Cipher

The Weaknesses of the German Enigma

If used properly it was unbreakable BUT the Germans made mistakes:

I. Procedural errors •Forgot to change key settings •Sent the same message twice •Used non random message keys like AAA or ASD •On key sheets put the same wheel in the same position two days running

II. Key security Sent out sets of key sheets for many months ahead into vulnerable positions like weather ships.

III. Cribs Used standard message formats too often thus allowing parts of messages to be guessed. ie Cribs to be found.

Page 24: The Engima Cipher

The Decryption Process at Bletchley Park

• The German signal officer transmits a Enigma-encrypted message using Morse signals.

• A couple of German soldiers on the battlefield is receive the message and decrypt it by typing in the message on an Enigma machine.

• The German radio signals are intercepted at secret Interceptstations (Y-stations) and send by motorbike courier (or later by teleprinter) to Bletchley Park (Station X).

Page 25: The Engima Cipher

The Decryption Process at Bletchley Park

• Since it is an Army message, the message is delivered to Hut 6, where the hard decryption work is being performed. Cribs are being looked for (Cryptanalysis).

• Cribs are being tested on the bombs in Hut 11 and results are returned to Hut 6.

• The raw decrypts are passed on to Hut 3, where the Intelligence people are translating it and evaluating it, and bringing it into a form suitable for the authorities.

Page 26: The Engima Cipher

Rodding & Cribs• Suppose that we have the crib: WETTERVORHERSAGEBISKAYA

• and the following piece of text encrypted:

QFZWRWIVTYRESXBFOGKUHQBAISEZ

Page 27: The Engima Cipher

Rodding & Cribs

• Set of 26 rods, made up of individual rows of a rod-square table

• 3 sets needed, one for each of the 3 rotors; color coded

• The importance of Rodding was that, providing a Crib could be found for an intercepted Enigma cipher text, the right hand wheel could be determined and its start position found. Once that was done the middle and left hand wheels were relatively easily found.

Page 28: The Engima Cipher

Rodding & Cribs

• begin the search superimposing the two fragments of text and checking all pairs of letters formed:

WETTERVORHERSAGEBISKAYA

QFZWRWIVTYRESXBFOGKUHQBAISEZThis configuration is not correct

because the S is encrypted with itself, moving the proceeds of a crib position

Page 29: The Engima Cipher

Rodding & Cribs

QFZWRWIVTYRESXBFOGKUHQBAISEZ

WETTERVORHERSAGEBISKAYA

 So we slide the crib along the ciphertext by

one character and again check the correspondences.

We again see that the crib is still in the wrong position because a V and E appear in both the crib and the ciphertext in the same position.

Page 30: The Engima Cipher

Rodding & Cribs

QFZWRWIVTYRESXBFOGKUHQBAISEZ

WETTERVORHERSAGEBISKAYA

• Here we at last see how the crib can be matched to a sequence of cipher text, so there is the possibility that RWIVTYRESXBFOGKUHQBAISE

is the encryption of • WETTERVORHERSAGEBISKAYA

Page 31: The Engima Cipher

QFZWRWIVTYRESXBFOGKUHQBAISEZ

WETTERVORHERSAGEBISKAYA

12345 6 …• If the crib is correctly matched with the ciphertext, we

know that – some setting of the Enigma will encode R as W and W as

R in a particular position which we will call position 1– the Enigma rotor(s) step and then in the next position,

which we call position 2, it will encode W as E and E as W,

– then the rotor(s) step and then in the next position which we call position 3, it will encode I as T and T as I,

– and so on.

Page 32: The Engima Cipher

The Bombe

• The bomb was a machine capable to seek the proper combination of rotors between all possible combinations.

• It weighed a ton , divided into three batteries, each containing twelve columns of three drums each.

• Each drum represented a rotor, and then every three a whole machine enigma.

• The top row of drums each battery revolved at a speed of 120 rpm

• The Sound of the Turing Bombe

Page 33: The Engima Cipher

The Bombe• Sometimes messages began with the same

words, such as a weather report. This gave clues (called a CRIB) about how the rest of the message had been encoded.

• When the code-breakers eventually worked out what the CRIB letters might be, they tested them on the machine

• Bombes were huge, noisy electro-mechanical machines which could check through combinations of letters far quicker than a human being could.

• When the Bombe stopped, this meant that the code-breakers' guesses were right.

Page 34: The Engima Cipher

How to Speak Crypto

•A cipher or cryptosystem is used to encrypt the plaintext

•The result of encryption is cipher text•We decrypt cipher text to recover plaintext•A key is used to configure a cryptosystem

Page 35: The Engima Cipher

How to Speak Crypto

Code: whole words or phrases replaced by a letter or number

Cipher: Individual letters are replaced with other letters or symbols

Plaintext: normal English

Ciphertext: coded English

Cryptology: the art and science of making and breaking “secret codes”

Crytography: making “secret codes”

Cryptanalysis: breaking ‘secret codes”

Page 36: The Engima Cipher

http://www.bletchleypark.org/

Thanks to Mike Koss for permission to use his paper Engima machine

Simon Singh.  The Code Book - The Science of Secrecy from Ancient Egypt to Quantum

Cryptography.

ENGIMADirector: Michael Apted. Actors: Dougray Scott, Kate Winslet, Saffron Borrows, Jeremy Northam, Nikolaj Coster-Waldau.