Presentation is loading. Please wait.

Presentation is loading. Please wait.


Similar presentations

Presentation on theme: "CLASSICAL ENCRYPTION TECHNIQUES"— Presentation transcript:


2 Encryption Techniques Symmetric Encryption - Substitution Cipher - Transposition Cipher Asymmetric Encryption - RSA Cipher

3 Basic Terminology Encryption: Process of encoding a message so that its meaning is not obvious. Decryption: The reverse process of Encryption. Transforming an encrypted message into its normal, plaintext form. Cryptosystem: A system for Encryption and Decryption. plaintext - the original message cipher text- the coded message cipher- algorithm for transforming plaintext to cipher text key - info used in cipher known only to sender/receiver

4 Symmetric Encryption use the same (secret) key to encrypt and decrypt a message( i.e. sender and recipient share a common key ) All classical encryption algorithms are private-key Symmetric Encryption also called as conventional / private-key / single-key Encryption Techniques

5 Cryptanalysis Cryptanalysis is the process of trying to find the plaintext or key Two main approaches – Brute Force ( try all possible keys) – Exploit weaknesses in the algorithm or key ( e.g. key generated from password entered by user, where user can enter bad password )

6 Cryptanalysis: Types of Attack Cipher text only – Just have cipher text to be decoded Known plaintext – Also have one or more plaintext-cipher text pairs Chosen plaintext – Cryptanalyst can choose plaintext and get corresponding Cipher text Chosen cipher text – Cryptanalyst can choose cipher text and get corresponding plaintext Chosen text – Combination of chosen plaintext and chosen cipher text

7 Cryptanalysis: Brute Force Attack (Exhaustive Search) Try all possible keys until code is broken On average, need to try half of all possible keys Infeasible if key length is sufficiently long Key size No of Keys Time required at 1 Time required at 10 6 (bits) encryptions per ? s encryption per ? s x minutes 2 milliseconds x years 10 hours x x years 5.4 x years x x years 5.9 x years Age of universe: years Note: DES has a 56 bit key; AES key has 128+ bits

8 Classical Encryption Techniques Substitution techniques The letters of the message are replaced by other letters or by numbers or symbols. Transposition techniques Performing some sort of permutation on the messages letters

9 More Definitions unconditional security – no matter how much computer power is available, the cipher cannot be broken since the cipher text provides insufficient information to uniquely determine the corresponding plaintext. computational security – given limited computing resources (e.g. time needed for calculations is greater than age of universe), the cipher cannot be broken

10 Substitution Ciphers where letters of plaintext are replaced by other letters or by numbers or symbols if plaintext is viewed as a sequence of bits, then substitution involves replacing plaintext bit patterns with cipher text bit patterns

11 Caesar Cipher The caesar Cipher earliest known substitution cipher, developed by Julius Caesar First attested use in military affairs Replaces each letter by 3rd letter. Example Text : HELLO WORLD Key : Shift each ASCII character right by 3 Encrypted text: KHOOR#ZRUOG To Decrypt : Shift each character left by 3

12 Caesar Cipher can define transformation as: 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 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 mathematically give each letter a number 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 then have Caesar cipher as: C = E(p) = (p + k) mod (26) p = D(C) = (C – k) mod (26)

13 Attacking Caesar Cipher Brute force – Key is just one letter (or number between 1 and 25) – Try all 25 keys – Easy !

14 One-Time Pad Unbreakable substitution cipher Uses random key that is as long as the message Can use key only once

15 Mono alphabetic Cipher Use any permutation of the 26 alphabetic characters 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 q e r y u i o p a s d f g w h j k l z x c v b n m t Example : Plain text:under attack we need help Cipher text:cwyul qxxqrd bu wuuy pufj

16 Attacking Mono alphabetic substitution Brute force – Very difficult; Key is 26 letters long – No. of possible keys = 26! = 4 x Algorithm weaknesses: – Frequency of letters in English language is well known Can deduce plaintext->cipher text mapping by analyzing frequency of occurrence e.g. on analyzing plenty of cipher text, most frequent letter probably corresponds to E – Can spot diagrams and trigrams Diagram: common 2-letter sequence; e.g. th, an, ed Trigram: common 3-letter sequence: e.g. ing, the, est

17 Frequency of Letters in English

18 Poly alphabetic Cipher Using different mono alphabetic substitution message: wearediscoveredsaveyourself key: deceptivedeceptivedeceptive Ciphertext: ZICVTWQNGRZGVTWAVZHCQYGLMGJ

19 Transposition Ciphers Classical Transposition or permutation ciphers These hide the message by re arranging the letter order without altering the actual letters used. can recognize these since have the same frequency distribution as the original text

20 Rail Fence cipher Write message letters out diagonally over a number of rows Then read off cipher row by row e.g.. Message : ATTACK AT MIDNIGHT write message out as: A T C A M D I H T A K T I N G T Cipher text is ATCAMDIHTAKTINGT

21 Row Transposition Ciphers A more complex scheme write letters of message out in rows over a specified number of columns Then reorder the columns according to some key before reading off the rows Key word: NETWORK Message: ATTACKISPOSTPONED N E T W O R K Key: Plaintext: A T T A C K I S P O S T P O N E D A B C D Cipher text: TPEIODASNCTBKPCTODASA

22 Product Ciphers Ciphers using substitutions or transpositions are not secure because of language characteristics Hence consider using several ciphers in succession to make harder, but: – Two substitutions make a more complex substitution – Two transpositions make more complex transposition – But a substitution followed by a transposition makes a new much harder cipher this is bridge from classical to modern ciphers


Similar presentations

Ads by Google