diff options
author | Nils Larsch <nils@openssl.org> | 2005-04-22 20:02:44 +0000 |
---|---|---|
committer | Nils Larsch <nils@openssl.org> | 2005-04-22 20:02:44 +0000 |
commit | ff22e913a3fbeb025e612828859102aa1a3effaa (patch) | |
tree | 9b30cca57b4f6fd9436fb222dbd2fe9647bc56a9 /crypto/ec/ec2_smpl.c | |
parent | 04d0d0accfbfe88cb52c92abf521c69577c8d33e (diff) |
- use BN_set_negative and BN_is_negative instead of BN_set_sign
and BN_get_sign
- implement BN_set_negative as a function
- always use "#define BN_is_zero(a) ((a)->top == 0)"
Diffstat (limited to 'crypto/ec/ec2_smpl.c')
-rw-r--r-- | crypto/ec/ec2_smpl.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crypto/ec/ec2_smpl.c b/crypto/ec/ec2_smpl.c index 34c3a953a5..a9f7c9d378 100644 --- a/crypto/ec/ec2_smpl.c +++ b/crypto/ec/ec2_smpl.c @@ -354,11 +354,11 @@ int ec_GF2m_simple_point_set_affine_coordinates(const EC_GROUP *group, EC_POINT } if (!BN_copy(&point->X, x)) goto err; - BN_set_sign(&point->X, 0); + BN_set_negative(&point->X, 0); if (!BN_copy(&point->Y, y)) goto err; - BN_set_sign(&point->Y, 0); + BN_set_negative(&point->Y, 0); if (!BN_copy(&point->Z, BN_value_one())) goto err; - BN_set_sign(&point->Z, 0); + BN_set_negative(&point->Z, 0); point->Z_is_one = 1; ret = 1; @@ -389,12 +389,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; - BN_set_sign(x, 0); + BN_set_negative(x, 0); } if (y != NULL) { if (!BN_copy(y, &point->Y)) goto err; - BN_set_sign(y, 0); + BN_set_negative(y, 0); } ret = 1; |