Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Classical Encryption Techniques. 2 Symmetric cipher model –Cryptography –Cryptanalysis Substitution techniques –Caesar cipher –Monoalphabetic cipher.

Similar presentations


Presentation on theme: "1 Classical Encryption Techniques. 2 Symmetric cipher model –Cryptography –Cryptanalysis Substitution techniques –Caesar cipher –Monoalphabetic cipher."— Presentation transcript:

1 1 Classical Encryption Techniques

2 2 Symmetric cipher model –Cryptography –Cryptanalysis Substitution techniques –Caesar cipher –Monoalphabetic cipher –Polyalphabetic cipher –One time pad –Playfair cipher Topic

3 3 Symmetric Encryption Referred to as conventional / private-key / single-key sender and recipient share a common key all classical encryption algorithms are private-key most widely used

4 4 Some Basic Terminology plaintext - original message ciphertext - coded message cipher - algorithm for transforming plaintext to ciphertext key - info used in cipher known only to sender/receiver encipher (encrypt) - converting plaintext to ciphertext decipher (decrypt) - recovering ciphertext from plaintext cryptography - study of encryption principles/methods cryptanalysis (codebreaking) - study of principles/ methods of deciphering ciphertext without knowing key cryptology - field of both cryptography and cryptanalysis

5 5 Symmetric Cipher Model Simplified model of conventional encryption

6 6 Requirements two requirements for secure use of symmetric encryption: –a strong encryption algorithm –a secret key known only to sender / receiver mathematically have: Y = E K (X) X = D K (Y) assume encryption algorithm is known

7 7 Cryptography characterize cryptographic system by: –type of encryption operations used Two general principles: –substitution / transposition –Product system (multiple stages..) –number of keys used single-key or private / two-key or public –way in which plaintext is processed block / stream

8 8 Cryptanalysis Two general approaches to attacking a conventional encryption scheme: –Cryptanalysis or cryptanalytic attack –brute-force attack

9 9 More Definitions Encryption scheme is unconditional secure –Cipher text generated by the scheme does not contain enough information to determine corresponding plaintext. –the cipher text cannot be broken. –no matter how much computer power or time is available. Encryption scheme is computational secure –given limited computing resources so the cipher cannot be broken

10 10 Brute Force Search always possible to simply try every key most basic attack, proportional to key size Key Size (bits) Number of Alternative Keys Time required at 1 decryption/µs Time required at 10 6 decryptions/µs 322 32 = 4.3 x 10 9 2 31 µs= 35.8 minutes 2.15 milliseconds 562 56 = 7.2 x 10 16 2 55 µs= 1142 years10.01 hours 1282 128 = 3.4 x 10 38 2 127 µs= 5.4 x 10 24 years 5.4 x 10 18 years 1682 168 = 3.7 x 10 50 2 167 µs= 5.9 x 10 36 years 5.9 x 10 30 years 26 characters (permutation ) 26! = 4 x 10 26 2 x 10 26 µs= 6.4 x 10 12 years 6.4 x 10 6 years

11 11 Classical Substitution Ciphers plaintext letters 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 ciphertext bit patterns.

12 12 Caesar Cipher Also known substitution cipher first attested use in military. replaces each letter by 3rd letter further down the alphabet example: m e e t m e P H H W P H

13 13 Caesar Cipher mathematically give each letter a number abcdefghijkl m n o p q r s t u v w x y z 012345678910 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 We 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 then have Caesar cipher as: c = E(p) = (p + k) mod (26) p = D(c) = (c – k) mod (26)

14 14 Cryptanalysis of Caesar Cipher a brute force cryptanalysis easily decrypt. Encryption and decryption algorithms are known. Try all the 25 possible keys The language of the plaintext is known and easily recognizable.

15 15 Monoalphabetic Cipher Caesar cipher is one of the example of monoalphabetic cipher. Monoalphabetic cipher is special substitution technique. each plaintext letter maps to a different random ciphertext letter So there are 26! Different cipher alphabets (4 x 10 26 ) possible. Plain: abcdefghijklmnopqrstuvwxyz Cipher: DKVQFIBJWPESCXHTMYAUOLRGZN Plaintext: ifwewishtoreplaceletters Ciphertext: WIRFRWAJUHYFTSDVFSFUUFYA

16 16 Monoalphabetic Cipher Security Caesar cipher is far from secure because only 25 possible keys. now have a total of 26! = 4 x 10 26 keys with so many keys, might think is secure If the cryptanalyst knows the nature of the plaintext(non compressed English text) then analyst can exploit the data. Relative frequency of cipher text letters can be determined and compare to a standard frequency distribution for English.

17 17 English Letter Frequencies

18 18 Example Cipher text: UZQSOVUOHXMOPVGPZW…………. Relative frequency of latter in percentage is: P: 13.33 e Z: 11.67 t S,U,O,M,H  {a,h,i,n,o,r,s} probably frequency. ZW: three time repeated in above cipher. so, z with ‘t’ and w with ‘h’ so ZW->th next, ZWP -> the next, ZWSZ -> th_t

19 19 Polyalphabetic Ciphers Monoalphabetic cipher encoded using only one fixed alphabet. Spaces between words are still there, these are fairly easy to break. So improve security use multiple cipher alphabets for same plaintext letters. make cryptanalysis harder with more alphabets to guess. One such cipher is the famous vigenere cipher.

20 20 Vigenère Cipher simplest polyalphabetic substitution cipher Pick a keyword (example: MEC) Write this keyword on top of the plaintext and repeat it many times if necessary. To retrieve cipher text of plain text use vigenere table. (row: keys letter and column: plaintext letter). Keyword: M E C M E C M E C M E C M E C Plaintext: w e n e e d m o r e m o n e y Cipher : I I P Q I F Y S T Q Q Q Z I A

21 21 Security of Vigenère Ciphers have multiple ciphertext letters for each plaintext letter hence letter frequencies are hidden. start with letter frequencies –see if look monoalphabetic or not if not, then need to determine number of alphabets, since then can attach each

22 22 One-Time Pad (Vernam Cipher) The cipher will be more secure. Key need not be repeated. (Random Key) The key is used to encrypt and decrypt a single message and then discarded. Key length is same as plaintext msg. It is unbreakable scheme. It offer complete security but in practice, has two fundamental difficulties: –Problem of making large quantities of random keys. –Problem of key distribution & protection.

23 23 One-Time Pad Plain text: H O W A R E Y O U 7 14 22 0 17 4 24 14 20 + OTP: 13 2 1 19 25 16 0 17 23 N C B T Z Q A R X Initial total: 20 16 23 19 42 20 24 31 43 Mod 26: 20 16 23 19 16 20 24 5 17 Ciphertext: U Q X T Q U Y F R

24 24 Playfair cipher Playfair is multiple letter encryption cipher It is based on the use of a 5 x 5 matrix of letters constructed using keyword. Example: keyword: “playfair is a diagram cipher” PLAYF I/JRSDG MCHEB KNOQT UVWXZ (p1,p2)  (c1,c2)

25 25 Playfair cipher Plaintext is encrypted two letters at a time based on following rules: me et at fi ve pm be hi nd pl ab. p1 & p2 in distinct row & column, then define the corner of a submatrix. Ex: ET  QB. P1 & p2 in common row, c1 is defined as the character immediately to the right of p1 & c2 is defined right of p2. Ex: ME  CB. p1,p2 in same column, then character immediately (circularly) below them are c2 & c3. Ex: PM  IK. p1=p2 then infrequent plaintext character(such as x) inserted between them and regrouped plaintext. Ex: balloon  ba lx lo on

26 26 Hill cipher Another Multi letter cipher technique. Take m successive plaintext letters and substitute for them m cipher text letters. The substitution is determined by m linear equations in which each character is assigned a numerical value. (a=0,b=1,c=2,…….z=25)

27 27 Transposition Ciphers these hide the message by rearranging the letter order without altering the actual letters used It can recognise these since have the same frequency distribution as the original text

28 28 Rail Fence cipher Text is written down as sequence of diagonal. Here we consider depth of the diagonal or number of rows for arranging letters. Next, read the letters row by row which gives cipher text. eg. write message out as: (depth=2) m e m a t r h t g p r y e t e f e t e o a a t giving ciphertext MEMATRHTGPRYETEFETEOAAT

29 29 Rail Fence cipher eg. write message out as: (depth=3) m e m a t r h t g p r y e t e f e t e o a a t giving ciphertext mtaehoptemfregayeetttar m t a e h o p t e m f r e g a y e e t t t a r

30 30 Row Transposition Ciphers a more complex transposition is to write the message in a rectangle row by row. Next, read the message column by column but specify which order of column to convert plaintext data into cipher text. write letters of message out in rows over a specified number of columns. Key: 4 3 1 2 5 6 7 Plaintext: a t t a c k p o s t p o n e d u n t i l t w o a m x y z Ciphertext: TTNAAPTMTSUOAODWCOIXKNLYPETZ

31 31 Row Transposition Ciphers In double transposition method convert single transposition cipher text into another cipher text. Key: 4 3 1 2 5 6 7 Plaintext: t t n a a p t m t s u o a o d w c o i x k n l y p e t z Ciphertext: NSCYAUOPTTWLTMDNAOIEPAXTTOKZ

32 32 Summary have considered: –classical cipher techniques and terminology –monoalphabetic substitution ciphers –cryptanalysis using letter frequencies –polyalphabetic ciphers –transposition ciphers –product ciphers and rotor machines


Download ppt "1 Classical Encryption Techniques. 2 Symmetric cipher model –Cryptography –Cryptanalysis Substitution techniques –Caesar cipher –Monoalphabetic cipher."

Similar presentations


Ads by Google