This document discusses public key cryptography and the RSA algorithm. It explains that prime numbers are divisible only by 1 and themselves, and any other number can be factored into prime numbers. The discrete logarithm problem involves finding the exponent given the result. RSA uses public and private keys based on prime numbers to encrypt and decrypt messages securely, even when the keys are shared publicly. The private key is based on the totient function and modular inverse to decrypt the ciphertext into plaintext.
3. Any number
other than prime
are broken to
prime.
A group of
smaller prime
number
Factorization
involves set of
prime numbers
to bring back the
number
Prime factors are
unique
Prime Number
What is it made of ?
Factorization
Friday, 28 March 20143
4. Discrete Logarithm Problem
46 mod 12 Ξ 10
3n mod 17 Ξ Equally
likely
with in 17
Modulus of any
given number with
any exponent is
equally likely
Friday, 28 March 20144
5. Friday, 28 March 20145
32 mod 17 Ξ 9
33 mod 17 Ξ 10
34 mod 17 Ξ 13
35 mod 17 Ξ 5
36 mod 17 Ξ 15
37 mod 17 Ξ 11
38 mod 17 Ξ 16
39 mod 17 Ξ 14
310 mod 17 Ξ 8
311 mod 17 Ξ 7
Equally likely……!
Discrete
Logarithm
problem
(one way
function)
Is to find the exponent given
the resultant value
Eg : given 7 to find the
exponent of 3
You may find it easy with
smaller prime numbers….
It would take years to find if the
prime number was 100 digits
long…..
Strength of this one way
function is the time needed to
compute
6. Friday, 28 March 20146
Sender
Intruder/eavesdropper
Receiver
Public distribution of generator ‘g’ and prime number ‘p’
gn mod p Ξ c
315 mod 17 Ξ 6 313 mod 17 Ξ 12
3, 17
3, 17
3,17
g = 3
p = 17
Spr= 15
Rpu= 12
Rpr= 13
Spu= 6
Sender selects his private ‘n’ to generate his public key and
distributes it to all
Receiver keeps sender’s public key and selects his private
key ‘n’ and sends back his public key to all
THE CRUX NOW!!Sender = Rpu
Spr mod 17 = Actual Secret Key 10
Receiver = Spu
Rpr mod 17 = Actual Secret Key 10
7. Friday, 28 March 20147
The Story behind the logic
1215 mod 17 Ξ 10
12 Ξ 313 mod 17
313^15 mod 17 Ξ 10
Spr= 15
Rpu= 12
Rpr= 13
Spu= 6
Sender Receiver
613 mod 17 Ξ 10
6 Ξ 315 mod 17
315^13 mod 17 Ξ 10
Without any of the private keys, intruder or eavesdropper
cannot access the secret key.
It requires huge computation power to find it
8. Thanks to Diffie –
Hellman
Who devised the
algorithm to
share keys in
public
Public Key
Cryptography
Thus the sharing of the keys
between any unknown person
is made
Friday, 28 March 20148
Complexities
What if there are
multiple
receivers
Key
management
problem
Computation
overhead
9. Friday, 28 March 20149
Ronald Rivest
Adi Shamir
Leonard
Adleman
You know us all by name
10. Friday, 28 March 201410
Sender Receiver
Intruder
R wants to send ‘89’
p1 = 53
p2 = 59
n = 53 * 59
n = 3127
(n) = 3016 by totient
e = 3
d = 2011
Exponent e
- Odd
- Not a factor of (n)
Calculated by modular
Inverse using Euclidean
Algorithm
d = (k * (n) + 1)/e
Hide eth
except
n = 3127
e = 3
n = 3127
e = 3
n = 3127
e = 3
n = 3127
e = 3
c = 1394
1394d Ξ 89 mod 3127
Message = 89
893 mod 3127 Ξ 1394
Crypt c = 1394
c = 1394
11. Friday, 28 March 201411
In 1970 James
Alice, a British
Engineer, devise
d a plan.
‘A’ Sends an
open lock to
all, let those who
wish to send
message may
lock it and send
back.
‘A’ opens all
locks with his one
and only key
RSA
Foundation of RSA
To resolve computational
complexityy
Key Management
12. Friday, 28 March 201412
Multiplication is
easy to perform
(computer takes
less than
seconds to do it)
Instead finding
factors of given
numbers is hard.
(for larger
numbers days
and years)
factorizor
RSA
Foundation of RSA
To resolve computational
complexityy
Key Management
13. Friday, 28 March 201413
PHI function is
to measure the
breakability of
the number;
Where it is less
than ‘n’ and not
a factor of ‘n’
(Prime) = P-1
(7) =6
RSA
Foundation of RSA
To resolve computational
complexityy
Key Management
14. Totient of a number
When n is a product of two primes, in
arithmetic operations modulo n, the
exponents behave modulo the totient
φ(n) of n
15 = 3 x 5
φ(15) = 8
Relation
(43)5 mod 15 Ξ 4(3x5)mod 8 mod 15 Ξ 47 mod 15
Friday, 28 March 201414
15. Connection bw PHI φ function
and Modular exponentiation
Connection
mφ(n) Ξ 1 mod n
let us assume any two numbers such that
they do not share any common factors
m = 5 and n = 8
5φ(8) Ξ 1 mod 8
Friday, 28 March 201415
16. Connection bw PHI φ function
and Modular exponentiation
Breakthrough
a. 1k = 1
b. m* 1k = m
based on the above propositions
mφ(n) Ξ 1 mod n can be written as
mk*φ(n) Ξ 1 mod n using (a)
m*mk*φ(n) Ξ m mod n using (b)
Finally we get
mk*φ(n)+1 Ξ m mod n
Friday, 28 March 201416
17. Friday, 28 March 201417
Sender Receiver
Intruder
R wants to send ‘89’
p1 = 53
p2 = 59
n = 53 * 59
n = 3127
(n) = 3016 by totient
e = 3
d = 2011
Exponent e
- Odd
- Not a factor of (n)
Calculated by modular
Inverse using Euclidean
Algorithm
d = (k * (n) + 1)/e
Hide eth
except
n = 3127
e = 3
n = 3127
e = 3
n = 3127
e = 3
n = 3127
e = 3
c = 1394
1394d Ξ 89 mod 3127
Message = 89
893 mod 3127 Ξ 1394
Crypt c = 1394
c = 1394
18. QUERIES ?
Just a sec …
Khan Videos on Cryptography
https://engineering.purdue.ed
u/kak/compsec/NewLectures/
Lecture12.pdf
Friday, 28 March 201418
19. Friday, 28 March 201419
Confidential
communication
An individual
can use (e,n)
and (d, n) as
public and
private keys
respectively.
If the message is
long, it could be
used as block
cipher to reduce
the size
Usage of RSA
Choice of values, keys, primes