Mod4 Publickey Encryption
Mod4 Publickey Encryption
2
Confidentiality
3
Authentication
4
Authentication cont…
To be more efficient
Each document must be kept in the plaintext for
practical purpose
A copy must be stored in ciphertext for verification in
case of a dispute
OR
5
Confidentiality & Authentication
6
Requirement for public-key cryptology
Encryption is easy
Decryption: recover x using S and a
It is difficult
8
Example
a = (1, 3, 2, 5)
S=3
What is x?
x = 1010 or x = 0100
m > ai ’
gcd (w, m) = 1
Construct a hard knapsack vector a, where
a = w . a’ mod m
10
Knapsack algorithm
Choose a superincreasing vector a’ (private)
Choose an integer m larger than ai’ (private)
Choose an integer w relatively prime to m (private)
Calculate w-1 the inverse of w (modulo m) (private)
Calculate a = w. a’ (mod m) (public)
11
Knapsack algorithm cont…
Encryption
S=a.x
Decryption
12
RSA (Rivest-Shamir-Adleman) Algorithm
13
14
Algorithm Description
C = Me mod n
15
C = Me mod n
16
Requirements to be public-key encryption
17
Detail Algorithm
18
Two Issues
19
Efficient Exponentiation
20
Demo RSA
www-cs-students.stanford.edu/~tjw/jsbn/rsa2.html
islab.oregonstate.edu/koc/ece575/02Project/Mor/
21