diff options
author | Matt Caswell <matt@openssl.org> | 2015-01-21 19:18:47 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-01-22 09:28:49 +0000 |
commit | f3b6ee30f4995d74f1008ffbe10e1b59caaffcaa (patch) | |
tree | 5cc4242eebf67aff6d3c67785b61876d52833ea4 /crypto/ec | |
parent | a1b20ff65456696e6e4ce6dccb276ef63f54e1e9 (diff) |
Move more comments that confuse indent
Conflicts:
crypto/dsa/dsa.h
demos/engines/ibmca/hw_ibmca.c
ssl/ssl_locl.h
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto/ec')
-rw-r--r-- | crypto/ec/ec2_oct.c | 5 | ||||
-rw-r--r-- | crypto/ec/ecp_nistp256.c | 6 | ||||
-rw-r--r-- | crypto/ec/ecp_nistp521.c | 3 | ||||
-rw-r--r-- | crypto/ec/ecp_nistputil.c | 3 | ||||
-rw-r--r-- | crypto/ec/ecp_oct.c | 5 |
5 files changed, 14 insertions, 8 deletions
diff --git a/crypto/ec/ec2_oct.c b/crypto/ec/ec2_oct.c index c60df5c6f2..943b75baf5 100644 --- a/crypto/ec/ec2_oct.c +++ b/crypto/ec/ec2_oct.c @@ -390,8 +390,9 @@ int ec_GF2m_simple_oct2point(const EC_GROUP *group, EC_POINT *point, if (!EC_POINT_set_affine_coordinates_GF2m(group, point, x, y, ctx)) goto err; } - - if (!EC_POINT_is_on_curve(group, point, ctx)) /* test required by X9.62 */ + + /* test required by X9.62 */ + if (!EC_POINT_is_on_curve(group, point, ctx)) { ECerr(EC_F_EC_GF2M_SIMPLE_OCT2POINT, EC_R_POINT_IS_NOT_ON_CURVE); goto err; diff --git a/crypto/ec/ecp_nistp256.c b/crypto/ec/ecp_nistp256.c index f2f8266b11..33fba29155 100644 --- a/crypto/ec/ecp_nistp256.c +++ b/crypto/ec/ecp_nistp256.c @@ -1568,9 +1568,10 @@ static void batch_mul(felem x_out, felem y_out, felem z_out, if (!skip) { + /* Arg 1 below is for "mixed" */ point_add(nq[0], nq[1], nq[2], nq[0], nq[1], nq[2], - 1 /* mixed */, tmp[0], tmp[1], tmp[2]); + 1, tmp[0], tmp[1], tmp[2]); } else { @@ -1587,9 +1588,10 @@ static void batch_mul(felem x_out, felem y_out, felem z_out, bits |= get_bit(g_scalar, i); /* select the point to add, in constant time */ select_point(bits, 16, g_pre_comp[0], tmp); + /* Arg 1 below is for "mixed" */ point_add(nq[0], nq[1], nq[2], nq[0], nq[1], nq[2], - 1 /* mixed */, tmp[0], tmp[1], tmp[2]); + 1, tmp[0], tmp[1], tmp[2]); } /* do other additions every 5 doublings */ diff --git a/crypto/ec/ecp_nistp521.c b/crypto/ec/ecp_nistp521.c index 78c21f0089..f97dab67de 100644 --- a/crypto/ec/ecp_nistp521.c +++ b/crypto/ec/ecp_nistp521.c @@ -1460,9 +1460,10 @@ static void batch_mul(felem x_out, felem y_out, felem z_out, select_point(bits, 16, g_pre_comp, tmp); if (!skip) { + /* The 1 argument below is for "mixed" */ point_add(nq[0], nq[1], nq[2], nq[0], nq[1], nq[2], - 1 /* mixed */, tmp[0], tmp[1], tmp[2]); + 1, tmp[0], tmp[1], tmp[2]); } else { diff --git a/crypto/ec/ecp_nistputil.c b/crypto/ec/ecp_nistputil.c index 4ab42d814c..c65bb2d911 100644 --- a/crypto/ec/ecp_nistputil.c +++ b/crypto/ec/ecp_nistputil.c @@ -79,7 +79,8 @@ void ec_GFp_nistp_points_make_affine_internal(size_t num, void *point_array, /* tmp_felem(i-1) is the product of Z(0) .. Z(i-1), * tmp_felem(i) is the inverse of the product of Z(0) .. Z(i) */ - felem_mul(tmp_felem(num), tmp_felem(i-1), tmp_felem(i)); /* 1/Z(i) */ + /* 1/Z(i) */ + felem_mul(tmp_felem(num), tmp_felem(i-1), tmp_felem(i)); else felem_assign(tmp_felem(num), tmp_felem(0)); /* 1/Z(0) */ diff --git a/crypto/ec/ecp_oct.c b/crypto/ec/ecp_oct.c index c23983d7f7..0fdd8ad31f 100644 --- a/crypto/ec/ecp_oct.c +++ b/crypto/ec/ecp_oct.c @@ -416,8 +416,9 @@ int ec_GFp_simple_oct2point(const EC_GROUP *group, EC_POINT *point, if (!EC_POINT_set_affine_coordinates_GFp(group, point, x, y, ctx)) goto err; } - - if (!EC_POINT_is_on_curve(group, point, ctx)) /* test required by X9.62 */ + + /* test required by X9.62 */ + if (!EC_POINT_is_on_curve(group, point, ctx)) { ECerr(EC_F_EC_GFP_SIMPLE_OCT2POINT, EC_R_POINT_IS_NOT_ON_CURVE); goto err; |