Skip to content

Implementation of the Miller-Rabin primality test.

License

Notifications You must be signed in to change notification settings

fabiospampinato/crypto-miller-rabin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crypto Miller-Rabin

Implementation of the Miller-Rabin primality test.

Install

npm install --save crypto-miller-rabin

Usage

import isProbablyPrime from 'crypto-miller-rabin';

// Check if a bigint is probably prime, performing 8 rounds of Miller-Rabin tests

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

License

MIT © Fabio Spampinato