3 ms·
Generate 512-bit prime numbers in Javascript
- ye 13y agoThe algorithm uses non-deterministic Miller–Rabin primality test. It generates (probable) primes with very high degree of certainty, so practically it should never generate a non-prime. It uses the standard browser crypto.getRandomValues() function. Works faster in Chrome.