1 Codes, Ciphers, and Cryptography-Ch 2.1 Michael A. Karls Ball State University.

Slides:



Advertisements
Similar presentations
Using Cryptography to Secure Information. Overview Introduction to Cryptography Using Symmetric Encryption Using Hash Functions Using Public Key Encryption.
Advertisements

1 CSCD434/539 Winter 2013 Lecture 11 Cryptography - Basics.
1 Codes, Ciphers, and Cryptography-Ch 2.3 Michael A. Karls Ball State University.
Classical Cryptography
Session 1: Introduction to cryptology. Cryptology Cryptology: criptos=secret + logos=science Cryptology = Cryptography + Cryptanalysis Opposite and complementary.
Encryption Theory CSC380 – Flint Joasaint, Marcial White.
CRYPTOGRAPHY Lecture 5. A B C D E F G H I J K L M N O P Q R S T U V W X Y Z B C D E F G H I J K L M N O P Q R S T U V W X Y Z A C D E F G H I J K L M.
1 Day 04- Cryptography Acknowledgements to Dr. Ola Flygt of Växjö University, Sweden for providing the original slides.
CYPHER INDEX n Introduction n Background n Demo INTRODUCTION n Cypher is a software toolkit designed to aid in the decryption of standard (historical)
1 Codes, Ciphers, and Cryptography-Ch 3.1 Michael A. Karls Ball State University.
Chapter 2 – Classical Encryption Techniques
1 Introduction to Codes, Ciphers, and Cryptography Michael A. Karls Ball State University.
Cryptography and Network Security Chapter 2 Fourth Edition by William Stallings.
Section 2.3: Substitution Ciphers Practice HW from Barr Textbook (not to hand in) p. 92 # 1, 2 # 3-5 (Use Internet Site)Use Internet Site.
Polyalphabetic Substitution Ciphers. First Steps Towards Complexity  If one alphabet is good, then two alphabets must be better!  By doubling the number.
Classical Monoalphabetic Ciphers Day 2. Keyword cipher Select a keyword, if the keyword has any repeated letters, drop all but the first occurrence. Write.
Cryptanalysis of the Vigenere Cipher Using Signatures and Scrawls To break a Vigenere cipher you need to know the keyword length. – The Kasiski and Friedman.
Chapter 2 Basic Encryption and Decryption. csci5233 computer security & integrity 2 Encryption / Decryption encrypted transmission AB plaintext ciphertext.
Classical Encryption Techniques
Section 2.2: Affine Ciphers; More Modular Arithmetic Practice HW (not to hand in) From Barr Textbook p. 80 # 2a, 3e, 3f, 4, 5a, 7, 8 9, 10 (Use affinecipherbreaker.
A Technical Seminar Presentation CLASSICAL CRYPTOGRAPHY
1 University of Palestine Information Security Principles ITGD 2202 Ms. Eman Alajrami 2 nd Semester
Section 2.1: Shift Ciphers and Modular Arithmetic The purpose of this section is to learn about modular arithmetic, which is one of the fundamental mathematical.
Cryptology I.Definitions II.Substitution Ciphers III.Transpositions Ciphers IV.The DES Algorithm V.Public-Key Cryptology.

Introduction to Cryptography
Topic 21 Cryptography CS 555 Topic 2: Evolution of Classical Cryptography CS555.
Day 18. Concepts Plaintext: the original message Ciphertext: the transformed message Encryption: transformation of plaintext into ciphertext Decryption:
Section 2.1: Shift Ciphers and Modular Arithmetic Practice HW from Barr Textbook (not to hand in) p.66 # 1, 2, 3-6, 9-12, 13, 15.
Section 2.7: The Friedman and Kasiski Tests Practice HW (not to hand in) From Barr Text p. 1-4, 8.
Symmetric-Key Cryptography
An Introduction to Cryptography. What is cryptography? noun \krip- ˈ tä-grə-fē\ : the process of writing or reading secret messages or codes “Encryption”:
Module :MA3036NI Cryptography and Number Theory Lecture Week 3 Symmetric Encryption-2.
Terminology and classical Cryptology
Polyalphabetic CIPHERS Linguistics 484. Summary The idea How to recognize: index of coincidence How many alphabets: Kasiski.
Classic Cryptography History. Some Basic Terminology plaintext - original message ciphertext - coded message cipher - algorithm for transforming plaintext.
1 University of Palestine Information Security Principles ITGD 2202 Ms. Eman Alajrami.
Conventional crypto - Noack Conventional crypto Diffusion and confusion How Mary Queen of Scots lost her head Various hand operable ciphers Various Enigmas.
Data Security and Encryption (CSE348) 1. Lecture # 4 2.
Section 2.5: Polyalphabetic Substitutions Practice HW (not to hand in) From the Barr Text p. 118 # 1-6.
Traditional Symmetric-Key Ciphers
1 Codes, Ciphers, and Cryptography-Ch 2.2 Michael A. Karls Ball State University.
Section 2.5 Polyaphabetic Substitutions
Section 2.3: Substitution Ciphers
Introduction to Cryptography Lecture 8. Polyalphabetic Substitutions Definition: Let be different substitution ciphers. Then to encrypt the message apply.
Lecture 4 Page 1 CS 236 Online Basic Encryption Methods Substitutions –Monoalphabetic –Polyalphabetic Permutations.
Vigenére Cipher Kimberly Chiffens & Maria Jannelli.
Network Security Lecture 13 Presented by: Dr. Munam Ali Shah.
Polyalphabetic Ciphers History. Alberti Rennaisance Architect –First fountains of Trevi, Rome –Churches 1467 essay on cryptology –Frequency analysis –Cipher.
Encryption. LEARNING OBJECTIVES: BY THE END OF THE LESSON YOU SHOULD KNOW. What encryption is and why it is important The basics of encryption techniques.
Dr. Saatchi, Seyed Mohsen 1 Arab Open University - AOU T209 Information and Communication Technologies: People and Interactions Sixth Session.
Mohammad Alauthman 6/12/2016© 2004 Dr. Khalid Kaabneh.2 CRYPTOLOGY Definition: Cryptology : from the Greek Crypto meaning secret.
Lecture 2 Classical Cipher System SIMPLE SUBSTITUTION CIPHERS By: NOOR DHIA AL- SHAKARCHY
CHAPTER 14 ENCRYPTION AND DECRYPTION Sajina Pradhan
@Yuan Xue CS 285 Network Security Cryptography Overview and Classical Encryption Algorithms Fall 2012 Yuan Xue.
CRYPTOGRAPHY G REEK WORD MEANING “ SECRET WRITING ”
Encryption with Keys and Passwords
Substitution Ciphers.
Chapter 2 Basic Encryption and Decryption
Cryptography.
Asad Gondal Ali Haider Mansoor
Polyalphabetic Ciphers
Outline Some Basic Terminology Symmetric Encryption
A Technical Seminar Presentation CLASSICAL CRYPTOGRAPHY
CSCD 303 Fall 2018 Lecture 18 Cryptography - Basics.
Computer Security Mohammad Alauthman
Information Security IT423
CSCD434 Spring 2019 Lecture 12 Cryptography - Basics.
Running Key Cipher The security of polyalphabetic substitution cipher reside in key length. In running-key cipher, the length of key must be equal the.
Symmetric Encryption or conventional / private-key / single-key
Presentation transcript:

1 Codes, Ciphers, and Cryptography-Ch 2.1 Michael A. Karls Ball State University

2 Making Ciphers Stronger In Chapter 1 we saw several examples of monoalphabetic substitution ciphers.  Caesar cipher  Keyword cipher  Rearrangement cipher  Affine cipher All of these ciphers can be broken using the technique developed by Arab cryptanalysts in the 8 th century A.D.—frequency analysis.

3 Ways to Strengthen Monoalphabetic Ciphers New encryption methods needed to be invented to overcome this flaw in monoalphabetic ciphers. Examples of techniques used to strengthen these ciphers include:  Misspell words in a message before encrypting.  Add in dummy symbols called nulls. For example, assign the double digit numbers to the letters a- z and add in the null symbols

4 Ways to Strengthen Monoalphabetic Ciphers Examples of techniques used to strengthen these ciphers (cont.)  Add in codewords or symbols along with a cipher alphabet. Mary Queen of Scots’s nomenclature is an example of this technique. Her nomenclature also had four nulls! Note that all of these modified monoalphbetic ciphers can be broken using frequency analysis.

5 Homophonic Substitution Ciphers Frequency analysis of a ciphertext works because of the fact that each letter of the plain text is replaced with only one ciphertext symbol. For example, suppose we have a monoalphabetic cipher in which eXeX tBtB  h  W. Check relative frequency table for the English language (see Table 1.2 on handout).

6 Homophonic Substitution Ciphers (cont.) Since e, t, and h appear in a large amount of plaintext approximately 13%, 9%, and 6% of the time, respectively, In a piece of ciphertext, X, B, and W will occur approximately 13%, 9%, and 6% of the time, respectively. Furthermore, every occurrence of “the” in the plaintext will be encrypted as “BWX” in the ciphertext.

7 Homophonic Substitution Ciphers (cont.) Here is a way to get around this problem: Assign more than one ciphertext symbol to a given plaintext symbol! In order to take frequency analysis “out of the picture”, we’ll use the following rules:  Rule 1: In order to make deciphering unique, the sets of symbols belonging to plaintext letters must be disjoint, i.e. have no common elements.  Rule 2: The number of ciphertext symbols assigned to a plaintext letter is determined by the frequency of the letter, i.e. the relative frequency of the letter in a given language. Basically, if the relative frequency of a letter is n%, choose n symbols for that letter!

8 Homophonic Substitution Ciphers (cont.) Here is an example of a homophonic substitution cipher. In the following table, pairs of digits 00 – 99 have been assigned to the letters a – z! Handout Table 2.1 Table 2.1 a 05, 18, 26, 38, 45, 54, 62, 84 n20, 36, 53, 65, 97, 98 b10o 22, 30, 34, 60, 64, 67, 72 c28, 06, 80p04, 39 d24, 46, 85, 88q59 e 15, 16, 23, 31, 44, 61, 69, 77, 83, 87, 91, 95 r08, 56, 57, 71, 79, 92 f02, 32s21, 42, 49, 63, 70, 94 g17, 52t 12, 50, 51, 55, 75, 78, 86, 93, 96, 99 h03, 09, 33, 76, 82, 89u29, 01, 58 i 27, 47, 66, 73, 74, 81, 90 v14 j11w13, 25 k43x41 l19, 37, 48, 68y40 m00, 35z07

9 Homophonic Substitution Ciphers (cont.) Example 1: Use Table 2.1 to encrypt this message: the cat in the hat is here. Solution:  Randomly choose a ciphertext letter for each plaintext letter.  How do we do this? Draw pieces of paper numbered 1-12, 1-6, etc. from a hat. Use dice: 6-sided, 8-sided, etc. a 05, 18, 26, 38, 45, 54, 62, 84 n20, 36, 53, 65, 97, 98 b10o 22, 30, 34, 60, 64, 67, 72 c28, 06, 80p04, 39 d24, 46, 85, 88q59 e 15, 16, 23, 31, 44, 61, 69, 77, 83, 87, 91, 95 r08, 56, 57, 71, 79, 92 f02, 32s21, 42, 49, 63, 70, 94 g17, 52t 12, 50, 51, 55, 75, 78, 86, 93, 96, 99 h03, 09, 33, 76, 82, 89u29, 01, 58 i 27, 47, 66, 73, 74, 81, 90 v14 j11w13, 25 k43x41 l19, 37, 48, 68y40 m00, 35z07 Table 2.1

10 Homophonic Substitution Ciphers (cont.) Remarks on this type of cipher:  Since we are choosing each cipher text symbol randomly, any symbol has the same chance of occurring.  The word “homophonic” comes from Greek! “homos”  ”same” “phonos”  ”sound”

11 Breaking a Homophonic Substitution Cipher Frequency analysis cannot be used to break a cipher in which every symbol appears with the same frequency. We can use the idea of digraphs and trigraphs to help us decipher a homophonic substitution cipher! See digraph and trigraph tables 1.2 and 1.3 on handout! For example,  The digraph “of” can only be encrypted in 7x2 = 14 ways.  Also, there are only 6 choices for ciphertext symbols that stand for plaintext “h”, so if we know the symbols for “t”, we have a good chance of figuring out what stands for “h”, since “h” often follows “t”.

12 The Vigenère Cipher So far, all the enciphering schemes we’ve seen use just one alphabet. Enciphering methods have been developed that use more than one alphabet! Such ciphers are called polyalphabetic substitution ciphers.

13 The Vigenère Cipher (cont.) The most famous polyalphabetic cipher is the Vigenère (pronounced “vision-air”) cipher.  Published in 1586 (same year as Mary Queen of Scots’ death).  Created by the French diplomat Blaise de Vigenère ( ).

14 The Vigenère Cipher (cont.) As is the case with many great ideas, Vigenère was not the first to discover this method! Other people who came up with the idea of ciphers involving multiple alphabets:  Leone Battista Alberti ( ).  Johannes Trithemius ( ).  Giovanni Della Porta ( ). Vigenère took their ideas and combined them to produce a revolutionary new cipher!

15 The Vigenère Cipher (cont.) Here’s how the Vigenère cipher works: 1. Choose a keyword and make a Vigenère square. (Handout Vigenère square—see next page.) Note: This square is just all 26 possible additive ciphers written in rows!

16 ABCDEFGHIJKLMNOPQRSTUVWXYZ BCDEFGHIJKLMNOPQRSTUVWXYZA CDEFGHIJKLMNOPQRSTUVWXYZAB DEFGHIJKLMNOPQRSTUVWXYZABC EFGHIJKLMNOPQRSTUVWXYZABCD GHIJKLMNOPQRSTUVWXYZABCDEF HIJKLMNOPQRSTUVWXYZABCDEFG IJKLMNOPQRSTUVWXYZABCDEFGH JKLMNOPQRSTUVWXYZABCDEFGHI KLMNOPQRSTUVWXYZABCDEFGHIJ LMNOPQRSTUVWXYZABCDEFGHIJK MNOPQRSTUVWXYZABCDEFGHIJKL NOPQRSTUVWXYZABCDEFGHIJKLM OPQRSTUVWXYZABCDEFGHIJKLMN PQRSTUVWXYZABCDEFGHIJKLMNO QRSTUVWXYZABCDEFGHIJKLMNOP RSTUVWXYZABCDEFGHIJKLMNOPQ STUVWXYZABCDEFGHIJKLMNOPQR TUVWXYZABCDEFGHIJKLMNOPQRS UVWXYZABCDEFGHIJKLMNOPQRST VWXYZABCDEFGHIJKLMNOPQRSTU WXYZABCDEFGHIJKLMNOPQRSTUV XYZABCDEFGHIJKLMNOPQRSTUVW YZABCDEFGHIJKLMNOPQRSTUVWX ZABCDEFGHIJKLMNOPQRSTUVWXY Vigenère Square

17 The Vigenère Cipher (cont.) 2. Write the keyword above the plaintext letters. For example, choose VENUS as the keyword and polyalphabetic as the plaintext. VENUSVENUSVENU polyalphabetic

18 The Vigenère Cipher (cont.) 3. Enciphering Rule:  The keyword letter above a plaintext letter determines which row of the Vigenère square to use.  The plaintext letter determines which column of the Vigenère square to use.  To encrypt, choose the letter where a row and column intersect!

19 The Vigenère Cipher (cont.) For example, to encrypt the “p” in “polyalphabetic”, use the row starting with “V” and column below “p”. (See next page!)

20 ABCDEFGHIJKLMNOPQRSTUVWXYZ BCDEFGHIJKLMNOPQRSTUVWXYZA CDEFGHIJKLMNOPQRSTUVWXYZAB DEFGHIJKLMNOPQRSTUVWXYZABC EFGHIJKLMNOPQRSTUVWXYZABCD GHIJKLMNOPQRSTUVWXYZABCDEF HIJKLMNOPQRSTUVWXYZABCDEFG IJKLMNOPQRSTUVWXYZABCDEFGH JKLMNOPQRSTUVWXYZABCDEFGHI KLMNOPQRSTUVWXYZABCDEFGHIJ LMNOPQRSTUVWXYZABCDEFGHIJK MNOPQRSTUVWXYZABCDEFGHIJKL NOPQRSTUVWXYZABCDEFGHIJKLM OPQRSTUVWXYZABCDEFGHIJKLMN PQRSTUVWXYZABCDEFGHIJKLMNO QRSTUVWXYZABCDEFGHIJKLMNOP RSTUVWXYZABCDEFGHIJKLMNOPQ STUVWXYZABCDEFGHIJKLMNOPQR TUVWXYZABCDEFGHIJKLMNOPQRS UVWXYZABCDEFGHIJKLMNOPQRST VWXYZABCDEFGHIJKLMNOPQRSTU WXYZABCDEFGHIJKLMNOPQRSTUV XYZABCDEFGHIJKLMNOPQRSTUVW YZABCDEFGHIJKLMNOPQRSTUVWX ZABCDEFGHIJKLMNOPQRSTUVWXY Vigenère Square

21 ABCDEFGHIJKLMNOPQRSTUVWXYZ BCDEFGHIJKLMNOPQRSTUVWXYZA CDEFGHIJKLMNOPQRSTUVWXYZAB DEFGHIJKLMNOPQRSTUVWXYZABC EFGHIJKLMNOPQRSTUVWXYZABCD GHIJKLMNOPQRSTUVWXYZABCDEF HIJKLMNOPQRSTUVWXYZABC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DEFGHIJKLMNOPQRSTUVW YZABCDEFGHIJKLMNOPQRSTUVWX ZABCDEFGHIJKLMNOPQRSTUVWXY Vigenère Square

23 The Vigenère Cipher (cont.) Thus, plaintext “p” is enciphered as “K”. Encipher “polyalphabetic”… Solution: VENUSVENUSVENU polyalphabetic KSYSSGTUUTZXVW

24 The Vigenère Cipher (cont.) Notes on the Vigenère cipher: In the last example, p  K, T a  S, U o, a, y  S p, b  T h, a  U  Thus, each plaintext letter can map to more than one ciphertext letter Depends on the size of the keyword! Longer keywords use more rows of the Vigenère square. More rows used means more possibilities for how to encrypt a plain text letter!  Note also that more than one plaintext letter can map to the same ciphertext letter, making it harder to decipher messages!

25 The Vigenère Cipher (cont.) Ciphertext letters tend to be “evenly distributed”.  For example, in the example above, here is the frequency of each ciphertext letter:  This protects the ciphered message from frequency analysis attacks! KSYGTUZXVW

26 The Vigenère Cipher (cont.) Vigenère’s cipher remained secure for over 200 years! Next week we’ll see how to crack the Vigenère cipher!