Skip to content

fabiospampinato/crypto-random-prime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crypto Random Prime

Generate a cryptographically-random probable prime number that passes the Miller-Rabin test with the given number of bits of entropy.

Install

npm install --save crypto-random-prime

Usage

import random from 'crypto-random-prime';

// Generate a 300-bits random prime, performing 64 rounds of Miller-Rabin tests

random ( 300, 64 ); // => 1229897812185405005544550995303702949862219513844036076668441860571526838822977324092558451n

License

MIT © Fabio Spampinato

About

Generate a cryptographically-random probable prime number that passes the Miller-Rabin test with the given number of bits of entropy.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published