Miller-Rabin Tools

The following are tools to perform a Miller-Rabin Primality Test

Setup an integer n to test and a base a

Determine how many 2’s are in something

Compute modular powers

Extra box