npm.io
1.0.1 • Published 1 year ago

crypto-miller-rabin

Licence
MIT
Version
1.0.1
Deps
2
Size
5 kB
Vulns
0
Weekly
0
Stars
2

Crypto Miller-Rabin

Implementation of the Miller-Rabin primality test.

Install

npm install crypto-miller-rabin

Usage

import isProbablyPrime from 'crypto-miller-rabin';

// Let's check if a bigint is probably prime, performing 30 rounds of Miller-Rabin tests

isProbablyPrime ( 428619803581219889005329334991561182527277683715078274359377824192296037302435017260422513n, 30 ); // => true

License

MIT Fabio Spampinato

Keywords