summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2001-02-08 12:27:22 +0000
committerBodo Möller <bodo@openssl.org>2001-02-08 12:27:22 +0000
commit395258457182fcfe4ee6f82ee9c74b5d2f3426c8 (patch)
tree016e0b0133b6cf7bb19557dfee0383511c34ee94 /crypto
parenta5d2acfc792d788ed61f0b3cfe969eee2091a373 (diff)
Change comments. (The expected number of iterations in BN_rand_range
never exceeds 1.333...).
Diffstat (limited to 'crypto')
-rw-r--r--crypto/bn/bn_rand.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/bn/bn_rand.c b/crypto/bn/bn_rand.c
index a2e1fdd3e4..3873eac689 100644
--- a/crypto/bn/bn_rand.c
+++ b/crypto/bn/bn_rand.c
@@ -190,7 +190,7 @@ int BN_rand_range(BIGNUM *r, BIGNUM *min, BIGNUM *range)
{
do
{
- /* range = 11..._2, so each iteration succeeds with probability > .5 */
+ /* range = 11..._2, so each iteration succeeds with probability > .75 */
if (!BN_rand(r, n, 0, 0)) return 0;
}
while (BN_cmp(r, range) >= 0);
@@ -206,7 +206,7 @@ int BN_rand_range(BIGNUM *r, BIGNUM *min, BIGNUM *range)
* (which is either r, r - range, or r - 2*range).
* Otherwise, iterate once more.
* Since 3*range = 11..._2, each iteration succeeds with
- * probability > .5. */
+ * probability > .75. */
if (BN_cmp(r ,range) >= 0)
{
if (!BN_sub(r, r, range)) return 0;