summaryrefslogtreecommitdiffstats
path: root/crypto/ec
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2015-01-16 09:21:50 +0000
committerMatt Caswell <matt@openssl.org>2015-01-22 09:19:59 +0000
commitc80fd6b215449f2ba7228af58979ac8709f74b82 (patch)
tree0269f83aff238ce66c2839e2a52c237caaa37ec3 /crypto/ec
parent4b618848f9beb8271f24883694e097caa70013c0 (diff)
Further comment changes for reformat (master)
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto/ec')
-rw-r--r--crypto/ec/ec_mult.c8
-rw-r--r--crypto/ec/ecp_nistp521.c24
-rw-r--r--crypto/ec/ecp_oct.c3
3 files changed, 20 insertions, 15 deletions
diff --git a/crypto/ec/ec_mult.c b/crypto/ec/ec_mult.c
index eb83c62dcd..0b9989b2cf 100644
--- a/crypto/ec/ec_mult.c
+++ b/crypto/ec/ec_mult.c
@@ -182,11 +182,6 @@ static void ec_pre_comp_clear_free(void *pre_)
}
-
-
-
-
-
/* TODO: table should be optimised for the wNAF-based implementation,
* sometimes smaller windows will give better performance
* (thus the boundaries should be increased)
@@ -200,7 +195,8 @@ static void ec_pre_comp_clear_free(void *pre_)
(b) >= 20 ? 2 : \
1))
-/* Compute
+/*-
+ * Compute
* \sum scalars[i]*points[i],
* also including
* scalar*generator
diff --git a/crypto/ec/ecp_nistp521.c b/crypto/ec/ecp_nistp521.c
index 613c5abc38..eec9f4220b 100644
--- a/crypto/ec/ecp_nistp521.c
+++ b/crypto/ec/ecp_nistp521.c
@@ -624,8 +624,10 @@ static void felem_reduce(felem out, const largefelem in)
out[1] += ((limb) in[0]) >> 58;
out[1] += (((limb) (in[0] >> 64)) & bottom52bits) << 6;
- /* out[1] < 2^58 + 2^6 + 2^58
- * = 2^59 + 2^6 */
+ /*-
+ * out[1] < 2^58 + 2^6 + 2^58
+ * = 2^59 + 2^6
+ */
out[2] += ((limb) (in[0] >> 64)) >> 52;
out[2] += ((limb) in[1]) >> 58;
@@ -654,8 +656,10 @@ static void felem_reduce(felem out, const largefelem in)
out[8] += ((limb) in[7]) >> 58;
out[8] += (((limb) (in[7] >> 64)) & bottom52bits) << 6;
- /* out[x > 1] < 2^58 + 2^6 + 2^58 + 2^12
- * < 2^59 + 2^13 */
+ /*-
+ * out[x > 1] < 2^58 + 2^6 + 2^58 + 2^12
+ * < 2^59 + 2^13
+ */
overflow1 = ((limb) (in[7] >> 64)) >> 52;
overflow1 += ((limb) in[8]) >> 58;
@@ -669,9 +673,11 @@ static void felem_reduce(felem out, const largefelem in)
out[1] += overflow2; /* out[1] < 2^59 + 2^6 + 2^13 */
out[1] += out[0] >> 58; out[0] &= bottom58bits;
- /* out[0] < 2^58
+ /*-
+ * out[0] < 2^58
* out[1] < 2^59 + 2^6 + 2^13 + 2^2
- * < 2^59 + 2^14 */
+ * < 2^59 + 2^14
+ */
}
static void felem_square_reduce(felem out, const felem in)
@@ -1216,9 +1222,11 @@ static void point_add(felem x3, felem y3, felem z3,
felem_scalar128(tmp2, 2);
/* tmp2[i] < 17*2^121 */
felem_diff128(tmp, tmp2);
- /* tmp[i] < 2^127 - 2^69 + 17*2^122
+ /*-
+ * tmp[i] < 2^127 - 2^69 + 17*2^122
* = 2^126 - 2^122 - 2^6 - 2^2 - 1
- * < 2^127 */
+ * < 2^127
+ */
felem_reduce(y_out, tmp);
copy_conditional(x_out, x2, z1_is_zero);
diff --git a/crypto/ec/ecp_oct.c b/crypto/ec/ecp_oct.c
index 980ca970ca..ba891675be 100644
--- a/crypto/ec/ecp_oct.c
+++ b/crypto/ec/ecp_oct.c
@@ -93,7 +93,8 @@ int ec_GFp_simple_set_compressed_coordinates(const EC_GROUP *group, EC_POINT *po
y = BN_CTX_get(ctx);
if (y == NULL) goto err;
- /* Recover y. We have a Weierstrass equation
+ /*-
+ * Recover y. We have a Weierstrass equation
* y^2 = x^3 + a*x + b,
* so y is one of the square roots of x^3 + a*x + b.
*/