Presentation is loading. Please wait.

Presentation is loading. Please wait.

Information Security and Management 2. Classical Encryption Techniques Chih-Hung Wang Fall 2011 1.

Similar presentations


Presentation on theme: "Information Security and Management 2. Classical Encryption Techniques Chih-Hung Wang Fall 2011 1."— Presentation transcript:

1 Information Security and Management 2. Classical Encryption Techniques Chih-Hung Wang Fall 2011 1

2 Basic Concepts History ▫Kahn’s The Codebreakers (1963 - )  From its initial and limited use by the Egyptians some 4000 years ago, to the twentieth century where it played a crucial role in the outcome of both world wars. ▫U.S. Federal Information Processing Standard (DES; Data Encryption Standard). 1977. 2

3 History ▫New Directions in Cryptography  1976 Diffie and Hellman  Introduced the revolutionary concept of public-key cryptography  Provided a new and ingenious method for key exchange ▫RSA Cryptosystem  1978 Rivest, Shamir and Adleman discovered the first practical public-key encryption and signature scheme. 3

4 History ▫ElGamal  1985, another class of powerful and practical public-key scheme. ▫First international standard for digital signature (ISO/IEC 9796)  Based on the RSA public-key scheme ▫U.S. Government: Digital Signature Standard (DSS)  ElGamal like system 4

5 Taxonomy 5

6 Symmetric Encryption Conventional / private-key / single-key Sender and recipient share a common key All classical encryption algorithms are private- key Was only type prior to invention of public-key in 1970’s 6

7 Basic Terminology Plaintext - the original message Ciphertext - the 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) - the study of principles/ methods of deciphering ciphertext without knowing key Cryptology - the field of both cryptography and cryptanalysis 7

8 Symmetric Encryption Simplified Model 8

9 Symmetric Encryption Model of conventional cryptosystem 9

10 Symmetric Encryption Expression ▫X: the plaintext ▫Y: the Ciphertext ▫K: the secret key ▫Encryption:  Y = E K (X)  X = D K (Y) 10

11 Requirements There are two requirements for secure use of symmetric encryption: ▫We need a strong encryption algorithm ▫Sender and receiver must have obtained copies of the secret key in a secure fashion and must keep the key secure It is important to note that the security of symmetric encryption depends on the secrecy of the key 11

12 Cryptography can characterize by: ▫type of encryption operations used  substitution / transposition / product ▫number of keys used  single-key or private / two-key or public ▫way in which plaintext is processed  block / stream 12

13 Cryptanalysis Ciphertext only ▫Ciphertext to be decoded Known plaintext ▫Ciphertext to be decoded ▫One or more plaintext-ciphertext pairs formed with the secret key 13

14 Cryptanalysis Chosen plaintext ▫Ciphertext to be decoded ▫Plaintext message chosen by cryptanalyst, together with its corresponding ciphertext generated with the secret key Chosen ciphertext ▫Ciphertext to be decoded ▫Purported ciphertext chosen by cryptanalyst, together with its corresponding decrypted plaintext generated with the secret key 14

15 Unconditionally Secure ▫The ciphertext generated by the scheme does not contain enough information to determine uniquely the corresponding plaintext, no mater how much ciphertext is available.  One-time pad  No practical encryption algorithm is unconditionally secure 15

16 Computationally Secure An encryption scheme is computationally secure if the ciphertext generated by the scheme meets one or both of the following criteria: ▫The cost of breaking the cipher exceeds the value of the encrypted information ▫The time required to break the cipher exceeds the useful lifetime of the information 16

17 Security Concept ▫PGP company (1997) ▫$100,000 computer: Brute-force attack 17 Key length (bits)Breaking time 402 seconds 5635 hours 641 years 70 700 centenaries 12810 16 (Thousand years)

18 Exhaustive Search 18 Key Size (bits)Number of Alternative keys Time required at 1 encryption/us Time required at 10 6 encryptions/us 322 32 =4.3x10 9 2 31 us = 35.8 mins 2.15 milliseconds 562 56 =7.2x10 16 2 55 us = 1142 years 10.01 hours 1282 128 =3.4x10 38 2 127 us = 5.4x10 24 years 5.4x10 18 years 26 characters (permutation) 26! = 4x10 26 2x10 26 us = 6.4x10 12 years 6.4x10 6 years Brute-force Attack The attacker tries every possible key on a piece of ciphertext until an intelligible translation into plaintext is obtained. On average, half of all possible keys must be tried to achieve success

19 Classical Encryption Poem ▫ 紀曉嵐: 精神炯炯 老貌堂堂 烏巾白髯 龜鶴呈祥 Riddle ▫ 紀曉嵐: 鳳遊禾蔭鳥飛去 馬走蘆邊草不生 19

20 Classical Encryption 20 6 H28 Serial number of a can

21 Classical Encryption Substitution Techniques ▫Caesar Cipher  Plaintext: meet me after the toga party  Cipher :PHHW PH DIWHU WKH WRJD SDUMB  C=E(p) = (p+3) mod (26)  C=E(p) = (p+ (or -) k) mod (26) ▫Brute-force cryptanalysis  The encryption and decryption algorithms are known  Try all 25 possible keys  The language of the plaintext is known and easily recognizable 21

22 Brute-force Attack of Caesar Cipher 22

23 Classical Encryption Monoalphabetic Ciphers ▫A dynamic increase in the key space can be achieved by allowing an arbitrary substitution.  Plain : a b c d e f g  Cipher: D C Q F A M Z  Possible keys = 26! > 4x10 26  Time evaluation  Assume one can try 10000 keys per second  Average time to find out the key ▫4x10 26 / 4x10 7 x10 4 x2 =5x10 14 years 23

24 Monoalphabetic Ciphers Cryptanalysis ▫The relative frequency of the letters can be determined and compared to a standard frequency distribution for English ▫Ex: Ciphertext: UZQSOVUOHXMOPVGPOZPEVSGZWSZOPFPES XUDBMETSXAIZVUEPHZHMDZSHZOWSFPAPP DTSVPQUZWYMXUZUHSXEPYEPOPDZSZUFPO MBZWPFUPZHMDJUDTMOHMQ 24

25 Monoalphabetic Ciphers Relative frequency table 25 P:13.13H:5.83F:3.33B:1.67C:0 Z:11.67D:5.00W:3.33G:1.67K:0 S:8.33E:5.00Q:2.50Y:1.67L:0 U:8.33V:4.17T:2.50I:0.88N:0 O:7.50X:4.17A:1.67J:0.88R:0 M:6.67

26 Monoalphabetic Ciphers Relative Frequency of Letters in English Text 26

27 Monoalphabetic Ciphers Comparing results 27 E:12.75L:3.75W:1.50 T:9.25H:3.50V:1.50 R:8.50C:3.50B:1.25 N:7.75F:3.00K:0.50 I:7.75U:3.00X:0.50 O:7.50M:2.75Q:0.50 A:7.25P:2.75J:0.25 S:6.00Y:2.25Z:0.25 D:4.25G:2.00

28 Monoalphabetic Ciphers It seems likely … ▫P & Z are the equivalents of E & T ▫S,U,O, M and H are all of relatively high frequency and probably corresponding to plain letters from the set {R,N,I,O,A,S} ▫The letters with the lowest frequencies: A, B, G, I and J are likely included in the set {W, V, B, K, X, Q, J, Z} ▫Powerful Tools: the frequency of two-letter combinations. 28

29 Playfair Cipher not even the large number of keys in a monoalphabetic cipher provides security one approach to improving security was to encrypt multiple letters the Playfair Cipher is an example invented by Charles Wheatstone in 1854, but named after his friend Baron Playfair 29

30 Playfair Key Matrix a 5X5 matrix of letters based on a keyword fill in letters of keyword (sans duplicates) fill rest of matrix with other letters eg. using the keyword MONARCHY MONAR CHYBD EFGI/JK LPQST UVWXZ 30

31 Encrypting and Decrypting Plaintext encrypted two letters at a time: 1.if a pair is a repeated letter, insert a filler like 'X',eg. "balloon" encrypts as "ba lx lo on" 2.if both letters fall in the same row, replace each with letter to right (wrapping back to start from end),eg. “ar" encrypts as "RM" 3.if both letters fall in the same column, replace each with the letter below it (again wrapping to top from bottom), eg. “mu" encrypts to "CM" 4.otherwise each letter is replaced by the one in its row in the column of the other letter of the pair, eg. “hs" encrypts to "BP", and “ea" to "IM" or "JM" (as desired) 31

32 Security of the Playfair Cipher Security much improved over monoalphabetic since have 26 x 26 = 676 digrams would need a 676 entry frequency table to analyse (verses 26 for a monoalphabetic) and correspondingly more ciphertext was widely used for many years (eg. US & British military in WW1) it can be broken, given a few hundred letters since still has much of plaintext structure 32

33 Relative Frequency of Occurrence of Letters 33

34 Polyalphabetic Ciphers Another approach to improving security is to use multiple cipher alphabets called polyalphabetic substitution ciphers Makes cryptanalysis harder with more alphabets to guess and flatter frequency distribution Use a key to select which alphabet is used for each letter of the message Use each alphabet in turn Repeat from start after end of key is reached 34

35 Vigenère Cipher Simplest polyalphabetic substitution cipher is the Vigenère Cipher Effectively multiple caesar ciphers Key is multiple letters long K = k1 k2... kd i th letter specifies i th alphabet to use Use each alphabet in turn Repeat from start after d letters in message Decryption simply works in reverse 35

36 Example Write the plaintext out Write the keyword repeated above it Use each key letter as a caesar cipher key Encrypt the corresponding plaintext letter eg using keyword deceptive key: deceptivedeceptivedeceptive plaintext: wearediscoveredsaveyourself ciphertext:ZICVTWQNGRZGVTWAVZHCQYGLMGJ 36

37 Aids Simple aids can assist with en/decryption a Saint-Cyr Slide is a simple manual aid ▫a slide with repeated alphabet ▫line up plaintext 'A' with key letter, eg 'C' ▫then read off any mapping for key letter can bend round into a cipher disk or expand into a Vigenère Tableau (see text Table 2.3) 37

38 Vigenère Tableau 38

39 Security of Vigenère Ciphers have multiple ciphertext letters for each plaintext letter hence letter frequencies are obscured but not totally lost start with letter frequencies ▫see if look monoalphabetic or not if not, then need to determine number of alphabets, since then can attach each 39

40 Autokey Cipher ideally want a key as long as the message Vigenère proposed the autokey cipher with keyword is prefixed to message as key knowing keyword can recover the first few letters use these in turn on the rest of the message but still have frequency characteristics to attack eg. given key deceptive key: deceptivewearediscoveredsav plaintext: wearediscoveredsaveyourself ciphertext:ZICVTWQNGKZEIIGASXSTSLVVWLA 40

41 Gilbert Vernam (1918) Encryption Decryption 41 p i : ith binary digit of plaintext k i : ith binary digit of key c i : ith binary digit of ciphertext  : exclusive-or (XOR)

42 One-Time Pad if a truly random key as long as the message, with no repetitions is used, the cipher will be secure called a One-Time pad is unbreakable since ciphertext bears no statistical relationship to the plaintext since for any plaintext & any ciphertext there exists a key mapping one to other can only use the key once though have problem of safe distribution of key 42

43 Example of One-time Pad 43

44 Two Fundamental Difficulties 44 1.Making large quantities of random keys 2.Key distribution problem Limited utility: is useful primarily for low-bandwidth channels

45 Transposition Ciphers now consider classical transposition or permutation ciphers these hide the message by rearranging the letter order without altering the actual letters used can recognise these since have the same frequency distribution as the original text 45

46 Transposition Ciphers Transposition Techniques Ciphertext:  TTNAAPTMTSUOAODWCOIXKNLYPETZ 46 Key4312567 plainattackp ostpone duntilt woamxyz

47 Rotor Machines Before modern ciphers, rotor machines were most common product cipher were widely used in WW2 ▫German Enigma, Allied Hagelin, Japanese Purple Implemented a very complex, varying substitution cipher Used a series of cylinders, each giving one substitution, which rotated and changed after each letter was encrypted with 3 cylinders have 26 3 =17576 alphabets 47

48 Three-rotor Machine 48

49 Steganography An alternative to encryption Hides existence of message ▫using only a subset of letters/words in a longer message marked in some way ▫using invisible ink ▫hiding in LSB in graphic image or sound file Has drawbacks ▫high overhead to hide relatively few info bits 49

50 Relative Techniques Character marking Invisible ink Pin punctures Typewriter correction ribbon 50

51 Example of Steganography 51


Download ppt "Information Security and Management 2. Classical Encryption Techniques Chih-Hung Wang Fall 2011 1."

Similar presentations


Ads by Google