diff options
author | lloyd <[email protected]> | 2008-07-05 17:01:16 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-07-05 17:01:16 +0000 |
commit | 7cc2151c3944f23bd43280610b15a0cbe1b52f0a (patch) | |
tree | 261e9aa9897d946d346b9fa09eb861c1362010aa /modules/es_dev | |
parent | a297e294a01fca7e5abc71e05715059711a697e5 (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 'modules/es_dev')
0 files changed, 0 insertions, 0 deletions