X-Git-Url: https://git.openssl.org/gitweb/?a=blobdiff_plain;f=crypto%2Fec%2Fecp_smpl.c;h=bd9f7dfda784cbeca68f899a73a0ef006ab36b95;hb=1d97c8435171a7af575f73c526d79e1ef0ee5960;hp=c2192b3051ecc8aa8a66e6c471298b9456ad662a;hpb=5784a52145d0062d42724d4d0fab3b4c82de35ee;p=openssl.git diff --git a/crypto/ec/ecp_smpl.c b/crypto/ec/ecp_smpl.c index c2192b3051..bd9f7dfda7 100644 --- a/crypto/ec/ecp_smpl.c +++ b/crypto/ec/ecp_smpl.c @@ -320,9 +320,11 @@ int ec_GFp_simple_group_check_discriminant(const EC_GROUP *group, BN_CTX *ctx) if (!BN_copy(b, group->b)) goto err; } - /* check the discriminant: + /*- + * check the discriminant: * y^2 = x^3 + a*x + b is an elliptic curve <=> 4*a^3 + 27*b^2 != 0 (mod p) - * 0 =< a, b < p */ + * 0 =< a, b < p + */ if (BN_is_zero(a)) { if (BN_is_zero(b)) goto err; @@ -975,7 +977,8 @@ int ec_GFp_simple_is_on_curve(const EC_GROUP *group, const EC_POINT *point, BN_C Z6 = BN_CTX_get(ctx); if (Z6 == NULL) goto err; - /* We have a curve defined by a Weierstrass equation + /*- + * We have a curve defined by a Weierstrass equation * y^2 = x^3 + a*x + b. * The point to consider is given in Jacobian projective coordinates * where (X, Y, Z) represents (x, y) = (X/Z^2, Y/Z^3). @@ -1081,7 +1084,8 @@ int ec_GFp_simple_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT * Zb23 = BN_CTX_get(ctx); if (Zb23 == NULL) goto end; - /* We have to decide whether + /*- + * We have to decide whether * (X_a/Z_a^2, Y_a/Z_a^3) = (X_b/Z_b^2, Y_b/Z_b^3), * or equivalently, whether * (X_a*Z_b^2, Y_a*Z_b^3) = (X_b*Z_a^2, Y_b*Z_a^3).