aboutsummaryrefslogtreecommitdiffstats
path: root/include/util.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-07-05 17:01:16 +0000
committerlloyd <[email protected]>2008-07-05 17:01:16 +0000
commit7cc2151c3944f23bd43280610b15a0cbe1b52f0a (patch)
tree261e9aa9897d946d346b9fa09eb861c1362010aa /include/util.h
parenta297e294a01fca7e5abc71e05715059711a697e5 (diff)
Extend random_prime() to be able to generate primes of any bit size.
bits <= 1 -> error bits == 2 -> choose 2 or 3 at random bits == 3 -> choose 5 or 7 at random bits == 4 -> choose 11 or 13 at random bits >= 5 -> procedure used previously. Tested by running random_prime() with random bit sizes <= 16 until it had generated all <= 16 bit primes.
Diffstat (limited to 'include/util.h')
0 files changed, 0 insertions, 0 deletions