Presentation is loading. Please wait.

Presentation is loading. Please wait.

Cryptograpy By Roya Furmuly W C I H D F O P S 1 2 3 9 L 7.

Similar presentations


Presentation on theme: "Cryptograpy By Roya Furmuly W C I H D F O P S 1 2 3 9 L 7."— Presentation transcript:

1 Cryptograpy By Roya Furmuly W C I H D F O P S 1 2 3 9 L 7

2 What Is It? Enables two people (Alice and Bob) to communicate over an insecure channel in such a way so that an opponent (Oscar) cannot understand what is being said.

3 How Does It Work? n Alice encrypts the information (Plaintext), using a predetermined key, then sends the result (Ciphertext) to Bob. n Oscar cannot determine the plaintext because he doesn’t know the key. n Bob, who knows the encryption key, decrypts the ciphertext and reconstructs the plaintext.

4 Formal Definition A Cryptosystem is a five-tuple ( P,C,K,E,D ) P = finite set of plaintexts C = finite set of ciphertexts K = finite set of keys (keyspace) For each K K e K E and a corresponding d K D. Each e K : P C and d K : C P are functions such that d K ( e K (x))=x x P.

5 Observations n The encryption function e K must be injective to avoid ambiguity. i.e. if y= e K (x 1 )= e K (x 2 ) where x 1 not equal x 2 Bob doesn’t know whether y= x 1 or y= x 2 If P = C, then the encryption function is a permutation.

6 Protocol Choose random key K in K ( when Oscar not present or through a secure channel ). n Alice Message: x=x 1 x 2...x n where i in (1,n), x i in P encrypts each x i using encryption rule y i = e K (x i ) y=y 1 y 2 …y n n Bob uses decryption function d K (y i )=x i x=x 1 x 2...x n

7 Diagram Alice encrypterdecrypter Oscar key source Bob Oscar xy K x

8 What makes a Cryptosystem practical? 1. Encryption and Decryption functions should be efficiently computable. 2. Upon seeing ciphertext y, the opponent should be unable to determine the key K used (“security”).

9 Shift Cipher Let P = C = K = Z 26. e K (x)=x+K mod 26 and d K (y)=y-K mod 26 (x,y in Z 26 ) cool fact: for K=3, cryptosystem is called the Caesar Cipher.

10 Shift Cipher (cont’d) n We encrypt English text, by the following correspondence: A 0, B 1, …, Z 25, A B C D E F G H I J K L M N O P Q R S T U V W 0 1 2 3 4 5 6 7 8 9 101112 13 14 15161718192021 22 X Y Z 23 24 25

11 Let’s Encrypt! Let the key be K=7, encrypt: UCLA BRUINS convert letters to integers using chart: 20 2 11 0 1 17 20 8 13 18 add 7 to each value, reduce mod 26: 1 9 18 7 8 24 1 15 20 25 convert to sequence of integers: BJSHIYBPUZ

12 Let’s Decrypt! BJSHIYBPUZ convert letters to integers: 1 9 18 7 8 24 1 15 20 25 subtract 7, reduce mod 26: 20 2 11 0 1 17 20 8 13 18 convert to letters: UCLA BRUINS

13 Shift Cipher, any Good? n Nope! Fails security property. n Keyspace is very small, only 25 possible keys. n Can easily be deciphered by an exhaustive key search. n Try K=1…25, until get a text that makes sense.

14 Vigenere Cipher Let m>0 be fixed. Let P = C = K = (Z 26 ) m For a key K=(k 1,k 2,…k m ) define e K (x 1,x 2,…,x m )=(x 1 +k 1, x 2 +k 2,…,x m +k m ) and d K (y 1,y 2,…,y m )=(y 1 -k 1, y 2 -k 2,…,y m -k m ) *all operations done in Z 26

15 Let’s Encrypt! Let key=hot=(7,14,19), encrypt: SUMMER IS HERE convert to integers & “add” the keyword mod 26: 18 20 12 12 4 17 8 18 7 4 18 4 7 14 19 7 14 19 7 14 19 7 14 19 ---------------------------------------------------- 25 8 5 19 18 10 15 6 0 11 6 23 ZIFTSKPGALGX

16 Let’s Decrypt! ZIFTSKPGALGX convert to integers and “subtract” the keyword hot=(7,14,19) mod 26: 25 8 5 19 18 10 15 6 0 11 6 23 7 14 19 7 14 19 7 14 19 7 14 19 -------------------------------------------------------- 18 20 12 12 4 17 8 18 7 4 18 4 SUMMER IS HERE

17 Vigenere Cipher, any Good? n Better than Shift Cipher n Possible number of keys of length m is (26) m n Say m=5, then keyspace size is (26) 5 approx 1.1x10 7 n So, exhaustive key search not feasible by hand (but OK by computer).

18 Other Cryptosystems n Data Encryption Standard (DES) Based on permutaion of 64 bits at a time. n RSA Based on difficulty of factoring large integers into primes. n Enigma Machine with rotors that shifted letters in complicated manner.

19 Summary n Cryptography allows us to communicate through insecure channels. n Shift Cipher…insecure (small keyspace) n Vigenere Cipher…less insecure n Complicated Cryptosystems DES, RSA, ENIGMA

20 WKH HQG


Download ppt "Cryptograpy By Roya Furmuly W C I H D F O P S 1 2 3 9 L 7."

Similar presentations


Ads by Google