Presentation is loading. Please wait.

Presentation is loading. Please wait.

Cryptography and Network Security

Similar presentations


Presentation on theme: "Cryptography and Network Security"— Presentation transcript:

1 Cryptography and Network Security
CLASSICAL ENCRYPTION TECHNIQUES

2 Classical Substitution Ciphers
letters of plaintext are replaced by other letters or by numbers or symbols Or if plaintext is viewed as a sequence of bits, then substitution involves replacing plaintext bit patterns with ciphertext bit patterns OER ASSIGNMENT RC1249_TEAM004 20-MAY-2016 2

3 Caesar Cipher earliest known substitution cipher by Julius Caesar
first attested use in military affairs replaces each letter by 3rd letter after example: meet me after the toga party PHHW PH DIWHU WKH WRJD SDUWB OER ASSIGNMENT RC1249_TEAM004 20-MAY-2016 3

4 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) OER ASSIGNMENT RC1249_TEAM004 20-MAY-2016 4

5 Cryptanalysis of Caesar Cipher
• only have 26 possible ciphers A maps to A,B...Z • could simply try each in turn • a brute force search • given ciphertext, just try all shifts of letters • do need to recognize when have plaintext • eg.. break ciphertext "GCUA VQ DTGCM" OER ASSIGNMENT RC1249_TEAM004 20-MAY-2016

6 Monoalphabetic Cipher
rather than just shifting the alphabet just shuffle (jumble) the letters arbitrarily each plaintext letter maps to a different random ciphertext letter hence key is 26 letters long Plain: abcdefghijklmnopqrstuvwxyz Cipher: DKVQFIBJWPESCXHTMYAUOLRGZN Plaintext: ifwewishtoreplaceletters Ciphertext: WIRFRWAJUHYFTSDVFSFUUFYA OER ASSIGNMENT RC1249_TEAM004 20-MAY-2016 6

7 Monoalphabetic Cipher Security
now we have a total of 26! = 4 x 10^26 keys • with so many keys, one might think it is secure • problem is with the language characteristics OER ASSIGNMENT RC1249_TEAM004 20-MAY-2016

8 English Letter Frequencies
OER ASSIGNMENT RC1249_TEAM004 20-MAY-2016

9 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 OER ASSIGNMENT RC1249_TEAM004 20-MAY-2016 9

10 Playfair Key Matrix a 5X5 matrix of letters based on a keyword
fill in letters of keyword (minus duplicates) fill rest of matrix with other letters eg. using the keyword MONARCHY M O N A R C H Y B D E F G I/J K L P Q S T U V W X Z OER ASSIGNMENT RC1249_TEAM004 20-MAY-2016 10

11 Encrypting and Decrypting
plaintext is encrypted two letters at a time if a pair is a repeated letter, insert filler like 'X’ (low probability of appearance in language) if both letters fall in the same row, replace each with letter to right (wrapping back to start from end) if both letters fall in the same column, replace each with the letter below it (again wrapping to top from bottom) otherwise each letter is replaced by the letter in the same row and in the column of the other letter of the pair Wireless Wi re le sx sz XG MK UL XA XT OER ASSIGNMENT RC1249_TEAM004 20-MAY-2016 11

12 Security of Playfair Cipher
• security much improved over monoalphabetic since have 26 x 26 = 676 digrams • would need a 676 entry frequency table to analyze (verses 26 for a monoalphabetic) and correspondingly more ciphertext • was widely used for many years by US & British military in WW1 • it can be broken, given a few hundred letters since still it has much of plaintext structure OER ASSIGNMENT RC1249_TEAM004 20-MAY-2016

13 Hill Cipher Developed by Lester Hill in 1929
The encryption algorithm takes m successive plaintext letters and substitutes for them m ciphertext letters The substitution is determined by m linear equations and is assigned a numerical value (a=0, b=1,…..,z=25) or . Or C=PK mod 26 and P= CK^-1 mod 26 OER ASSIGNMENT RC1249_TEAM004 20-MAY-2016 13

14 Hill Cipher C and P are row vectors of length 3 representing the plaintext and ciphertext.K is a 3 X 3 matrix representing the encryption key. Operations are performed on mod 26. For example, consider the plaintext: paymoremoney and The first three letters of the plaintext are represented by the vector ( ). Then( )K = ( ) mod 26 = ( ) = RRL. Continuing in this fashion, the ciphertext for the entire plaintext is RRLMWBKASPDH. . OER ASSIGNMENT RC1249_TEAM004 20-MAY-2016 14

15 Polyalphabetic Ciphers
A set of related monoalphabetic substitution rules is used 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 make cryptanalysis harder with more alphabets to guess and flatter frequency distribution Key: deceptive plaintext: wireless ciphertext: zmtiaxao OER ASSIGNMENT RC1249_TEAM004 20-MAY-2016 15

16 Vigenère Cipher In this scheme, the set of related monoalphabetic substitution rules consists of the 26 Caesar ciphers with shifts of 0 through 25. Each cipher is denoted by a key letter, which is the ciphertext letter that substitutes for the plaintext letter a. Thus, a Caesar cipher with a shift of 3 is denoted by the key value 3 OER ASSIGNMENT RC1249_TEAM004 20-MAY-2016 16

17 Example of Vigenère Cipher
Let the key be “deceptive” Plaintext be “we are discovered save yourself” key: deceptivedeceptivedeceptive plaintext: wearediscoveredsaveyourself ciphertext:ZICVTWQNGRZGVTWAVZHCQYGLMGJ OER ASSIGNMENT RC1249_TEAM004 20-MAY-2016 17

18 When expressed numerically
OER ASSIGNMENT RC1249_TEAM004 20-MAY-2016

19 Vernam Cipher and One-time Pad
Introduced by an AT&T engineer named Gilbert Vernam in 1918. The scheme uses Keyword as long as the plaintext and has no statistical relationship to it. Vernam system works on binary data with ith bit of text exclusive ored with ith bit of key to produce ith bit of cipher In one one-time pad key is used only once This scheme is unbreakable OER ASSIGNMENT RC1249_TEAM004 20-MAY-2016 19 19

20 Vernam Cipher Ci = Pi XOR Ki and Pi = Ci XOR Ki
OER ASSIGNMENT RC1249_TEAM004 20-MAY-2016

21 Transposition Cipher Mapping is performed by some sort of permutation on the plaintext letters. Example: Rail fence of depth 2 text : meet me after the toga party m e m a t r h t g p r y e t e f e t e o a t cipher: MEMATRHTGPRYETEFETEOAAT Rail fence of depth 2 OER ASSIGNMENT RC1249_TEAM004 20-MAY-2016 21 21

22 Summary Caesar Cipher Monoalphabetic Cipher Playfair Cipher
Polyphabetic Cipher Vigenère Cipher Vernam Cipher and One-time Pad Transposition Cipher OER ASSIGNMENT RC1249_TEAM004 20-MAY-2016 Cryptography -Part -I 22 22

23 Reference William Stallings, Cryptography and Network Security, 6th Edition, Pearson Education, March 2013 OER ASSIGNMENT RC1249_TEAM004 20-MAY-2016

24 THANK YOU OER ASSIGNMENT RC1249_TEAM004 20-MAY-2016


Download ppt "Cryptography and Network Security"

Similar presentations


Ads by Google