Академический Документы
Профессиональный Документы
Культура Документы
RSA Step 1
Choose two distinct large random prime
numbers p and q,
e.g. p = 17 and q = 11
Let n = p*q, e.g. n=17*11=187
Choose e such that
and e and
are coprime
is Eulers totient
Eulers Totient
the totient (n) of a positive integer n is
defined to be the number of positive
integers less than or equal to n that are
coprime to n.
(9)=6 because the six numbers 1, 2, 4, 5,
7 and 8 are coprime to 9
RSA Step 2
e.g. e = 7 thus 7 and (17-1)*(11-1) = 160
are coprime
e can be published as the public-key
exponent
n is the modulus
RSA - Encryption
A cyphertext C can be created from a
message M using the formula
C = Me(mod n)
Example: Message M is X
in ASCII 1011000 or 88 in decimal
C = 887(mod 187) = 11
RSA - Decryption
Modulus operation is a one way function
Given only the public-key (7,187) the only
way to decrypt is through brute-force i.e.
try all possible keys
This problem is simplified because you
know how the private-key is created.
RSA- Private-key
The decryption key d is created with the
following formula
e*d = 1(mod(p-1)*(q-1))
e.g 7*d=1(mod(16*10))
7d = 1 (mod 160)
d = 23 using Euclids algorithm
RSA - Decryption
Now we have our private-key (d,n) e.g.
(23,187)
M = Cd (mod n)
M = 1123 (mod 187)
M = [111 (mod 187)*112 (mod 187)*114 (mod
187)*1116 (mod 187)](mod 187)
M = 11*121*55*154 (mod 187)
M = 88 = X
RSA - Cryptanalysis
RSA Problem