diff options
author | Bodo Möller <bodo@openssl.org> | 2001-09-03 12:58:16 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2001-09-03 12:58:16 +0000 |
commit | 983495c4b215b7418dc3470fa8bc9c919c09c683 (patch) | |
tree | 1f22a7ae4ac1c0f6d82eb0e7745c3371f14df091 /doc/crypto/BN_rand.pod | |
parent | 931a23a5a55d153db9a0a76ee27e28af90be86e6 (diff) |
Use uniformly chosen witnesses for Miller-Rabin test
(by using new BN_pseudo_rand_range function)
Diffstat (limited to 'doc/crypto/BN_rand.pod')
-rw-r--r-- | doc/crypto/BN_rand.pod | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/crypto/BN_rand.pod b/doc/crypto/BN_rand.pod index cbae2fca97..ecd410f7f2 100644 --- a/doc/crypto/BN_rand.pod +++ b/doc/crypto/BN_rand.pod @@ -14,6 +14,8 @@ BN_rand, BN_pseudo_rand - generate pseudo-random number int BN_rand_range(BIGNUM *rnd, BIGNUM *range); + int BN_pseudo_rand_range(BIGNUM *rnd, int bits, int top, int bottom); + =head1 DESCRIPTION BN_rand() generates a cryptographically strong pseudo-random number of @@ -31,6 +33,8 @@ protocols, but usually not for key generation etc. BN_rand_range() generates a cryptographically strong pseudo-random number B<rnd> in the range 0 <lt>= B<rnd> E<lt> B<range>. +BN_pseudo_rand_range() does the same, but is based on BN_pseudo_rand(), +and hence numbers generated by it are not necessarily unpredictable. The PRNG must be seeded prior to calling BN_rand() or BN_rand_range(). @@ -49,5 +53,6 @@ L<RAND_add(3)|RAND_add(3)>, L<RAND_bytes(3)|RAND_bytes(3)> BN_rand() is available in all versions of SSLeay and OpenSSL. BN_pseudo_rand() was added in OpenSSL 0.9.5. The B<top> == -1 case and the function BN_rand_range() were added in OpenSSL 0.9.6a. +BN_pseudo_rand_range() was added in OpenSSL 0.9.6c. =cut |