YALE UNIVERSITY
DEPARTMENT OF COMPUTER SCIENCE
CPSC 467a: Cryptography and Computer Security
Professor M. J. Fischer
Handout #16
November 1, 2005
Problem Set 6
Due in class on Tuesday, November 8, 2005.
In the problems below, "textbook" refers to Introduction to
Cryptography with Coding Theory: Second Edition by Trappe and
Washington..
Problem 27: Primality Testing
Implement the Miller-Rabin primality testing algorithm so as to handle
numbers at least 256 bits long. As usual, your program should be
writtein in C, C++, or Java and should use one of the suggested big
number libraries. If your library already contains a probabilistic
primality tester, do not use it (except for checking) -
implement your own instead. But it's okay to use built-in
implementations of modular exponentiation, random number generators,
and the other arithmetic functions and predicates.