code: function bnpMillerRabin(t) {
  var n1 = this.subtract(BigInteger.ONE);
  var k = n1.getLowestSetBit();
  if(k <= 0) return false;
  var r = n1.shiftRight(k);
  var prng = bnGetPrng();
  var a;
  for(var i = 0; i < t; ++i) {
   // select witness 'a' at random from between 1 and n1
   do {
     a = new BigInteger(this.bitLength(), prng);
   }
   while(a.compareTo(BigInteger.ONE) <= 0 || a.compareTo(n1) >= 0);
   var y = a.modPow(r,this);
   if(y.compareTo(BigInteger.ONE) != 0 && y.compareTo(n1) != 0) {
     var j = 1;
     while(j++ < k && y.compareTo(n1) != 0) {
       y = y.modPowInt(2,this);
       if(y.compareTo(BigInteger.ONE) == 0) return false;
     }
     if(y.compareTo(n1) != 0) return false;
   }
  }
  return true;
  }
docs: (protected) true if probably prime (HAC 4.24, Miller-Rabin)