Eric Roberts and Jerry Cain Handout #36 CS 106J May 15, The Enigma Machine

Similar documents
CS408 Cryptography & Internet Security

Breaking the Enigma. Dmitri Gabbasov. June 2, 2015

The Paper Enigma Machine

cryptography, plaintext; ciphertext. key,

Exploring the Enigma [The MATH Connection]

Lecture 8: Cracking the Codes based on Tony Sale s Codes & Ciphers Web Page. History of Computing. Today s Topics. History of Computing Cipher Systems

Enigma. Developed and patented (in 1918) by Arthur Scherbius Many variations on basic design Eventually adopted by Germany

Most people familiar with codes and cryptography have at least heard of the German

The Swiss cipher machine NeMa

1 Introduction 2. 3 Zygalski Sheets Using Zygalski Sheets Programmatic Replication Weaknesses/Problems 7

The Evolution of the Cryptologic Bombe. Chris Christensen Department of Mathematics Northern Kentucky University

Relies on hiding a message by jumbling up individual letters of the message. Sending a whole message with the letters jumbled up using a cipher

An Introduction to Cryptography

LFSR stream cipher RC4. Stream cipher. Stream Cipher

The Weakest Link: The Human Factor Lessons Learned from the German WWII Enigma Cryptosystem

The Weakest Link: The Human Factor Lessons Learned from the German WWII Enigma Cryptosystem

Code-makers & Codebreakers. Substitution ciphers and frequency analysis

Substitution cipher. Contents

PA Substitution Cipher

PART FOUR. Polyalphabetic Substitution Systems PERIODIC POLYALPHABETIC SUBSTITUTION SYSTEMS

Le Sphinx. Controls. 1 sur 5 17/04/ :59. Pocket cipher device

The Weakest Link: The Human Factor Lessons Learned from the German WWII Enigma Cryptosystem

Contents Circuits... 1

The reduced Enigma. Keywords: Education, Enigma, Public Understanding of Cryptography, reduced Enigma

Sherlock Holmes and the adventures of the dancing men

The reduced Enigma. Harold Thimbleby * Gresham Professor of Geometry. Gresham College Barnard s Inn Hall Holborn LONDON, EC1N 2HH

Stream Cipher. Block cipher as stream cipher LFSR stream cipher RC4 General remarks. Stream cipher

Appendix B: Project Literature Review

Stream Ciphers. Debdeep Mukhopadhyay

ENIGMA RELOADED I N T E R N A T I O N A L E V E N T

Foundations of Computing and Communication Lecture 5. The Universal Machine

In total 2 project plans are submitted. Deadline for Plan 1 is on at 23:59. The plan must contain the following information:

Cryptography. The Codebreakers: The Story of Secret Writing. by David Kahn A Bit of History. Seminal Text on Cryptography

UNIT V 8051 Microcontroller based Systems Design

Understanding Cryptography A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl. Chapter 2 Stream Ciphers ver.

VIDEO intypedia001en LESSON 1: HISTORY OF CRYPTOGRAPHY AND ITS EARLY STAGES IN EUROPE. AUTHOR: Arturo Ribagorda Garnacho

Understanding Cryptography A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl. Chapter 2 Stream Ciphers ver.

University of Pennsylvania Department of Electrical and Systems Engineering. Digital Design Laboratory. Lab8 Calculator

PART FIVE. Transposition Systems TYPES OF TRANSPOSITION SYSTEMS

Key- The key k for my cipher is a single number from 1-26 which is shared between the sender and the reciever.

How to Predict the Output of a Hardware Random Number Generator

Baudot code channels

Facts and Myths of Enigma: Breaking Stereotypes

The reduction in the number of flip-flops in a sequential circuit is referred to as the state-reduction problem.

DESIGN and IMPLETATION of KEYSTREAM GENERATOR with IMPROVED SECURITY

Modified Version of Playfair Cipher Using Linear Feedback Shift Register and Transpose Matrix Concept

A. To tell the time of the day 1. To build a mod-19 counter the number of. B. To tell how much time has elapsed flip-flops required is

FOR OFFICIAL USE ONLY

PHYS 3322 Modern Laboratory Methods I Digital Devices

Interval Preset Switching of the Oscillators in a Moog Prodigy

CHAPTER 6 ASYNCHRONOUS QUASI DELAY INSENSITIVE TEMPLATES (QDI) BASED VITERBI DECODER

NON-BREAKABLE DATA ENCRYPTION WITH CLASSICAL INFORMATION

Working with the ENIGMA at Panmunjom (Korea)

Lab #11: Register Files

Cryptography CS 555. Topic 5: Pseudorandomness and Stream Ciphers. CS555 Spring 2012/Topic 5 1

cs281: Introduction to Computer Systems Lab07 - Sequential Circuits II: Ant Brain

4:1 Mux Symbol 4:1 Mux Circuit

V.Sorge/E.Ritter, Handout 5

Enigma. Enigma

Digital Logic. ECE 206, Fall 2001: Lab 1. Learning Objectives. The Logic Simulator

Testing of Cryptographic Hardware

Model Railway Animation: Part 1, LEDs - Expanded By David King

LECTURE NOTES ON Classical Cryptographic Techniques ( Substitution Ciphers System)

CHAPTER1: Digital Logic Circuits

Playfair Cipher. From the earliest forms of stenography to the most advanced forms of encryption, the

3rd Slide Set Computer Networks

The Web Cryptology Game CODEBREAKERS.EU edition 2015

Dorabella Cipher. Cryptography peppers the world s history as an aid to military communication

CSCB58 - Lab 4. Prelab /3 Part I (in-lab) /1 Part II (in-lab) /1 Part III (in-lab) /2 TOTAL /8

[Dharani*, 4.(8): August, 2015] ISSN: (I2OR), Publication Impact Factor: 3.785

Laboratory 8. Digital Circuits - Counter and LED Display

Traffic Light Controller. Thomas Quinn, Brandon Londo, Alexander C. Vincent, Yezan Hussein

Keywords- Cryptography, Frame, Least Significant Bit, Pseudo Random Equations, Text, Video Image, Video Steganography.

CSE 352 Laboratory Assignment 3

Final Report. Iowa State University Department of Electrical and Computer Engineering Senior Design December 2010 Team 04

APPLICATION OF PHASED ARRAY ULTRASONIC TEST EQUIPMENT TO THE QUALIFICATION OF RAILWAY COMPONENTS

The Tentatve List of Enigma and Other Machine Usages, formatted by Tony Sale. (c) July March l945 page 1

Final Project [Tic-Tac-Toe]

Sequences and Cryptography

Appendix Cryptograms

Final Exam review: chapter 4 and 5. Supplement 3 and 4

Sequential Logic Notes

SCENEMASTER 3F QUICK OPERATION

Digital Electronics II 2016 Imperial College London Page 1 of 8

Basics of BISS scrambling. Newtec. Innovative solutions for satellite communications

Logic Devices for Interfacing, The 8085 MPU Lecture 4

Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts)

Exercise 4. Data Scrambling and Descrambling EXERCISE OBJECTIVE DISCUSSION OUTLINE DISCUSSION. The purpose of data scrambling and descrambling

Laboratory 11. Required Components: Objectives. Introduction. Digital Displays and Logic (modified from lab text by Alciatore)

Computer Systems Architecture

Introduction to Digital Electronics

EM1. Transmissive Optical Encoder Module Page 1 of 9. Description. Features

IMPORTANT! Special Instructions for the TracVision M3DX Conversion System ( )

Laboratory Exercise 7

LED Array Tutorial. This guide explains how to set up and operate the LED arrays that can be used for your. Internal Structure of LED Array

Part No. ENC-LAB01 Users Manual Introduction EncoderLAB

COMPUTER ENGINEERING PROGRAM

Bar Codes to the Rescue!

CPS311 Lecture: Sequential Circuits

Alan Turing, Enigma (Computerkultur) (German Edition) By Andrew Hodges

Transcription:

Eric Roberts and Jerry Cain Handout #36 CS 106J May 15, 2017 The Enigma Machine In World War II, a team of British mathematicians working at a secret facility called Bletchley Park was able to break the German military code, which allowed the Allies to decipher German military communication. Breaking the German codes was an early application of cryptography, which is the science of creating and decoding messages. In the language of cryptography, the message you want to send is called the plaintext; the encoded message is called the ciphertext. Decoding the ciphertext typically depends on having the sender and receiver share a privileged piece of information called a key. In the early 1930s, the German military adopted a new encryption protocol based on an existing commercial device called Enigma. This handout describes the operation of the Enigma machine in enough detail for you to simulate its function in Assignment #5. A detailed account of how the Bletchley Park mathematicians broke Enigma is available on the CS 106J website. Figure 1 shows the top view of a typical Enigma machine, expanded so that you can see the detail. At the bottom of the figure is a keyboard arranged in the standard German Figure 1. Top view of a typical Enigma machine

2 layout. Above the keyboard are three rows of lamps. Pressing a key lights one of the lamps, thereby indicating the encoded version of that letter. The mapping from keys to lamps is controlled by the three thumb wheels at the top of the diagram, which are called rotors. Each rotor which in the wartime Enigma machines could be chosen from a stock of five rotors from which any three could be used in any order can be set to any of 26 positions corresponding to the letters of the alphabet. The display windows at the top of Figure 1 show the letters JLY. The three letters together are called the rotor setting. Enigma rotors are three-dimensional, which unfortunately makes them difficult to represent on the printed page. The letters you see through the display windows are printed around the circumference of the rotor. The left and right edges of a rotor have 26 electrical contacts aligned with the 26 letters. Those contacts are wired across the rotor so that each contact on the left connects to a contact on the right in some scrambled arrangement. Each rotor therefore implements a reordering of the letters of the alphabet, which mathematicians call a permutation. Figure 2 offers two views of this wiring. The diagram on the left shows how the rotor would appear when viewed along its axis. The letters circle the rotor, and the contacts shown at the outer edge go through the rotor and connect to the contact in the interior circle, which are physically on the opposite side of the rotor itself. The contact A on this side of the rotor connects to contact E on the reverse side, as shown by the heavy line in the diagram. The diagram on the right offers a schematic view in which the connections across the rotor appear in a linear arrangement. This diagram has the same wiring, as indicated by the connection between A on the right and E on the left. When you look at this unrolled view, you have to keep in mind that the top and bottom of the rectangle are in fact connected together to form a circle. Figure 2. Two views of the wiring of an Enigma rotor

3 Figure 3 shows the internal structure of the Enigma machine, focusing on how the wiring of the three rotors makes it possible to encrypt information as it passes from one side of the machine to the other. Typing a character on the keyboard automatically advances the rotor on the right, thereby changing the pattern of connections inside the machine. When the rightmost rotor has completed a full revolution, the middle rotor advances one step; in much the same way, completing a revolution of the middle rotor advances the leftmost rotor. The rotors therefore advance in a fashion reminiscent of the odometer on a car. The right rotor advances on every character and is therefore called the fast rotor. The middle rotor advances once every 26 characters and is called the medium rotor. The left rotor advances only once every 676 (26 26) characters and is called the slow rotor. Figure 4 at the top of the next page shows what happens if the operator types the A key. Pressing the key advances the fast rotor, which changes the rotor setting from JLY to JLZ. The Enigma machine then applies a current to the wire leading from the A key at the right edge of the diagram and, at the same time, disconnects the A lamp so that only the encrypted version of the letter appears. The current flows from the A key through each of the three rotors, moving from right to left. It then passes into a circuit element called the reflector, which implements a fixed permutation. From the reflector, the current flows back across the rotors in the opposite direction. As shown in the diagram, the current initiated by typing A ends up on the wire labeled B, which causes the B lamp to light. Thus, given the rotor setting JLZ, the ciphertext form of the letter A is B. The encryption patterns generated by the Enigma machine are difficult to break because the encoding changes on every character. If the operator types a second letter A immediately after the first, the fast rotor again advances, which this time completes the Figure 3. Structural diagram of the Enigma machine showing the rotor setting JLY

4 Figure 4. The Enigma machine after pressing the A key alphabet and cycles back to A. Completing the cycle causes a carry to the medium rotor, which advances from L to M. Given the rotor setting JMA, the letter A is translated into the letter F, as shown in Figure 5. Figure 5. The Enigma machine after pressing the A key a second time

5 At this point, it is useful to note a fundamental symmetry in the Enigma design. If A is transformed to F at some rotor setting, it must also be the case that F is transformed to A. The circuit is exactly the same; the only difference is that the current flows in the opposite direction. This symmetry is very useful for Enigma operators because it means that the sender and receiver don t need to have two different keys. The sender sets the rotors according to a codebook and types in the message. What comes out in the lights is the ciphertext, which is typically transmitted over a radio channel in Morse code. As long as the receiver uses the same codebook and sets up the machine in the same way, typing in the ciphertext restores the original message, because the encryption is reversible. As it happens, the fact that the encoding is reversible also makes it easier to break. Learning more about breaking the Enigma code Your goal in this assignment is to simulate the function of the Enigma machine, which was indeed one of the challenges that the codebreakers at Bletchley Park had to solve. If you re interested in how the Bletchley codebreakers managed to break Enigma, you can read the chapter on cryptography that appears in a book that Eric is writing about the great ideas in computing. That chapter is available on the CS 106J website.