diff options
author | Bodo Möller <bodo@openssl.org> | 2002-09-16 13:52:48 +0000 |
---|---|---|
committer | Bodo Möller <bodo@openssl.org> | 2002-09-16 13:52:48 +0000 |
commit | 4c8f79a33e8efe5302700389edb4d574f2228765 (patch) | |
tree | 3bceb619c48044a568337fc155b5a25e6ec6c150 /crypto/ec/ec2_smpl.c | |
parent | 7cc6ec7af70d1a11bc0277364c07031f6acecad3 (diff) |
make sure 'neg' flag (which does not really matter for GF(2^m), but
could cause confusion for ECDSA) is set to zero
Submitted by: Sheueling Chang
Diffstat (limited to 'crypto/ec/ec2_smpl.c')
-rw-r--r-- | crypto/ec/ec2_smpl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/ec/ec2_smpl.c b/crypto/ec/ec2_smpl.c index ece8abb8f6..b218c5639a 100644 --- a/crypto/ec/ec2_smpl.c +++ b/crypto/ec/ec2_smpl.c @@ -364,8 +364,11 @@ int ec_GF2m_simple_point_set_affine_coordinates(const EC_GROUP *group, EC_POINT } if (!BN_copy(&point->X, x)) goto err; + point->X.neg = 0; if (!BN_copy(&point->Y, y)) goto err; + point->Y.neg = 0; if (!BN_copy(&point->Z, BN_value_one())) goto err; + point->Z.neg = 0; point->Z_is_one = 1; ret = 1; @@ -396,10 +399,12 @@ int ec_GF2m_simple_point_get_affine_coordinates(const EC_GROUP *group, const EC_ if (x != NULL) { if (!BN_copy(x, &point->X)) goto err; + x->neg = 0; } if (y != NULL) { if (!BN_copy(y, &point->Y)) goto err; + y->neg = 0; } ret = 1; |