diff options
author | tomsmeding <tom.smeding@gmail.com> | 2016-10-06 20:20:49 +0200 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2016-10-06 20:20:49 +0200 |
commit | 053d2e76ad5848c8d95d7d56bfe7f8a6a324c229 (patch) | |
tree | 0c7c16fc80d00d42913fc24d06f82794c8a6b944 /primes.h | |
parent | 98c5cb7a99222b3dc2d78468bd953a4a4a4142d7 (diff) |
RNG
Diffstat (limited to 'primes.h')
-rw-r--r-- | primes.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -9,11 +9,11 @@ extern std::vector<int> smallprimes; void fillsmallprimes(); //for use in RSA (pass target number of bits of N) -std::pair<Bigint,Bigint> genprimepair(int nbits); +std::pair<Bigint,Bigint> genprimepair(Rng &rng,int nbits); //finds random in range [low,high]; throws range_error("No primes") if no prime found //Will call fillsmallprimes() if not yet done -Bigint randprime(const Bigint &low,const Bigint &high); +Bigint randprime(Rng &rng,const Bigint &low,const Bigint &high); //checks Fermat [pseudo- or actual] primality bool strongPseudoPrime2(const Bigint &n); |