Substitution Ciphers.

Slides:



Advertisements
Similar presentations
CLASSICAL ENCRYPTION TECHNIQUES
Advertisements

Using Cryptography to Secure Information. Overview Introduction to Cryptography Using Symmetric Encryption Using Hash Functions Using Public Key Encryption.
Cryptology  Terminology  plaintext - text that is not encrypted.  ciphertext - the output of the encryption process.  key - the information required.
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)
Chapter 2 Basic Encryption and Decryption (part B)
CS526Topic 2: Classical Cryptography1 Information Security CS 526 Topic 2 Cryptography: Terminology & Classic Ciphers.
L1.1. An Introduction to Classical Cryptosystems Rocky K. C. Chang, February 2013.
Chapter 2 – Classical Encryption Techniques
3.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 3 Traditional Symmetric-Key Ciphers.
3.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 3 Traditional Symmetric-Key Ciphers.
Chapter 2 Basic Encryption and Decryption. csci5233 computer security & integrity 2 Encryption / Decryption encrypted transmission AB plaintext ciphertext.
3.1 SERVICES AND MECHANISMS SERVICES AND MECHANISMS The International Telecommunication Union- Telecommunication Standardization Section (ITU-T) provides.
A Technical Seminar Presentation CLASSICAL CRYPTOGRAPHY
1 University of Palestine Information Security Principles ITGD 2202 Ms. Eman Alajrami 2 nd Semester
Chapter 2 – Elementary Cryptography  Concepts of encryption  Cryptanalysis  Symmetric (secret key) Encryption (DES & AES)(DES & AES)  Asymmetric (public.
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.
Lec. 5 : History of Cryptologic Research II
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.
1 Chapter 2-1 Conventional Encryption Message Confidentiality.
Bit Cipher 1. Example of bit Cipher 2 Practical Stream Cipher 3.
Rather than just shifting the alphabet Could shuffle (jumble) the letters arbitrarily Each plaintext letter maps to a different random cipher text letter.
Symmetric-Key Cryptography
Module :MA3036NI Cryptography and Number Theory Lecture Week 3 Symmetric Encryption-2.
9/03/15UB Fall 2015 CSE565: S. Upadhyaya Lec 2.1 CSE565: Computer Security Lecture 2 Basic Encryption & Decryption Shambhu Upadhyaya Computer Science &
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.
Introduction to Ciphers Breno de Medeiros. Cipher types From “Cipher”, Wikipedia article.
Elementary Cryptography  Concepts of encryption  Symmetric (secret key) Encryption (DES & AES)(DES & AES)  Asymmetric (public key) Encryption (RSA)(RSA)
Data Security and Encryption (CSE348) 1. Lecture # 4 2.
Traditional Symmetric-Key Ciphers
Section 2.3: Substitution Ciphers
Vigenére Cipher Kimberly Chiffens & Maria Jannelli.
Network Security Lecture 13 Presented by: Dr. Munam Ali Shah.
CS526Topic 2: Classical Cryptography1 Information Security CS 526 Topic 2 Cryptography: Terminology & Classic Ciphers.
1 Classical Encryption Techniques. 2 Symmetric cipher model –Cryptography –Cryptanalysis Substitution techniques –Caesar cipher –Monoalphabetic cipher.
Chapter Two: Classic Cryptography
Computer Security By Rubel Biswas. Introduction History Terms & Definitions Symmetric and Asymmetric Attacks on Cryptosystems Outline.
CS480 Cryptography and Information Security Huiping Guo Department of Computer Science California State University, Los Angeles 4. Traditional and Modern.
3.1 Chapter 3 Traditional Symmetric-Key Ciphers Part2.
@Yuan Xue Quick Review.
CRYPTOGRAPHY G REEK WORD MEANING “ SECRET WRITING ”
Classical Cryptography
CSE565: Computer Security Lecture 2 Basic Encryption & Decryption
Chapter 2 Basic Encryption and Decryption
SUBSTITUTION CIPHERS A substitution technique is one in which the letters/number/symbols of plain text are replaced by other letters/numbers/symbols.
Traditional Symmetric-Key Ciphers
Columnar Transposition
Communication Security
Classical Polygraphic Ciphers
Cryptography and Network Security
Computer and Data Security 4th Class
CS4780 Cryptography and Information Security
History and Background Part 3: Polyalphabetic Ciphers
Chapter-2 Classical Encryption Techniques.
Taehyung Kim HPC Lab. POSTECH
Cryptography.
Outline Some Basic Terminology Symmetric Encryption
A Technical Seminar Presentation CLASSICAL CRYPTOGRAPHY
Pigpen Cipher A = Q = T = Z = A B C D E F G H I J K L M N O P Q R S T
Cryptography II Jagdish S. Gangolly School of Business
PART VII Security.
Encryption and Decryption
Information Security IT423
Traditional Symmetric-Key Ciphers
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:

Substitution Ciphers

Substitution Ciphers Monoalphabetic cipher Polyalphabetic cipher Caesar cipher Polyalphabetic cipher Vigenère cipher Multiple letter cipher Playfair cipher

Monoalphabetic cipher Plaintext characters are substituted by a different alphabet stream of characters shifted to the right or left by n positions E.g., ABCDEFGHIJKLMNOPQRSTUVWXYZ DEFGHIJKLMNOPQRSTUVWXYZABC Caesar cipher corresponds to n = 3 Julius Caesar used the Caesar cipher method

Monoalphabetic cipher The substitution cipher by shifting alphabets gives 26! > 4 x 1026 possibilities This might appear to be too many choices to try for an exhaustive attack This is a weak cipher because it would be easy to guess the pattern Mono-alphabetic ciphers are vulnerable to cryptanalysis attack

Monoalphabetic cipher The shift pattern above could be replaced by random assignment of characters for each alphabet E.g., ABCDEFGHIJKLMNOPQRSTUVWXYZ PMJSQOLEYTVUAXIKCGBWDRNHZF This would also give 26! possibilities

Pigpen Cipher Pigpen cipher is a variation on letter substitution Alphabets are arranged as follows: J K L M N O P Q R A B C D E F G H I

Pigpen Cipher diagram (cont’d) S U V X W Y Z A C W G

Pigpen Cipher Alphabets will be represented by the corresponding diagram E.g., WAG would be This is a weak cipher

ADFGVX Cipher A D F G V X 8 p 3 d 1 n l t 4 o a h 7 k b c 5 z j u 6 w m x s v i r 2 9 e y f q This is a variation on substitution cipher and is a strong cipher

ADFGVX Cipher Rules: Remove spaces and punctuation marks from message For each letter or number substitute the letter pair from the column and row heading Next, use a transposition operation on the pair of letters using a key word (which the receiver knows) Rearrange the columns of the new arrangement in alphabetical order Finally, arrange the letters from consecutive columns

ADFGVX Cipher E.g., Message = SEE ME IN MALL SEEMEINMALL VDXDXDGXXDVGAXGXDVDADA Use keyword of INFOSEC Arrange the stage 1 ciphertext characters in a fresh grid with keyword as the column heading Ciphertext is written in column order from left to right

ADFGVX Cipher I N F O S E C V D X G A

ADFGVX Cipher C E F I N O S G D X V A

ADFGVX Cipher Ciphertext is: GXVDAAXDDVXGDXXDVVXGD Recipient reverses the process using the same keyword and gets the plaintext Reason for this cipher using the name ADFGVX is that in Morse code these characters all have dissimilar patterns of dots and dashes

Polyalphabetic Cipher In monoalphabetic cipher the problem was that each character was substituted by a single character Cryptanalysts are helped by the fact that they have to see what character would correspond in plaintext for a given ciphertext character Polyalphabetic cipher’s goal is to make this process difficult

Polyalphabetic Cipher In polyalphabetic cipher, each plaintext character may be replaced by more than one character Since there are only 26 alphabets this process will require using a different representation than the alphabets Alphabets ‘A’ through ‘Z’ are replaced by 00, 01, 02, …, 25 We need two digits in this representation since we need to know how to reverse the process at the decryption side

Polyalphabetic Cipher The most common method used is Vigenère cipher Vigenère cipher starts with a 26 x 26 matrix of alphabets in sequence. First row starts with ‘A’, second row starts with ‘B’, etc. Like the ADFGVX cipher, this cipher also requires a keyword that the sender and receiver know ahead of time Each character of the message is combined with the characters of the keyword to find the ciphertext character

Vigenère Cipher Table 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 A 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 B 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 C 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 B D D E F G H I J K L M N O P Q R S T U V W X Y Z A B C E E F G H I J K L M N O P Q R S T U V W X Y Z A B C D F F G H I J K L M N O P Q R S T U V W X Y Z A B C D E G G H I J K L M N O P Q R S T U V W X Y Z A B C D E F H H I J K L M N O P Q R S T U V W X Y Z A B C D E F G I I J K L M N O P Q R S T U V W X Y Z A B C D E F G H J J K L M N O P Q R S T U V W X Y Z A B C D E F G H I K K L M N O P Q R S T U V W X Y Z A B C D E F G H I J L L M N O P Q R S T U V W X Y Z A B C D E F G H I J K M M N O P Q R S T U V W X Y Z A B C D E F G H I J K L

Vigenère Cipher Table (cont’d) 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 N N O P Q R S T U V W X Y Z A B C D E F G H I J K L M O O P Q R S T U V W X Y Z A B C D E F G H I J K L M N P P Q R S T U V W X Y Z A B C D E F G H I J K L M N O Q Q R S T U V W X Y Z A B C D E F G H I J K L M N O P R R S T U V W X Y Z A B C D E F G H I J K L M N O P Q S S T U V W X Y Z A B C D E F G H I J K L M N O P Q R T T U V W X Y Z A B C D E F G H I J K L M N O P Q R S U U V W X Y Z A B C D E F G H I J K L M N O P Q R S T V V W X Y Z A B C D E F G H I J K L M N O P Q R S T U W W X Y Z A B C D E F G H I J K L M N O P Q R S T U V X X Y Z A B C D E F G H I J K L M N O P Q R S T U V W Y Y Z A B C D E F G H I J K L M N O P Q R S T U V W X Z Z 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

Polyalphabetic Cipher E.g., Message = SEE ME IN MALL Take keyword as INFOSEC Vigenère cipher works as follows: S E E M E I N M A L L I N F O S E C I N F O ------------------------------------- A R J A W M P U N Q Z

Polyalphabetic Cipher To decrypt, the receiver places the keyword characters below each ciphertext character Using the table, choose the row corresponding to the keyword character and look for the ciphertext character in that row Plaintext character is then at the top of that column

Polyalphabetic Cipher Decryption of ciphertext: A R J A W M P U N Q Z I N F O S E C I N F O ------------------------------------- S E E M E I N M A L L Best feature is that same plaintext character is substituted by different ciphertext characters (i.e., polyalphabetic)

Vigenère Cipher Easiest way to handle Vigenère cipher is to use arithmetic modulo 26 This approach dispenses with the need for the table Keyword is converted to numbers and corresponding numbers in message and keyword are added modulo 26

Beale Cipher Also known as book cipher Keyword is taken as the first few words of a book that is agreed upon by sender and receiver Everything else works like the Vigenère cipher

Hill Cipher This involves the mathematical concept of matrices which we did not discuss If you are interested then you can see pages 37-40 of Stallings, 2nd edition book on Cryptography

Polyalphabetic cipher Vigenère cipher uses the fact that the keyword character helps to get different ciphertext characters from the table Instead of the Vigenère table, one could develop a new table in which each character is represented as an integer and the ciphertext could use multiple digits for substitution depending on the frequency analysis of the letter E.g., Q gets only one substitution value where as E gets 12 different substitution values, and so on

Transposition Cipher Also known as a permutation cipher Permutation is an arrangement of the original order of letters or numbers E.g., a = 1 2 3 3 1 2 “a” is a permutation of 1, 2, 3 such that 1 3 2 1 3 2

Transposition Cipher a2 = 1 2 3 a3 = 1 2 3 2 3 1 1 2 3 2 3 1 1 2 3 a3 is really identity as it does not change the order of the elements “a” is said to have order 3, written |a| = 3 “a” is an odd permutation as its order is an odd number

Transposition Cipher In Transposition cipher position of character changes but not its value This is different from substitution cipher Assign values 0, 1, 2, …, 25 to the alphabets Choose an integer n as the size of a block Split the message into blocks of size n

Transposition Cipher p = (p(1), p(2), …, p(n)) be a permutation of (1, 2, …, n) Message is encrypted using the values of p(1), p(2), …, p(n) E.g. Let n = 4 Let p = 1 2 3 4 2 4 1 3

Transposition Cipher message = proceed meeting as agreed Since n = 4, we split the message as follows: proc eedm eeti ngas agre ed We pad the last block with two spaces Encrypt using the permutation order Last block becomes d _ e _ where _ denotes a blank space Delete the blank spaces in encrypted text

Transposition Cipher Ciphertext using the permutation is: rcpoemedeietgsnagearde To decrypt, the receiver simply takes the inverse of the permutation In the last block of ciphertext we have de The two missing characters corresponding to 3-1 and 4-1 are thus blanks in plaintext

Multiple Letter Cipher Playfair cipher is a multiple letter cipher Each plaintext letter is replaced by a digram in this cipher Number of digrams is 26 x 26 = 676 User chooses a keyword and puts it in the cells of a 5 x 5 matrix. I and J stay in one cell. Duplicate letters appear only once. Alphabets that are not in the keyword are arranged in the remaining cells from left to right in successive rows in ascending order

Playfair Cipher Keyword “Infosec” I / J N F O S E C A B D G H K L M P Q R T U V W X Y Z

Playfair Cipher Rules: Group plaintext letters two at a time Separate repeating letters with an x Take a pair of letters from plaintext Plaintext letters in the same row are replaced by letters to the right (cyclic manner) Plaintext letters in the same column are replaced by letters below (cyclic manner) Plaintext letters in different row and column are replaced by the letter in the row corresponding to the column of the other letter and vice versa

Playfair Cipher E.g., Plaintext: “CRYPTO IS TOO EASY” Keyword is “INFOSEC” Grouped text: CR YP TO IS TO XO EA SY Ciphertext: AQ VT YB NI YB YF CB OZ To decrypt, the receiver reconstructs the 5 x 5 matrix using the keyword and then uses the same rules as for encryption

Vernam Cipher U.S. Army Major Joseph Mauborgne and AT&T’s Gilbert Vernam developed a cipher in 1917 Uses a one time arrangement of a key string that is as long as the plaintext Plaintexts are assumed to be short Also known as One-Time Pad cipher Key is used only once but characters in key may not be distinct

Vernam Cipher E.g., Plaintext: HELLO Key: KTBXZ -------------- Ciphertext : RXMIN (using addition mod 26) Plaintext: HELLO (using subtraction mod 26)