1 / 20

Cryptograpy

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

jeneil
Download Presentation

Cryptograpy

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  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? • Alice encrypts the information (Plaintext), using a predetermined key, then sends the result (Ciphertext) to Bob. • Oscar cannot determine the plaintext because he doesn’t know the key. • 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 KeK Eand a corresponding dK D.Each eK:P Cand dK:C Pare functions such that dK(eK(x))=x x P.

  5. Observations • The encryption function eK must be injective to avoid ambiguity. i.e. if y= eK(x1)= eK(x2) where x1 not equalx2 Bob doesn’t know whether y= x1 or y= x2 • If P = C, then the encryption function is a permutation.

  6. Protocol • Choose random key K in K(when Oscar notpresent or through a secure channel). • Alice Message: x=x1x2...xn wherei in (1,n), xi inP encrypts each xi using encryption rule yi= eK(xi) y=y1y2…yn • Bob uses decryption function dK(yi)=xi x=x1x2...xn

  7. Diagram Oscar Oscar x y x Alice encrypter decrypter Bob K key source

  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 = Z26. eK(x)=x+K mod 26 and dK(y)=y-K mod 26 (x,y in Z26) cool fact: for K=3, cryptosystem is called the Caesar Cipher.

  10. Shift Cipher (cont’d) • 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? • Nope! Fails security property. • Keyspace is very small, only 25 possible keys. • Can easily be deciphered by an exhaustive key search. • Try K=1…25, until get a text that makes sense.

  14. Vigenere Cipher Let m>0 be fixed. Let P =C =K = (Z26)m For a key K=(k1,k2,…km) define eK(x1,x2,…,xm)=(x1+k1, x2+k2,…,xm+km) and dK(y1,y2,…,ym)=(y1-k1, y2-k2,…,ym-km) *all operations done in Z26

  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? • Better than Shift Cipher • Possible number of keys of length m is (26)m • Say m=5, then keyspace size is (26)5 approx 1.1x107 • So, exhaustive key search not feasible by hand (but OK by computer).

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

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

  20. WKH HQG

More Related