Cryptograpy - PowerPoint PPT Presentation

About This Presentation
Title:

Cryptograpy

Description:

Let the key be K=7, encrypt: UCLA BRUINS. convert letters to integers using chart: ... UCLA BRUINS. Shift Cipher, any Good? Nope! Fails security property. ... – PowerPoint PPT presentation

Number of Views:25
Avg rating:3.0/5.0
Slides: 21
Provided by: rfur
Category:

less

Transcript and Presenter's Notes

Title: Cryptograpy


1
Cryptograpy
  • By Roya Furmuly

9
O
D
I
C
S
L
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
    doesnt 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 K eK E and a
    corresponding dK D. Each eKP C and dKC
    P are 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
    equal x2
  • Bob doesnt 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 not present
    or through a secure channel).
  • Alice
  • Message xx1x2...xn where i in (1,n),
    xi in P
  • encrypts each xi using encryption rule yi
    eK(xi) yy1y2yn
  • Bob uses decryption function dK(yi)xi

    xx1x2...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)xK mod 26
  • and
  • dK(y)y-K mod 26 (x,y
    in Z26)
  • cool fact for K3, cryptosystem is
    called the Caesar Cipher.


10
Shift Cipher (contd)
  • 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
Lets Encrypt!
  • Let the key be K7, 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
Lets 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 K125, until get a text that makes sense.

14
Vigenere Cipher
  • Let mgt0 be fixed. Let P C K (Z26)m
  • For a key K(k1,k2,km) define
  • eK(x1,x2,,xm)(x1k1, x2k2,,xmkm)
  • and
  • dK(y1,y2,,ym)(y1-k1, y2-k2,,ym-km)
  • all operations done in Z26

15
Lets Encrypt!
  • Let keyhot(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
Lets 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 m5, 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 Cipherinsecure (small keyspace)
  • Vigenere Cipherless insecure
  • Complicated Cryptosystems
  • DES, RSA, ENIGMA

20
WKH HQG
Write a Comment
User Comments (0)
About PowerShow.com