diff options
author | Matt Caswell <matt@openssl.org> | 2015-01-05 00:34:00 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-01-22 09:23:50 +0000 |
commit | e19d4a99b8f25456dfab7086af57f3f208cdfed6 (patch) | |
tree | cd7931e89476c762982afdc5585aa942ad0a4f0b /crypto/ec | |
parent | 6977c7e2baf291278aee7632f1a68581b7c4d1f9 (diff) |
Further comment amendments to preserve formatting prior to source reformat
(cherry picked from commit 4a7fa26ffd65bf36beb8d1cb8f29fc0ae203f5c5)
Conflicts:
crypto/x509v3/pcy_tree.c
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto/ec')
-rw-r--r-- | crypto/ec/ec2_mult.c | 6 | ||||
-rw-r--r-- | crypto/ec/ec2_oct.c | 3 | ||||
-rw-r--r-- | crypto/ec/ecp_nistp224.c | 9 | ||||
-rw-r--r-- | crypto/ec/ecp_nistp256.c | 6 | ||||
-rw-r--r-- | crypto/ec/ecp_nistp521.c | 6 | ||||
-rw-r--r-- | crypto/ec/ecp_smpl.c | 5 |
6 files changed, 23 insertions, 12 deletions
diff --git a/crypto/ec/ec2_mult.c b/crypto/ec/ec2_mult.c index 333d11b952..9955948dfd 100644 --- a/crypto/ec/ec2_mult.c +++ b/crypto/ec/ec2_mult.c @@ -74,7 +74,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 @@ -106,7 +107,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 f1d75e5ddf..c60df5c6f2 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 e5d95cc4d0..65164c8a3c 100644 --- a/crypto/ec/ecp_nistp224.c +++ b/crypto/ec/ecp_nistp224.c @@ -346,7 +346,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 @@ -521,7 +522,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) @@ -753,7 +755,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 b5883d6a5a..c80a26186b 100644 --- a/crypto/ec/ecp_nistp256.c +++ b/crypto/ec/ecp_nistp256.c @@ -180,8 +180,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 63e4ac8cf6..4741bf9af3 100644 --- a/crypto/ec/ecp_smpl.c +++ b/crypto/ec/ecp_smpl.c @@ -121,13 +121,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 |