Some references on polynomial time primality testing
Agrawal-Kayal-Saxena:
PRIMES is in P
(
PDF
)
Bernstein:
Proving primality after Agrawal-Kayal-Saxena
(
PDF
,
DVI
,
PS
)
See
Mathworld
for a
huge list of references
.