February 26, 2002
Practical Aspects of Modern Cryptography
49
Testing Primality
n
n
Recall Fermat’s Little Theorem
n
n
If
p
is prime, then
a
(
p
-1)
mod
p
= 1
for
all
a
in the range
0 <
a
<
p
.