diff options
author | Matt Caswell <matt@openssl.org> | 2015-01-16 09:21:50 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2015-01-22 09:19:59 +0000 |
commit | c80fd6b215449f2ba7228af58979ac8709f74b82 (patch) | |
tree | 0269f83aff238ce66c2839e2a52c237caaa37ec3 /crypto/ec/ecp_nistp521.c | |
parent | 4b618848f9beb8271f24883694e097caa70013c0 (diff) |
Further comment changes for reformat (master)
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto/ec/ecp_nistp521.c')
-rw-r--r-- | crypto/ec/ecp_nistp521.c | 24 |
1 files changed, 16 insertions, 8 deletions
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); |