summaryrefslogtreecommitdiffstats
path: root/crypto/ec
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2015-01-05 00:34:00 +0000
committerMatt Caswell <matt@openssl.org>2015-01-06 15:45:25 +0000
commit3a83462dfea67566ba9bcedee266dc93d2e911e2 (patch)
tree34d2b020e0b50be348500f4106fe514840ae30f3 /crypto/ec
parentb691154e18c0367643696db3cf73debe9ddfa9ae (diff)
Further comment amendments to preserve formatting prior to source reformat
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto/ec')
-rw-r--r--crypto/ec/ec2_mult.c6
-rw-r--r--crypto/ec/ec2_oct.c3
-rw-r--r--crypto/ec/ecp_nistp224.c9
-rw-r--r--crypto/ec/ecp_nistp256.c6
-rw-r--r--crypto/ec/ecp_nistp521.c6
-rw-r--r--crypto/ec/ecp_smpl.c5
6 files changed, 23 insertions, 12 deletions
diff --git a/crypto/ec/ec2_mult.c b/crypto/ec/ec2_mult.c
index c261b816b5..3f99e177f5 100644
--- a/crypto/ec/ec2_mult.c
+++ b/crypto/ec/ec2_mult.c
@@ -77,7 +77,8 @@
#ifndef OPENSSL_NO_EC2M
-/* Compute the x-coordinate x/z for the point 2*(x/z) in Montgomery projective
+/*-
+ * Compute the x-coordinate x/z for the point 2*(x/z) in Montgomery projective
* coordinates.
* Uses algorithm Mdouble in appendix of
* Lopez, J. and Dahab, R. "Fast multiplication on elliptic curves over
@@ -109,7 +110,8 @@ static int gf2m_Mdouble(const EC_GROUP *group, BIGNUM *x, BIGNUM *z, BN_CTX *ctx
return ret;
}
-/* Compute the x-coordinate x1/z1 for the point (x1/z1)+(x2/x2) in Montgomery
+/*-
+ * Compute the x-coordinate x1/z1 for the point (x1/z1)+(x2/x2) in Montgomery
* projective coordinates.
* Uses algorithm Madd in appendix of
* Lopez, J. and Dahab, R. "Fast multiplication on elliptic curves over
diff --git a/crypto/ec/ec2_oct.c b/crypto/ec/ec2_oct.c
index 0b1fbea144..4788a1ea9d 100644
--- a/crypto/ec/ec2_oct.c
+++ b/crypto/ec/ec2_oct.c
@@ -73,7 +73,8 @@
#ifndef OPENSSL_NO_EC2M
-/* Calculates and sets the affine coordinates of an EC_POINT from the given
+/*-
+ * Calculates and sets the affine coordinates of an EC_POINT from the given
* compressed coordinates. Uses algorithm 2.3.4 of SEC 1.
* Note that the simple implementation only uses affine coordinates.
*
diff --git a/crypto/ec/ecp_nistp224.c b/crypto/ec/ecp_nistp224.c
index 4c76827db8..192bb1d2b8 100644
--- a/crypto/ec/ecp_nistp224.c
+++ b/crypto/ec/ecp_nistp224.c
@@ -341,7 +341,8 @@ static BIGNUM *felem_to_BN(BIGNUM *out, const felem in)
}
/******************************************************************************/
-/* FIELD OPERATIONS
+/*-
+ * FIELD OPERATIONS
*
* Field operations, using the internal representation of field elements.
* NB! These operations are specific to our point multiplication and cannot be
@@ -516,7 +517,8 @@ static void felem_mul(widefelem out, const felem in1, const felem in2)
out[6] = ((widelimb) in1[3]) * in2[3];
}
-/* Reduce seven 128-bit coefficients to four 64-bit coefficients.
+/*-
+ * Reduce seven 128-bit coefficients to four 64-bit coefficients.
* Requires in[i] < 2^126,
* ensures out[0] < 2^56, out[1] < 2^56, out[2] < 2^56, out[3] <= 2^56 + 2^16 */
static void felem_reduce(felem out, const widefelem in)
@@ -748,7 +750,8 @@ copy_conditional(felem out, const felem in, limb icopy)
}
/******************************************************************************/
-/* ELLIPTIC CURVE POINT OPERATIONS
+/*-
+ * ELLIPTIC CURVE POINT OPERATIONS
*
* Points are represented in Jacobian projective coordinates:
* (X, Y, Z) corresponds to the affine point (X/Z^2, Y/Z^3),
diff --git a/crypto/ec/ecp_nistp256.c b/crypto/ec/ecp_nistp256.c
index cd87161093..1df0249d38 100644
--- a/crypto/ec/ecp_nistp256.c
+++ b/crypto/ec/ecp_nistp256.c
@@ -175,8 +175,10 @@ static BIGNUM *smallfelem_to_BN(BIGNUM *out, const smallfelem in)
}
-/* Field operations
- * ---------------- */
+/*-
+ * Field operations
+ * ----------------
+ */
static void smallfelem_one(smallfelem out)
{
diff --git a/crypto/ec/ecp_nistp521.c b/crypto/ec/ecp_nistp521.c
index 7ff3a0b1be..613c5abc38 100644
--- a/crypto/ec/ecp_nistp521.c
+++ b/crypto/ec/ecp_nistp521.c
@@ -207,8 +207,10 @@ static BIGNUM *felem_to_BN(BIGNUM *out, const felem in)
}
-/* Field operations
- * ---------------- */
+/*-
+ * Field operations
+ * ----------------
+ */
static void felem_one(felem out)
{
diff --git a/crypto/ec/ecp_smpl.c b/crypto/ec/ecp_smpl.c
index bd9f7dfda7..16573699ab 100644
--- a/crypto/ec/ecp_smpl.c
+++ b/crypto/ec/ecp_smpl.c
@@ -114,13 +114,14 @@ const EC_METHOD *EC_GFp_simple_method(void)
}
-/* Most method functions in this file are designed to work with
+/*
+ * Most method functions in this file are designed to work with
* non-trivial representations of field elements if necessary
* (see ecp_mont.c): while standard modular addition and subtraction
* are used, the field_mul and field_sqr methods will be used for
* multiplication, and field_encode and field_decode (if defined)
* will be used for converting between representations.
-
+ *
* Functions ec_GFp_simple_points_make_affine() and
* ec_GFp_simple_point_get_affine_coordinates() specifically assume
* that if a non-trivial representation is used, it is a Montgomery