Cristina Nita-Rotaru. CS355: Cryptography. Lecture 4: Enigma.

Similar documents
Cryptography CS 555. Topic 2: Evolution of Classical Cryptography CS555. Topic 2 1

Ciphers: Making and Breaking

Facts & Myths of Enigma

NOI 2009 Solutions to Contest Tasks

Algebra for Cryptology

1999 version 2001 simplified version

Cryptography. Lecture 2: Perfect Secrecy and its Limitations. Gil Segev

The Turing Bombe and its Role in Breaking Enigma

COS433/Math 473: Cryptography. Mark Zhandry Princeton University Spring 2017

Specialized Cryptanalytic Machines: Two examples, 60 years apart. Patrick Schaumont ECE Department Virginia Tech

Cryptography. The Making and Breaking of Secret Codes. 5/29/2009 John C. Polking, Rice University 1

19 Lorenz Cipher Machine

Cryptography A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering. Apr Cryptography Slide 1

Cryptography A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering. Apr Cryptography Slide 1

Chapter 2 Classical Cryptosystems

Efficient Cryptanalysis of Homophonic Substitution Ciphers

Historical cryptography. cryptography encryption main applications: military and diplomacy

Number Theory in Cryptography

Cryptography. P. Danziger. Transmit...Bob...

Shift Cipher. For 0 i 25, the ith plaintext character is. E.g. k = 3

Lecture Notes. Advanced Discrete Structures COT S

Introduction to Cryptology. Lecture 2

CPSC 467b: Cryptography and Computer Security

1/18 2/16 3/20 4/17 5/6 6/9 7/14 % Please do not write in the spaces above.

Introduction to Cryptographic Engineering. Steven M. Bellovin

CSA E0 235: Cryptography March 16, (Extra) Lecture 3

Historical cryptography

The Vigenère cipher is a stronger version of the Caesar cipher The encryption key is a word/sentence/random text ( and )

Lecture 12: Block ciphers

Classical Cryptography

Cryptography and Number Theory

MODULAR ARITHMETIC. Suppose I told you it was 10:00 a.m. What time is it 6 hours from now?

monoalphabetic cryptanalysis Character Frequencies (English) Security in Computing Common English Digrams and Trigrams Chapter 2

Clock Arithmetic and Euclid s Algorithm

1 Indistinguishability for multiple encryptions

Pre- Calculus CP 1 Section 8.5 Matrix Application: Cryptography

Computer Security. 07. Cryptography. Paul Krzyzanowski. Rutgers University. Spring 2018

6.080/6.089 GITCS April 8, Lecture 15

The Hill Cipher A Linear Algebra Perspective

Attacks on DES , K 2. ) L 3 = R 2 = L 1 f ( R 1, K 2 ) R 4 R 2. f (R 1 = L 1 ) = L 1. ) f ( R 3 , K 4. f (R 3 = L 3

secretsaremadetobefoundoutwithtime UGETGVUCTGOCFGVQDGHQWPFQWVYKVJVKOG Breaking the Code

Menu. Lecture 5: DES Use and Analysis. DES Structure Plaintext Initial Permutation. DES s F. S-Boxes 48 bits Expansion/Permutation

Implementation Tutorial on RSA

CSCI3381-Cryptography

Chapter 2. A Look Back. 2.1 Substitution ciphers

Lecture (04) Classical Encryption Techniques (III)

one approach to improve security was to encrypt multiple letters invented by Charles Wheatstone in 1854, but named after his

My brief introduction to cryptography

Can a Machine Think?

Mathematics: Modeling Our World Unit 2: SECRET CODES SUPPLEMENTAL ACTIVITY THE GOLD BUG S2.1

CRYPTOGRAPHY AND LARGE PRIMES *

Winter 18 CS 485/585. Intro to Cryptography

Winter 17 CS 485/585. Intro to Cryptography

Introduction to Cryptography

Public Key Cryptography

Lecture 4: DES and block ciphers

Solutions for week 1, Cryptography Course - TDA 352/DIT 250

Systems of Equations and Inequalities

Final Exam Math 105: Topics in Mathematics Cryptology, the Science of Secret Writing Rhodes College Tuesday, 30 April :30 11:00 a.m.

Candidates must show on each answer book the type of calculator used. Only calculators permitted under UEA Regulations may be used.

Powers in Modular Arithmetic, and RSA Public Key Cryptography

Cryptanalysis of a data security protection scheme for VoIP

University of Regina Department of Mathematics & Statistics Final Examination (April 21, 2009)

Secrecy and the Quantum

Public-Key Encryption: ElGamal, RSA, Rabin

10 Modular Arithmetic and Cryptography

UNIVERSITY OF CALIFORNIA Santa Barbara. Cryptanalysis of the SIGABA

7 Cryptanalysis. 7.1 Structural Attacks CA642: CRYPTOGRAPHY AND NUMBER THEORY 1

The Web Cryptology Game CODEBREAKERS.EU edition 2015

Computer Security. 07. Cryptography. Paul Krzyzanowski. Rutgers University. Spring 2017

Solution to Midterm Examination

Cryptography 2017 Lecture 2

Cristina Nita-Rotaru. CS355: Cryptography. Lecture 9: Encryption modes. AES

Cryptography. pieces from work by Gordon Royle

RSA ENCRYPTION USING THREE MERSENNE PRIMES

CSE 105 Theory of Computation

An Introduction to Cryptography

CRYPTOGRAPHY AND NUMBER THEORY

CODING AND CRYPTOLOGY III CRYPTOLOGY EXERCISES. The questions with a * are extension questions, and will not be included in the assignment.

Notes 4: Stream ciphers, continued. Recall from the last part the definition of a stream cipher:

Alternative Approaches: Bounded Storage Model

Lecture 9 - Symmetric Encryption

About Vigenere cipher modifications

CPSC 467b: Cryptography and Computer Security

Lecture 1: Introduction to Public key cryptography

Homework 4 for Modular Arithmetic: The RSA Cipher

Sol: First, calculate the number of integers which are relative prime with = (1 1 7 ) (1 1 3 ) = = 2268

Cryptography Lecture 4 Block ciphers, DES, breaking DES

Jay Daigle Occidental College Math 401: Cryptology

17.1 Binary Codes Normal numbers we use are in base 10, which are called decimal numbers. Each digit can be 10 possible numbers: 0, 1, 2, 9.

Simple Math: Cryptography

last name ID 1 c/cmaker/cbreaker 2012 exam version a 6 pages 3 hours 40 marks no electronic devices SHOW ALL WORK

CS 282A/MATH 209A: Foundations of Cryptography Prof. Rafail Ostrosky. Lecture 4

Cryptography and Network Security Prof. D. Mukhopadhyay Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Theory of Computation CS3102 Spring 2014 A tale of computers, math, problem solving, life, love and tragic death

CLASSICAL ENCRYPTION. Mihir Bellare UCSD 1

Classical Cryptography

U.C. Berkeley CS276: Cryptography Luca Trevisan February 5, Notes for Lecture 6

Turing s Treatise on Enigma. Chapter 2. Dr. Alan M. Turing

Week 7 An Application to Cryptography

Transcription:

CS355: Cryptography Lecture 4: Enigma.

Towards cryptographic engines } How to move from pencil and paper to more automatic ways of encrypting and decrypting? } How to design more secure ciphers } Alberti s Disk } Jefferson s Wheel } Enigma 2

Alberti disk - 1467 } Outer is fixed } Insider is mobile 3

Alberti disk } The numbers on outer disks are used to code predetermined passphrases } Encode: on inner disk there is a mark which could be lined up with a letter on the outer disc as a key } Decode: } Need to use a disk with a matching alphabet on the inner ring } Need to know the correct letter to match the mark to rotate the inner disk 4

Jefferson wheel cipher - 1790 } 15 x 4 cm } slice about 5mm across } 26 sections } one letter is assigned randomly to each section. 5

Jefferson cipher } Encode: a fragment of the message appears along one side of the cylinder, the cylinder is then turned and another line is copied out at random } Decode: } Use the cylinder to enter the ciphertext, and then turn the cylinder examining each row until the plaintext is seen. } Same cylinder must be used for both encryption and decryption 6

Rotor machines } Vigenere can be broken once somebody finds the key length } How to have a longer key? } Idea: } Multiple rounds of substitution, encryption consists of mapping a letter many times } Mechanical/electrical wiring to automate the encryption/decryption process } A machine consists of multiple cylinders (rotors) that map letters several times 7

8

Rotor machines } Each rotor has 26 states (as many as the alphabet) } At each state there is a substitution cipher: the wiring between the contacts implements a fixed substitution of letters" } Each cylinder rotates to change states according to a different schedule changing the substitution" } A m-cylinder rotor machine has 26 m different substitution ciphers } 26 3 = 17576 } 26 4 = 456,976 } 26 5 = 11,881,376" } Most famous rotor machine is Enigma" 9

History of the Enigma machine } Patented by Scherius in 1918 } Widely used by the Germans from 1926 to the end of second world war } First successfully broken by Polish in the thirties by exploiting the repetition of the message key and knowledge of the machine design (espionage) } Then broken by the UK intelligence during the WW II 10

Enigma machine trivia } Patented by Scherius in 1918 } Came on the market in 1923, weighted 50 kg (about 110 lbs), later cut down to 12kg (about 26 lbs) } It cost about $30,000 in today s prices } 34 x 28 x 15 cm 11

Enigma machine } Plug board: } 6 pair of letters are swapped } 3 scramblers (motors): } 3 scramblers can be used in any order: } A reflector 12

A rotor rotates 1/6th after each map Second rotor rotates after first had a complete revolution, and so on 13

Food for thought } What s the purpose of the reflector???? } How would you design an Enigma without the reflector (would it be a better (more difficult to break) machine?) } What type of cipher (encryption) does a rotor perform? } What can you say about the result of encrypting the same letter consecutively 14

Enigma machine: Size of key space } Use 3 scramblers (motors): 17576 substitutions } 3 scramblers can be used in any order: 6 combinations } Plug board: allowed 6 pairs of letters to be swapped before the scramblers process started and after it ended. 100, 391, 791, 500 } Total number of keys 10 16 } Later versions of Enigma used 5 rotors and 10 pairs of letters 15

Decryption } Need the encrypted message, and know which rotors were used, the connections on the plug board and the initial settings of the rotors. } Without the knowledge of the state of the machine when the original message was typed in, it is extremely difficult to decode a message. 16

Encrypting with Enigma } Daily key: The settings for the rotors and plug boards changed daily according to a codebook received by all operators } Message key: Each message was encrypted with a unique key defined by the position of the 3 rotors } An encrypted message consists of the message key repeated twice and encrypted with the daily key, then the message encrypted with the message key 17

Using Enigma machine } A day key has the form } Plugboard setting: A/L P/R T/D B/W K/F O/Y } Scrambler arrangement: 2-3-1 } Scrambler starting position: Q-C-W } Sender and receiver set up the machine the same way for each message } Message key: a new scrambler starting position, e.g., PGH 18

Using Enigma machine } Several communication ``networks } Each network had its own codebooks } Different types of enigma machines (rotors, plugboard) (naval could have up to 8 rotors, rotor was not fixed, could have also been configured) 19

Food for thought } What type of cryptography is this? Symmetric or antisymmetric? } Why bother with the rotors when the enormous key space seems to be determined by the plugboard? } What happens if the enemy got a codebook???? 20

How to break the Enigma machine? } Recover 3 secrets } Internal connections for the 3 rotors } Daily keys } Message keys } Exploiting the repetition of message keys } In each ciphertext, letters in positions 1 & 4 are the same letter encrypted under the day key } With 2 months of day keys and Enigma usage instructions, the Polish mathematician Rejewski succeeded to reconstruct the internal wiring 21

How to recover the day key? } Encryption can be mathematically expressed as a product of permutations } Catalog of characteristics } Main idea: separating the effect of the plugboard setting from the starting position of rotors } Determine the rotor positions first } Attacking plugboard is easy } Plugboard does not affect chain lengths in the permutation } Using known plaintext attack } Stereotypical structure of messages } Easy to predict standard reports } Retransmission of messages between multiple networks 22

Lessons learned from breaking Engima } Keeping a machine (i.e., a cipher algorithm) secret does not help } The Kerckhoff s principle } Security through obscurity doesn t work } Large number of keys are not sufficient } Known plaintext attack was easy to mount } Key management was the weakest link } People were also the weakest link } Never underestimate the opponent } Even a strong cipher, when used incorrectly, can be broken 23

Japanese Purple machine } Electromechanical stepping switch machine modeled after Enigma } Used telephone stepping switches instead of rotors } Pearl Harbor attack preparations encoded in Purple, decoded hours before attack 24

Alan Turing (1912-1954) } English mathematician, logician and cryptographer" } Father of modern computer science" } Concept of the algorithm " } } Computation with the Turing machine" Turing test: artificial intelligence: whether it will ever be possible to say that a machine is conscious and can think" } Worked at Bletchley Park, the UK's codebreaking centre; devised techniques for breaking german ciphers" 25

Turing award } Nobel Prize of computing } The most prestigious award in Computer Science } Since 1966 } Some of the winners were cryptographers } 2002 RSA inventors won the Turing award } Most recent winner } Judea Pearl: For fundamental contributions to artificial intelligence through the development of a calculus for probabilistic and causal reasoning 26

Take home lessons } Although the Enigma cipher has cryptographic weaknesses, in practice the codebrakers were able to decipher message because of the combination with " } mistakes by operators" } procedural flaws" } occasional captured machine or codebook " 27