HTW Berlin Medieninformatik

HTW Berlin
Fachbereich 4
Internationaler Studiengang
Internationale Medieninformatik (Bachelor)
Aktuelle Themen: Cryptography
Winter Term 2013/14

Lab 9: Rabin-Miller programming


  1. Implement the Rabin-Miller algorithm for testing the primality of numbers that are probably prime using the algorithm from the lecture!
  2. Generate 100 numbers of length of at least 512 bits that your Rabin-Miller algorithm reports to be prime with a certainity level of 5. How many numbers did you have to generate in order to get 100? Now repeat the test for the certainity levels 8, 16, 32, 64 using the same seed for your random number generator. Create a table with the results.
  3. How many of the numbers generated at level 5 are no longer in the list for 64? What does BigInteger.isProbablePrime say?


Copyright 2013 Dr. Hermann Thiel & Prof. Dr. Debora Weber-Wulff – CC-BY-NC-SA

This material is jointly prepared by Dr. Hermann Thiel and Prof. Dr. Debora Weber-Wulff. Some of the material may come from other sources and is denoted by the copyright notices on the individual pages.