Sherlock Holmes and the adventures of the dancing men

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

Exploring the Enigma [The MATH Connection]

PART FIVE. Transposition Systems TYPES OF TRANSPOSITION SYSTEMS

Code-makers & Codebreakers. Substitution ciphers and frequency analysis

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

Breaking the Enigma. Dmitri Gabbasov. June 2, 2015

CS408 Cryptography & Internet Security

An Introduction to Cryptography

PA Substitution Cipher

Institute of Southern Punjab, Multan

Substitution cipher. Contents

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

PART FOUR. Polyalphabetic Substitution Systems PERIODIC POLYALPHABETIC SUBSTITUTION SYSTEMS

LECTURE NOTES ON Classical Cryptographic Techniques ( Substitution Ciphers System)

FOR OFFICIAL USE ONLY

Cardano Girolamo Cardano invented: Fleissner, after Austrian cryptologist (Eduard). Described by Jules Verne in the story Mathias Sandorf.

CSc 466/566. Computer Security. 4 : Cryptography Introduction

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

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

LFSR stream cipher RC4. Stream cipher. Stream Cipher

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

The Web Cryptology Game CODEBREAKERS.EU edition 2015

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

Nomenclators. Nomenclator Example. Alberti s Cipher Disk. Early code/cipher combination, popular form 1400s-1800s. Philip of Spain (1589, see Kahn):

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

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

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

NUMB3RS Activity: Coded Messages. Episode: The Mole

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

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

Grade School Crypto. Part 1. Dr. Rick Smith, Cryptosmith October, 2013

Hidden Codes and Grand Designs

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

STA4000 Report Decrypting Classical Cipher Text Using Markov Chain Monte Carlo

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

Appendix Cryptograms

A reprint from American Scientist

Attacking of Stream Cipher Systems Using a Genetic Algorithm

Zodiackillersite. Backward E = 3/ G = 14 / Y K E = = 36 3/14/36

Cryptology Notes ~ 1. Frank Tapson 2003 [trolc0:2]

V.Sorge/E.Ritter, Handout 5

CLASSICAL CRYPTOGRAPHY COURSE BY LANAKI. July 01, 1996 COPYRIGHT 1996 ALL RIGHTS RESERVED LECTURE 15 STATISTICAL ATTACKS

Many books on cryptography were published prior to the 1609

Authors crack the Bard's code

cryptography, plaintext; ciphertext. key,

HCCA: A Cryptogram Analysis Algorithm Based on Hill Climbing

USAGE OF FIREFLY ALGORITHM IN VIGNERE CIPHER TO REDUCE VARIABLE LENGTH KEY SEARCH TIME

Key-based scrambling for secure image communication

CRYPTOGRAPHY AND STATISTICS: A DIDACTICAL PROJECT. Massimo BORELLI, Anna FIORETTO, Andrea SGARRO, Luciana ZUCCHERI

The Paper Enigma Machine

The Swiss cipher machine NeMa

New Address Shift Linear Feedback Shift Register Generator

NON-BREAKABLE DATA ENCRYPTION WITH CLASSICAL INFORMATION

epic.hunt epic.two Solutions Thursday Night Teaser

Perfect Localized Security of the Fourtytwofish Cipher in the Delphic Oracle Model

How I Broke the Confederate Code (137 Years Too Late)

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

Create Your SAMPLE. Penmanship Pages! Featuring: Abeka Manuscript Font. By Sheri Graham

Cabinet War Rooms SIGSALY. The A-3 scrambler

Ciphers that Substitute Symbols

Teaching and Promoting Cryptology at Faculty of Science University of Hradec Králové

MATH& 146 Lesson 11. Section 1.6 Categorical Data

Senior Math Studies Lesson Planning Date Lesson Events

CRYPTOGRAPHY IN CREATIVE MEDIA. Olivia Grace Vanarthos. Honors Thesis. Appalachian State University

Update to 8 June 2011 Press Release

21.1. Unit 21. Hardware Acceleration

ISSN (Print) Original Research Article. Coimbatore, Tamil Nadu, India

AWord-Based Genetic Algorithm for Cryptanalysis of Short Cryptograms

Book Review of Rosenhouse, The Monty Hall Problem. Leslie Burkholder 1

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

The Number Devil: A Mathematical Adventure -By Hans Magnus Enzensberger 2 nd 9 wks Honors Math Journal Project Mrs. C. Thompson's Math Class

Problem 5 Example Solutions

Force & Motion 4-5: ArithMachines

Here s a question for you: What happens if we try to go the other way? For instance:

TRAVEL THROUGH TIME AND AROUND THE WORLD WITH JACK & ANNIE AND THEIR MAGIC TREE HOUSE

Stream Ciphers. Debdeep Mukhopadhyay

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

1.0: Introduction: 1.1: "Banburismus":

COSC282 BIG DATA ANALYTICS FALL 2015 LECTURE 11 - OCT 21

Circle of Fifths - Introduction:

Foundations of Computing and Communication Lecture 5. The Universal Machine

CROATIAN OPEN COMPETITION IN INFORMATICS. 6 th ROUND

Study Guide. Solutions to Selected Exercises. Foundations of Music and Musicianship with CD-ROM. 2nd Edition. David Damschroder

THE MONTY HALL PROBLEM

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

Optimum Composite Field S-Boxes Aimed at AES

UNIT 1: DIGITAL LOGICAL CIRCUITS What is Digital Computer? OR Explain the block diagram of digital computers.

Proceedings of the Third International DERIVE/TI-92 Conference

Primes and Composites

A Dominant Gene Genetic Algorithm for a Substitution Cipher in Cryptography

Route optimization using Hungarian method combined with Dijkstra's in home health care services

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

Prime Num Generator - Maker Faire 2014

Performance Evaluation of Stream Ciphers on Large Databases

UNIT III. Combinational Circuit- Block Diagram. Sequential Circuit- Block Diagram

THE HEROIC AGE OF EXPLORATION. Sample file

Algebra I Module 2 Lessons 1 19

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

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

Transcription:

Sherlock Holmes and the adventures of the dancing men Kseniya Garaschuk May 30, 2013 1 Overview Cryptography (from Greek for hidden, secret ) is the practice and study of hiding information. A cipher is a pair of algorithms that create the encryption (the process of converting ordinary information into unintelligible gibberish) and the reversing decryption - all using a secret key. Without knowing the secret key, it is difficult, if not nearly impossible, to decrypt the message. In this workshop, students will get acquainted with many different kinds of ciphers. We will start off by introducing historical ciphers, such as scytale transposition cipher claimed to have been used by the Spartan military and Caesar substitution cipher, used by its namesake to communicate with his generals during his military campaigns. We will then discuss the Vigenère cipher - a combination of 26 possible Caesar ciphers. We will then proceed to introduce the transposition ciphers in which the letters remain unchanged, but message is scrambled in a sophisticated way. We will analyze all the ciphers and learn how to break them. 2 Instructions and explanation of the format Below you will see detailed explanation of the material that should be presented to the students as well as various activities and challenges. Activities are for the students to practice the material. Brainstorm idea are for you to suggest or get from the audience and discuss. Extra activities are bonus in case some students work faster than others, these will prevent students from getting bored. Challenges are rewarded by clues to the mega puzzle! 1

The mega puzzle consists of the attached clues of dancing men. Students are told (in a skit or otherwise) that they are privy to secret communication between imprisoned Augustus Carmichael and Slippery Pete, his pirate partner on the outside. At the very beginning students are given the first two lines of the code. After completing the first challenge, the students are given the rest of the first page of clues. After completing the second challenge, the students are told that flags represent the ends of words (you will have to draw those in before photocopying the clues!!). After completing the third challenge, the students are given the final clue. The clues read: I hid the treasure at UVic. Keep it a secret. Make sure you are not followed. Tell pirate the password to get the map. Password is vacuum. (Do not forget to draw flags in!) After telling the pirate (someone will have to dress up), the pirate gives them the campus map where X makes the spot where treasure (aka candy) is hidden. 3 Substitution ciphers Idea: each letter that you want to encipher is substituted by another letter or symbol, but the order in which the letter appear is kept the same. Example 1 (Caesar cipher). Julius Caesar (100-44 BC) used this cipher in government communications. This cipher was less strong than other methods, by a small amount, but in a day when few people read in the first place, it was good enough. Activity 1. Decipher the following: D pdwkhpdwlfldq lv d ghylfh iru wxuqlqj friihh lqwr wkhruhpv. (A mathematician is a device for turning coffee into theorems.) Brainstorm ideas: Look for short words first; there are only two one-letter words in English and very few two-letter words (what are they?). Also, each word in English must have a vowel in it. Look for doubled letters. Frequent doubles are ss, ll, oo, ee, nn, pp. Hardly ever do you see aa or yy, and uu (unless the message happens to be about vacuums!) A more advanced technique is called frequency analysis, which is used to break ANY simple substitution cipher. To use this, count the occurrences of each of 2

the letters in the ciphertext (e.g., 17 X s, 12B s, 9 C s, 7 P s, etc.). Then look at a standard English frequency table. Activity 2. How can we make encoding faster with Caesar cipher? ideas. Create cipher disk. Brainstorm Challenge 1. Work as a team. Use cipher disk for speed to decipher the following: Zngu vf ab zber pbzchgngvba guna glcvat vf yvgrengher. (Math is no more computation than typing is literature.) Extra activity 1 (Atbash cipher). The cipher used in this message is another substitution cipher. It s not a rotation of the alphabet, so you cannot use the cipher disk. There is, however, a pattern to it (the alphabet is reveresed). Decipher the following: LYERLFH RH GSV NLHG WZMTVILFH DLIW RM NZGSVNZGRXH (Obvious is the most dangerous word in mathematics) Questions for thought: What if you didn t have any word breaks? Use frequency analysis. What else would make this harder to break? Since frequency analysis uses the fact that letters (like e ) are repeated regularly, you can instead replace e with several different symbols (say, 12 of them), so that each symbol only shows up one percent of the time. If you do this for the highest frequency letters, the cipher is much harder to crack! You can also have entire words replaced by certain symbols, especially ones that come up often and contain high-frequency letters (the words the and and, for example) or you can replace important words (like midnight if you message was attack at midnight ). That way, the frequency analysis is thrown off and some words remain hidden even after most of the cipher is broken. Another option is to insert nulls symbols that don t stand for anything at all! If you have a wide enough variety of nulls in your cipher, it can be pretty hard to crack! 3

4 Vigenère cipher Above ciphers are monoalphabetic substitution ciphers - ones which were encoded using only one fixed alphabet (hence the Greek root mono meaning one ). As we saw, especially when the spaces between words are still there, these are fairly easy to break. So, how can you make this harder? Use more than one alphabet, switching between them systematically! This type of cipher is called a polyalphabetic substitution cipher ( poly is the Greek root for many ). The difference is that frequency analysis no longer works the same way to break these. One such cipher is the famous Vigenère cipher, which was thought to be unbreakable for almost 300 years! It uses the power of 26 possible shift ciphers. How this Cipher Works: Pick a keyword (for our example, the keyword will be MEC ). Write your keyword across the top of the text you want to encipher, repeating it as many times as necessary. Now each block of 3 letters is shifted by a key-word. Word MEC consists of the 13th, 5th, and 3rd letters of the alphabet, then the first letter of the message is shifted by 13, the second letter is shifted by 5, the third by 3, the fourth by 13 (here we return to the beginning of the key-word), the fifth by 5, and so on. (Alternatively, use the Vigenère table for faster lookup or a slide ruler). Example: M E C M E C M E C M E C M E C M E C M E C M w e n e e d m o r e s u p p l i e s f a s t I I P Q I F Y S T Q W W B T N U I U R E U F So, as you can see, the letter e is enciphered sometimes as an I and sometimes as a Q. Not only that, but I represents two different letters, sometimes a w and sometimes an e. This renders our favorite tool, frequency analysis, nearly useless. Even though e is used very often in the plaintext, the letters that replace it ( I and Q ) don t show up as frequently. Also, now if we check doubled letters in the ciphertext (say II or WW ), these are not doubled letters in the plaintext. 4

You may, then, ask yourself is there any hope? Fortunately, there is! Given a long enough piece of ciphertext, certain words or parts of words (like the ) will line up with the keyword several times, giving rise to a repeated string of letters in the ciphertext. This can give us a clue as to the length of the keyword. After that, we can use frequency analysis on each piece that was enciphered with the same letter to crack the code. Consequently, cracking these ciphers hinges on finding repeated strings of letters in the ciphertext. Challenge 2. Give them first ciphertext and first key. They bring back ciphertext. Give them second key. They bring back final plaintext. H O C U S P O C U S - first ciphertext h b c t a p e y s m - first key O P E N S E S A M E - second ciphertext e t i f i h i b w i - second key S I M S A L A B I M - final answer Extra activity 2 (Keyed cipher disk). You can use a key for the construction of cipher disk and, hence, a modification of both Caesar and Vigenère ciphers. Pick a word with no repeated letters, for example CIPHER. On the inner disk, instead of standard alphabet, first write the keyword and then write the remaining letters of the alphabet. So on our inner disk we will have: CIPHERABDFGJKLMNOQSTU- VWXYZ. Now you have to be more careful shifting. Decipher the following keyed Caesar cipher: Uwtaofq ifoo xyryfd lx krog xtocfd (Problem well stated is half solved) 5 Transposition ciphers Recall that substitution ciphers are ones in which each letter is replaced by another letter (or symbol) in some systematic way. However, the order in which the letters appear stays the same. In transposition ciphers, the letters stay the same, but the order is all mixed up. 5

One of the oldest ways to do this was created by the ancient Egyptians and Greeks. It uses a stick called scytale. The Spartans used this rather extensively - all the generals had same diameter sticks. It is easy to crack: steal a general s scytale or just try different ones. Better yet - we can crack it using math! As it ends up, the scytale is just a very old version of a greater class of ciphers called matrix transposition ciphers. Pick a matrix of a fixed size, write your message across the rows. Then read down the columns instead. Here s a simple example Troops heading west need water ): T R O O P S H E A D I N G W E S T N E E D W A T E R So the ciphertext is TEEWRASAODTTOINEPNERSGEHWD. How to crack it: Count how many letters are in the ciphertext (in this example it s 26) Make all of the matrices that would fit such a length (here it is 2x13, 3x9, 4x7, 5x6). Use two of each size - one vertical and one horizontal. Now it s trial and error. For each size matrix, write out the ciphertext across the columns. See if you can find anything legible, reading across the rows. Challenge 3. Use matrix method to decipher the following: Mowpatoeintplnndlshlleawlseebwshiaafutky (Millions saw the apple fall, but Newton asked why.) Extra activity 3 (Columnar transposition). As above in transpositions cipher, the message is written out in rows of a fixed length (use extra random letters in the end if need be) and then read out again column by column, but this time the columns are chosen in some scrambled order. So, say your keyword is CIPHER. The permutations of columns is defined by the alphabetical order of the letters in the keyword. In this case, the order would be 1 4 5 3 2 6, so you read first column first, then 5th column, then 4th and so on. To decipher it, the recipient has to work out the column lengths by dividing the message length by the key length. Then he can write the message out in columns again, then re-order the columns by reforming the key 6

word. Try to make a message to see how it works. Then decipher the following that used keyword CIPHER: Peslteeclnveteieaitmtrdtalalbyrrrlcyuayeleaehvs (Parallel lines actually meet, but they are very discrete.) Questions for thought: How can we make it harder still? Use Double Transposition - two applications of columnar transposition to a message. The two applications may use the same key for each of the two steps, or they may use different keys. It s harder to break, but possible if attacker intercepted two or more messages of the same length using the same key. During World War I, the German military used a double columnar transposition cipher, changing the keys infrequently. The system was regularly solved by the French, naming it Ubchi, who were typically able to quickly find the keys once they d intercepted a number of messages of the same length, which generally took only a few days. However, the French success became widely-known, and the Germans changed to a new system on 18 November 1914. During World War II, the double transposition cipher was used by Dutch Resistance groups, the French Maquis and the British Special Operations Executive (SOE). It was also used by agents of the American Office of Strategic Services and as an emergency cipher for the German Army and Navy. Until the invention of the VIC cipher, double transposition was generally regarded as the most complicated cipher that an agent could operate reliably under difficult field conditions. 7