diff options
Diffstat (limited to 'src/lib/libcrypto/ec')
-rw-r--r-- | src/lib/libcrypto/ec/ecp_smpl.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/libcrypto/ec/ecp_smpl.c b/src/lib/libcrypto/ec/ecp_smpl.c index f6db4dc9b1..f497657463 100644 --- a/src/lib/libcrypto/ec/ecp_smpl.c +++ b/src/lib/libcrypto/ec/ecp_smpl.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ecp_smpl.c,v 1.15 2015/02/09 15:49:22 jsing Exp $ */ | 1 | /* $OpenBSD: ecp_smpl.c,v 1.16 2017/01/21 11:00:47 beck Exp $ */ |
2 | /* Includes code written by Lenka Fibikova <fibikova@exp-math.uni-essen.de> | 2 | /* Includes code written by Lenka Fibikova <fibikova@exp-math.uni-essen.de> |
3 | * for the OpenSSL project. | 3 | * for the OpenSSL project. |
4 | * Includes code written by Bodo Moeller for the OpenSSL project. | 4 | * Includes code written by Bodo Moeller for the OpenSSL project. |
@@ -64,6 +64,7 @@ | |||
64 | 64 | ||
65 | #include <openssl/err.h> | 65 | #include <openssl/err.h> |
66 | 66 | ||
67 | #include "bn_lcl.h" | ||
67 | #include "ec_lcl.h" | 68 | #include "ec_lcl.h" |
68 | 69 | ||
69 | const EC_METHOD * | 70 | const EC_METHOD * |
@@ -581,7 +582,7 @@ ec_GFp_simple_point_get_affine_coordinates(const EC_GROUP * group, const EC_POIN | |||
581 | } | 582 | } |
582 | } | 583 | } |
583 | } else { | 584 | } else { |
584 | if (!BN_mod_inverse(Z_1, Z_, &group->field, ctx)) { | 585 | if (!BN_mod_inverse_ct(Z_1, Z_, &group->field, ctx)) { |
585 | ECerr(EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES, ERR_R_BN_LIB); | 586 | ECerr(EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES, ERR_R_BN_LIB); |
586 | goto err; | 587 | goto err; |
587 | } | 588 | } |
@@ -1311,7 +1312,7 @@ ec_GFp_simple_points_make_affine(const EC_GROUP * group, size_t num, EC_POINT * | |||
1311 | 1312 | ||
1312 | /* invert heap[1] */ | 1313 | /* invert heap[1] */ |
1313 | if (!BN_is_zero(heap[1])) { | 1314 | if (!BN_is_zero(heap[1])) { |
1314 | if (!BN_mod_inverse(heap[1], heap[1], &group->field, ctx)) { | 1315 | if (!BN_mod_inverse_ct(heap[1], heap[1], &group->field, ctx)) { |
1315 | ECerr(EC_F_EC_GFP_SIMPLE_POINTS_MAKE_AFFINE, ERR_R_BN_LIB); | 1316 | ECerr(EC_F_EC_GFP_SIMPLE_POINTS_MAKE_AFFINE, ERR_R_BN_LIB); |
1316 | goto err; | 1317 | goto err; |
1317 | } | 1318 | } |