From 053d2e76ad5848c8d95d7d56bfe7f8a6a324c229 Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Thu, 6 Oct 2016 20:20:49 +0200 Subject: RNG --- primes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'primes.h') diff --git a/primes.h b/primes.h index eb817b1..0be8aa7 100644 --- a/primes.h +++ b/primes.h @@ -9,11 +9,11 @@ extern std::vector smallprimes; void fillsmallprimes(); //for use in RSA (pass target number of bits of N) -std::pair genprimepair(int nbits); +std::pair 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); -- cgit v1.2.3-70-g09d2