














Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!















M C = f(M) = Me^ mod N C
M = f-1(C) = Cd^ mod N
N = P ⋅ Q P, Q - large prime numbers
e ⋅ d ≡ 1 mod ((P-1)(Q-1))
message ciphertext
PUBLIC KEY (^) PRIVATE KEY
e ⋅ d ≡ 1 mod ((P-1)(Q-1))
P, Q - large prime numbers
gcd(e, P-1) = 1 and gcd(e, Q-1) = 1
d:
e:
Z – integers
∈ - belongs to (^) ∉ - does not belong to
a | b a divides b a is a divisor of b
a | b a does not divide b a is not a divisor of b
Greatest common divisor of a and b , denoted by gcd( a , b ) ,
is the largest positive integer that divides both a and b.
d = gcd ( a , b ) iff 1) d | a and d | b
gcd (8, 44) =
gcd (-15, 65) =
gcd (45, 30) =
gcd (31, 15) =
gcd (0, 40) =
gcd (121, 169) =
Two integers a and b are relatively prime or co-prime
if gcd( a , b ) = 1
gcd ( a , b ) = gcd ( a - kb , b ) for any k ∈∈∈∈ Z
Two integers a and b are congruent modulo n ( equivalent modulo n )
written a ≡≡≡≡ b iff
a mod n = b mod n or a = b + kn , k ∈∈∈∈ Z or
n | a - b
a + b mod n = (( a mod n ) + ( b mod n )) mod n
a - b mod n = (( a mod n ) - ( b mod n )) mod n
a ⋅ b mod n = (( a mod n ) ⋅ ( b mod n )) mod n
i
…
t - t
ri
r -2 = max (a, b) r -1 = min (a, b) r 0 r 1
…
rt-1 = gcd(a, b) rt =
qi
q - q 0 q 1
…
qt-
qi = ri - ri ri +1 = ri -1 - qi ⋅⋅⋅⋅ ri
ri +1 = ri -1 mod ri
i
ri
r -2 = max (a, b) = r -1 = min (a, b) = r 0 = 18 = gcd(36, 126) r 1 = 0
qi
q -1 = 3 q 0 = 2 q 1 qi = ri - ri ri +1 = ri -1 - qi ⋅⋅⋅⋅ ri
ri +1 = ri -1 mod ri
The multiplicative inverse of a modulo n is an integer [!!!]
x such that
a ⋅⋅⋅⋅ x ≡≡≡≡ 1 (mod n )
The multiplicative inverse of a modulo n is denoted by a -1^ mod n (in some books a or a*).
According to this notation: a ⋅⋅⋅⋅ a -1^ ≡≡≡≡ 1 (mod n )
i
…
t - t
ri
r -2 = n r -1 = a r 0 r 1
…
rt-1 = 1 rt =
xi
x -2= x -1= x 0 x 1
…
xt -1 = a -1^ mod n xt = ± n
qi
q -1 =