HTW Berlin Medieninformatik

HTW Berlin
Fachbereich 4
Internationaler Studiengang
Internationale Medieninformatik (Bachelor)
Aktuelles - Medien: Kryptographie
Winter Term 2010/11

Lab 10: Rabin-Miller


  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 2010 Dr. Hermann Thiel & Prof. Dr. Debora Weber-Wulff - All rights reserved.
Questions or comments: <weberwu@htw-berlin.de>

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