Asymmetric - Key Cryptography

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 16

Cryptography(CS F463)

BITS Pilani Dr. Raja Muthalagu


Dubai Campus Department of Computer Science
Chapter 9- Asymmetric-Key Cryptography

BITS Pilani, Dubai Campus


Keys
Asymmetric key cryptography uses two separate keys: one
private and one public.

Figure 10.1 Locking and unlocking in asymmetric-key cryptosystem

10.3
BITS Pilani, Dubai Campus
General Idea

Figure 10.2 General idea of asymmetric-key cryptosystem

10.4
BITS Pilani, Dubai Campus
Plaintext/Ciphertext
Unlike in symmetric-key cryptography, plaintext and
ciphertext are treated as integers in asymmetric-key
cryptography.
Encryption/Decryption
C = f (Kpublic , P) P = g(Kprivate , C)
Figure 6.1 Encryption and decryption with DES

Symmetric
Key
10.5
BITS Pilani, Dubai Campus
RSA CRYPTOSYSTEM

The most common public-key algorithm is the RSA


cryptosystem, named for its inventors (Rivest, Shamir,
and Adleman).

Topics discussed in this section:


10.2.1 Introduction
10.2.2 Procedure
10.2.3 Some Trivial Examples
10.2.4 Attacks on RSA
10.2.5 Recommendations
10.2.6 Optimal Asymmetric Encryption Padding (OAEP)
10.2.7 Applications
10.6
BITS Pilani, Dubai Campus
Introduction

Complexity of operations in RSA

10.7
BITS Pilani, Dubai Campus
Procedure

Encryption, decryption, and key generation in RSA

10.8
BITS Pilani, Dubai Campus
Continued

Two Algebraic Structures

Encryption/Decryption Ring: R = <Zn , +, × >

Key-Generation Group: G = <Z (n)∗, × >

10.9
BITS Pilani, Dubai Campus
10.2.2 Continued

10.10
BITS Pilani, Dubai Campus
10.2.2 Continued

Encryption

10.11
BITS Pilani, Dubai Campus
10.2.2 Continued

Decryption

10.12
BITS Pilani, Dubai Campus
10.2.3 Some Trivial Examples
Example 10. 5
Bob chooses 7 and 11 as p and q and calculates n = 77. The
value of (n) = (7 − 1)(11 − 1) or 60. Now he chooses two
exponents, e and d, from Z60∗. If he chooses e to be 13, then
d is 37. Note that e × d mod 60 = 1 (they are inverses of each
Now imagine that Alice wants to send the plaintext 5 to Bob.
She uses the public exponent 13 to encrypt 5.

Bob receives the ciphertext 26 and uses the private key 37 to


decipher the ciphertext:

10.13
10.2.3 Some Trivial Examples
Example 10. 6

Now assume that another person, John, wants to


send a message to Bob. John can use the same
public key announced by Bob (probably on his
website), 13; John’s plaintext is 63. John calculates
the following:

Bob receives the ciphertext 28 and uses his private key 37 to


decipher the ciphertext:

10.14
10.2.3 Some Trivial Examples
Example 10. 7

Jennifer creates a pair of keys for herself. She


chooses p = 397 and q = 401. She calculates
n = 159197. She then calculates (n) = 158400. She
then chooses e = 343 and d = 12007. Show how Ted
can send a message to Jennifer if he knows e and n.

Suppose Ted wants to send the message “NO” to


Jennifer. He changes each character to a number
(from 00 to 25), with each character coded as two
digits. He then concatenates the two coded
characters and gets a four-digit number. The plaintext
is 1314. Figure 10.7 shows the process.
10.15
10.2.3 Continued

Figure 10.7 Encryption and decryption in Example 10.7

10.16

You might also like