{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# 05_public - Public Key Encryption Karl-Johan Grinnemo...

This preview shows pages 1–14. Sign up to view the full content.

1 Public Key Encryption Karl-Johan Grinnemo [email protected] 2004 Created by Dr. Johan Montelius 2005 – 2007 Revised by Dr. Johan Montelius and Dr. Jon-Olov Vatn 2009 Revised by Dr. Karl-Johan Grinnemo

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 Symmetric Encryption • Also known as: Shared key encryption Secret key encryption Same key for encryption and decryption Sender and receiver need to agree on a key ----- ----- ----- Plaintext input Encryption Decryption ----- ----- ----- Plaintext output Ciphertext Shared, secret key
3 Public Key Encryption (PKE) plaintext message, m ciphertext encryption algorithm decryption algorithm Bob’s public key plaintext message K (m) B + K B + Bob’s private key K B - m = K ( K (m) ) B + B -

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
4 Requirements on Public-Key Algorithms • K - (K + (Plaintext)) = Plaintext It is exceedingly difficult to deduce K - from K + • K + cannot be broken by a chosen plaintext attack
5 The Modulo Operator a = b (mod n) a = b + ξn, ξ is an integer For example: 1 = 13 (mod 12) (modular arithmetic ”clock” arithmetic) 1 = 13 + (– 1) × 12 14 = 38 (mod 12) 14 = 38 + (- 2) × 12 -3 = 2 (mod 5) -3 = 2 + (-1) × 5 a = b (mod n) same remainder when divided by n

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
6 Modular Addition • Definition: a + b (mod n) = a + b if a + b < n a + b (mod n) = (a + b) – floor((a + b)/n) × n otherwise Example: a + b (mod 4) For example: 12 + 13 (mod 4) = 26 – 6 × 4 = 2 0 1 2 3
7 Modular Addition for PKE Encryption: add recipients public key to plaintext – K + (m) = m + ξ (mod n), ξ is an Integer Decryption: add recipients private key to ciphertext m = K - (K + (m)) = m + ξ + ξ -1 (mod n)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
8 Requirements on Modular Addition from PKE Needs to be one-to-one (injective function) If a + b = c (mod n) and d + b = c (mod n) then a = d (a < n, b < n) Needs to have an additive inverse a + a -1 = 0 1 + 2 2 + 3 3 + 5 3 5 8 12 1 + 2 2 + 3 3 + 5 3 5 8 12 Injective function Non-injective function
9 Example PKE using Modular Addition • Let K + (m) = m + 3 (mod 26), then K - (m) = K + (m) + 23 (mod 26) 3 + 23 (mod 26) = 0 This is a monoalphabetic substitution cipher (Caesar cipher) • Example: plaintext = ”secret” 19,5,3,18,3,20 (position in the alphabet) Encrypted plaintext: 22,8,6,21,6,23 (e.g., 19 + 3 (mod 26) = 22) Decrypted plaintext: 19,5,3,18,3,20 (e.g., 22+23 (mod 26) = 19)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
10 Modular Multiplication • Definition: – a × b (mod n) = a × b if a × b < n – a × b (mod n) = a × b – floor((a × b)/n) × n Example: a × b (mod 4) 1 2 3 0 3 2 0 2 0 2 3 2 1 0 1 0 0 0 0 0 3 2 1 0 × a b
11 Requirements on Modular Multiplication from PKE Needs to be one-to-one Needs to have a multiplicative inverse – a × a -1 = 1 Example: a × b (mod 4) 1 2 3 0 3 2 0 2 0 2 3 2 1 0 1 0 0 0 0 0 3 2 1 0 × No multiplicative inverse Not one-to-one b a

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
12 Example PKE using Modular Multiplication • Let K + (m) = m × 3 (mod 4), then K - (m) = K + (m) × 3 (mod 4) – 3 × 3 (mod 4) = 1 • Example: plaintext = 1,2,2,3,0 Encrypted plaintext: 3,2,2,1,0 (e.g., 1 × 3 (mod 4) = 3) Decrypted plaintext: 1,2,2,3,0 (e.g., 3 × 3 (mod 4) = 1)
13 Prime and Relatively Prime Definition ( Prime ): An integer ξ > 1 is prime if its only divisors are 1 and ξ.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 39

05_public - Public Key Encryption Karl-Johan Grinnemo...

This preview shows document pages 1 - 14. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online