You are on page 1of 26

Rachana Y.

Patil

1
Symmetric and asymmetric-key cryptography will
exist in parallel and continue to serve the
community. We actually believe that they are
complements of each other; the advantages of one
can compensate for the disadvantages of the other.

Symmetric-key cryptography is based on sharing secrecy;


asymmetric-key cryptography is based on personal secrecy.
10.
2
Asymmetric key cryptography uses two separate keys:
one private and one public.
Locking and unlocking in asymmetric-key cryptosystem

10.
3
General idea of asymmetric-key cryptosystem

10.
4
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)

10.
5
The most common public-key algorithm is the
RSA cryptosystem, named for its inventors
(Rivest, Shamir, and Adleman).

07/20/10
10.7
Encryption, decryption, and key generation in RSA

Multiplicative Group

Commutative Ring 10.8


10.9
Encryption

10.10
Decryption

10.11
Example

Bob chooses 7 and 11 as p and q and calculates n = 77. The


value of f(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.12
Example

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.13
Example

1. n=221 e=5 find d

2. p=19 q=23 e=3 find Ø(n) and d

3. e=17 n=187 find d

4. n=19519 e=17 find d

07/20/10
Example

• Alice (5,119)
Bob(17,3233)

• Find private key of both

• If Alice want to send plaintext message 10 to bob


calculate Ciphertext

• Show how bob can retrieve the plaintext back.

07/20/10
May 2012
• Using RSA Algorithm ,encrypt the following
• 1. p=3 ,q=11,e=7 ,M=12

• 2. p=7 ,q=11,e=17,M=25

• 3. Find the corresponding d for 1 and 2 and


decrypt the ciphertext

07/20/10
Dec 2010
• In RSA system the public key of a given user is e=7
and n=187

• What is the private key of this receiver?

• If the intercepted cipher text is c=11 and sent to a


user whose public key is e=7 and n=187.what is
the plaintext?

07/20/10
Example

• Alice’s public key is (17,321) and Bob’s public key is


(5,321).Assume that no one knows the private keys but the
original owners.

• Encrypt the message M=7 using Bob’s public key.


• What should alice have to do to encrypt the message
from previous part.
• What should bob have to do to decrypt the message
• What is Alice’s private key
• What is bob’s private key.

07/20/10
Example
• A uses RSA algorithm and declares his public key
(e,n) as (13,77).B decrypts message m with A’s
public key and sends it to A. the cipher text
received by A is 26 .show how A can decrypt it to
get the original plaintext. What is A’s private key
and original message .can we have different
values for A’s private key.

07/20/10
Knapsack Cryptosystem
Definition
a = [a1, a2, …, ak ] and x = [x1, x2, …, xk].

Given a and x, it is easy to calculate s. However, given s


and a it is difficult to find x.

Superincreasing Tuple

ai ≥ a1 + a2 + … + ai−1
10.20
10.21
Example

Assume that a = [17, 25, 46, 94, 201,400] and s = 272 are
given. Table 10.1 shows how the tuple x is found using
inv_knapsackSum routine in Algorithm 10.1. In this case x = [0,
1, 1, 0, 1, 0], which means that 25, 46, and 201 are in the
knapsack.

10.22
Secret Communication with Knapsacks.

10.23
Example

• b = [7,11,19,39,79,157,313]
• n = 900
• r = 37
• Permutation table= [4,2,5,3,1,7,6]
• Encrypt the message “g” (ASCII value 103)
• Find Ciphertext
• Decrypt the ciphertext to get plaintext back

10.24
Example

• b = (2,3,7,14,30,57,120,251)
• n = 491
• r = 41
• Permutation table= [4,2,5,3,1,7,6,8]
• Encrypt the message 10010110
• Find Ciphertext
• Decrypt the ciphertext to get plaintext back

10.25
07/20/10

You might also like