• Alice: Computes m
bob
mod n = c
d
mod n = (m
e
)
d
mod n. The correctness
of this statement will be established by Fermat’s Little Theorem.
The underlying goal here is to show that Alice can compute λ(n) efficiently,
while an adversary cannot, and that the decryption protocol is correct. This
analysis will borrow the use of Euler’s Theorem for efficient (in P) construction
of an inverse from our previous analysis of the El-Gamal protocol.
RSA Protocol (Analysis)
We will show that attempting to compute λ(n) is inefficient (for the adversary),
that is, it is in NP, thereby, not allowing the adversary to realize the value of d,
given access to e. We will also show that it is efficient for Alice to compute this
value of λ(n), and that the protocol is correct, which will be seen as a corollary
of Fermat’s Little Theorem.
Theorem 1: Decrypting a message in the RSA protocol is in P .
Proof: To prove this, we merely need to show that the construction of d ∈
P for Alice. We note here that m = λ(n) = λ(p · q) = lcm(λ(p), λ(q)) =
lcm(p − 1, q − 1) = (p − 1) · (q − 1) · (1/gcd(p, q)), where, gcd(p, q) can be
efficiently (in P) computed using the Euclidean Divisor Algorithm. Now, bor-
rowing from our previous analysis using Euler’s Theorem, the inverse of e
mod m becomes e
m−2
mod m which, on substituting for m, yields: (e
λ(n)−2
)
mod λ(n) = (e
(p−1)·(q−1)·(1/gcd(p,q))−2
) mod λ(n) = d mod λ(n), which (again,
by our previous analysis) is in P. This follows because Z
×
λ(n)
is a multiplicative,
abelian group.
Theorem 2: Decrypting a message in the RSA protocol is in-feasible, or equiv-
alently, computing d given (e, n) ∈ NP for an adversary.
Proof: The goal of the adversary is to decrypt c = (m
bob
)
e
mod n, given (e, n).
Note that, in order to do this, the adversary needs to compute λ(n), otherwise
the adversary cannot construct d. To do so, the adversary needs to prime-
factorize λ(n) = lcm(
s
i=1
(λ(p
i
))
r
i
. The adversary, however, has no knowledge
of p, q, which are chosen at random. Therefore, the adversary must construct
the Integer Factorization of n. However, it is known to be the case that Integer-
Factorization ∈ NP.
Theorem 3: (e, λ(n)) = 1 ∧ d · e = 1 mod λ(n) =⇒ (m
e
)
d
mod n =
m.
Proof: This proof relies on Fermat’s Little Theorem, which states the fol-
lowing:
• Fermat’s Little Theorem: Given p → prime, st, p |a, a
p−1
= 1 mod p.
Noticing that λ(n) = lcm(p − 1, q − 1), we see that, λ(n) = a(p − 1) and
λ(n) = b(q−1) for some a, b ∈ Z. As d·e = 1 mod λ(n), we see that λ(n)|(ed−1).
Noticing that λ(n) can be expressed as multiples of (p − 1) and (q − 1), we can
conclude via transitivity that (p − 1)|(ed − 1) and (q − 1)|(ed − 1). This allows
6