A self-contained treatment of theoretically and practically important efficient algorithms for the primality problem. The text covers the randomized algorithms by Solovay-Strassen and Miller-Rabin from the late 1970s as well as the recent deterministic algorithm of Agrawal, Kayal and Saxena. The volume is written for students of computer science, in particular those with a special interest in cryptology, and students of mathematics, and it may be used as a supplement for courses or for self-study.