I've been reading the previous weeks' news threads, and I would like to be certain that I understand how PGP tests for primality of large positive integers. The way I have interpreted it is the number is passed through the Fermat test 4 times, then it is run through the Miller-Rabin test and if it passes that the number is considered to have an extremely high chance of primality. I would also like to know where I can obtain some C Source code of the Fermat and Miller-Rabin algorithms.
Any help is appreciated.