CS103A
HO #39
RSA
2/20/08
2
We want a function E(m,
K
e
) which converts a
message m into some ciphertext c which appears
meaningless to any observer—E(m,
K
e
) must be a
one-way
function.
Alice (or anybody else) can use this function to
encrypt her message before sending it to Bob.
Of course, Bob must be able to apply some secret
function D(c,
K
d
) to recover m—For any m, it must
hold that m = D(E(m,
K
e
),
K
d
).
What we need is called a
trapdoor
function.
RSA Cryptography: Motivation
Recall that
f(
x
)
≡
g
x
(mod p)
is an effective one-way function, with a fixed g
and prime modulus p.
Unfortunately, this is believed to be very difficult
to invert for anybody.
(There are no known trapdoors)
RSA Cryptography: Motivation
What about
f(
x
) =
x
e
(mod N)
with a fixed e and composite
modulus N?
RSA Cryptography: Motivation
What about
f(
x
) =
x
e
(mod N)
with a fixed e and composite
modulus N?
This function is one-way, for carefully chosen e, N,
and yet it has a trapdoor!
RSA Cryptography: Motivation
To understand why, we will need
the
Euler totient
(or
ϕ
) function.
For any n,
ϕ
(n) is defined as the
number of positive integers x in
the range 1
≤
x
≤
n such that
x
⊥
n.
(Note: x
⊥
n is shorthand for “x
and n are relatively prime”)
ϕ
(15) = 8
since {1, 2, 4, 7, 8, 11, 13,
14} are
⊥
15
Leonhard Euler 1707-1783
RSA Cryptography: Mathematical Principles
Theorem #1:
If p is prime, then
ϕ
(p) = p – 1.
Theorem #2:
If x = p
n
for some prime p,
then
ϕ
(x) = p
n
– p
n-1
.
Theorem #3:
If x = m
⋅
n, with m
⊥
n,
then
ϕ
(x) =
ϕ
(m)
⋅ϕ
(n).
RSA Cryptography: Mathematical Principles