summaryrefslogtreecommitdiff
path: root/lib/libcrypto/ec/ecp_smpl.c
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2018-11-06 07:02:34 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2018-11-06 07:02:34 +0000
commite753e63d06fa222b6b735c99660e9a440cd2522c (patch)
tree628e67bcba7be310c404a52559116666b67c5d5b /lib/libcrypto/ec/ecp_smpl.c
parente4ba8484aecdc6ca0d6a2945a25aa5bc8fe27c63 (diff)
unrevert the use of bn_rand_interval().
ok beck jsing
Diffstat (limited to 'lib/libcrypto/ec/ecp_smpl.c')
-rw-r--r--lib/libcrypto/ec/ecp_smpl.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/libcrypto/ec/ecp_smpl.c b/lib/libcrypto/ec/ecp_smpl.c
index e379a74fb1d..c64c41130a7 100644
--- a/lib/libcrypto/ec/ecp_smpl.c
+++ b/lib/libcrypto/ec/ecp_smpl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ecp_smpl.c,v 1.27 2018/11/06 06:59:25 tb Exp $ */
+/* $OpenBSD: ecp_smpl.c,v 1.28 2018/11/06 07:02:33 tb Exp $ */
/* Includes code written by Lenka Fibikova <fibikova@exp-math.uni-essen.de>
* for the OpenSSL project.
* Includes code written by Bodo Moeller for the OpenSSL project.
@@ -1434,10 +1434,8 @@ ec_GFp_simple_blind_coordinates(const EC_GROUP *group, EC_POINT *p, BN_CTX *ctx)
goto err;
/* Generate lambda in [1, group->field - 1] */
- do {
- if (!BN_rand_range(lambda, &group->field))
- goto err;
- } while (BN_is_zero(lambda));
+ if (!bn_rand_interval(lambda, BN_value_one(), &group->field))
+ goto err;
if (group->meth->field_encode != NULL &&
!group->meth->field_encode(group, lambda, lambda, ctx))