summaryrefslogtreecommitdiff
path: root/src/crypto/fipsmodule/ec/oct.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypto/fipsmodule/ec/oct.c')
-rw-r--r--src/crypto/fipsmodule/ec/oct.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/crypto/fipsmodule/ec/oct.c b/src/crypto/fipsmodule/ec/oct.c
index 5071c2ee..cf51e4bc 100644
--- a/src/crypto/fipsmodule/ec/oct.c
+++ b/src/crypto/fipsmodule/ec/oct.c
@@ -94,12 +94,12 @@ static size_t ec_GFp_simple_point2oct(const EC_GROUP *group,
goto err;
}
- /* ret := required output buffer length */
+ // ret := required output buffer length
field_len = BN_num_bytes(&group->field);
ret =
(form == POINT_CONVERSION_COMPRESSED) ? 1 + field_len : 1 + 2 * field_len;
- /* if 'buf' is NULL, just return required length */
+ // if 'buf' is NULL, just return required length
if (buf != NULL) {
if (len < ret) {
OPENSSL_PUT_ERROR(EC, EC_R_BUFFER_TOO_SMALL);
@@ -299,13 +299,13 @@ int ec_GFp_simple_set_compressed_coordinates(const EC_GROUP *group,
goto err;
}
- /* 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. */
+ // 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.
- /* tmp1 := x^3 */
+ // tmp1 := x^3
if (group->meth->field_decode == 0) {
- /* field_{sqr,mul} work on standard representation */
+ // field_{sqr,mul} work on standard representation
if (!group->meth->field_sqr(group, tmp2, x, ctx) ||
!group->meth->field_mul(group, tmp1, tmp2, x, ctx)) {
goto err;
@@ -317,7 +317,7 @@ int ec_GFp_simple_set_compressed_coordinates(const EC_GROUP *group,
}
}
- /* tmp1 := tmp1 + a*x */
+ // tmp1 := tmp1 + a*x
if (group->a_is_minus3) {
if (!BN_mod_lshift1_quick(tmp2, x, &group->field) ||
!BN_mod_add_quick(tmp2, tmp2, x, &group->field) ||
@@ -331,7 +331,7 @@ int ec_GFp_simple_set_compressed_coordinates(const EC_GROUP *group,
goto err;
}
} else {
- /* field_mul works on standard representation */
+ // field_mul works on standard representation
if (!group->meth->field_mul(group, tmp2, &group->a, x, ctx)) {
goto err;
}
@@ -342,7 +342,7 @@ int ec_GFp_simple_set_compressed_coordinates(const EC_GROUP *group,
}
}
- /* tmp1 := tmp1 + b */
+ // tmp1 := tmp1 + b
if (group->meth->field_decode) {
if (!group->meth->field_decode(group, tmp2, &group->b, ctx) ||
!BN_mod_add_quick(tmp1, tmp1, tmp2, &group->field)) {