diff options
Diffstat (limited to 'src/lib/libcrypto/ec/ecp_smpl.c')
-rw-r--r-- | src/lib/libcrypto/ec/ecp_smpl.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/libcrypto/ec/ecp_smpl.c b/src/lib/libcrypto/ec/ecp_smpl.c index 6f5280bbc9..c9d73bd629 100644 --- a/src/lib/libcrypto/ec/ecp_smpl.c +++ b/src/lib/libcrypto/ec/ecp_smpl.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ecp_smpl.c,v 1.34 2022/01/20 11:02:44 inoguchi Exp $ */ | 1 | /* $OpenBSD: ecp_smpl.c,v 1.35 2022/11/19 07:00:57 tb Exp $ */ |
2 | /* Includes code written by Lenka Fibikova <fibikova@exp-math.uni-essen.de> | 2 | /* Includes code written by Lenka Fibikova <fibikova@exp-math.uni-essen.de> |
3 | * for the OpenSSL project. | 3 | * for the OpenSSL project. |
4 | * Includes code written by Bodo Moeller for the OpenSSL project. | 4 | * Includes code written by Bodo Moeller for the OpenSSL project. |
@@ -1416,7 +1416,7 @@ ec_GFp_simple_field_sqr(const EC_GROUP * group, BIGNUM * r, const BIGNUM * a, BN | |||
1416 | /* | 1416 | /* |
1417 | * Apply randomization of EC point projective coordinates: | 1417 | * Apply randomization of EC point projective coordinates: |
1418 | * | 1418 | * |
1419 | * (X, Y, Z) = (lambda^2 * X, lambda^3 * Y, lambda * Z) | 1419 | * (X, Y, Z) = (lambda^2 * X, lambda^3 * Y, lambda * Z) |
1420 | * | 1420 | * |
1421 | * where lambda is in the interval [1, group->field). | 1421 | * where lambda is in the interval [1, group->field). |
1422 | */ | 1422 | */ |
@@ -1473,14 +1473,14 @@ ec_GFp_simple_blind_coordinates(const EC_GROUP *group, EC_POINT *p, BN_CTX *ctx) | |||
1473 | 1473 | ||
1474 | 1474 | ||
1475 | #define EC_POINT_BN_set_flags(P, flags) do { \ | 1475 | #define EC_POINT_BN_set_flags(P, flags) do { \ |
1476 | BN_set_flags(&(P)->X, (flags)); \ | 1476 | BN_set_flags(&(P)->X, (flags)); \ |
1477 | BN_set_flags(&(P)->Y, (flags)); \ | 1477 | BN_set_flags(&(P)->Y, (flags)); \ |
1478 | BN_set_flags(&(P)->Z, (flags)); \ | 1478 | BN_set_flags(&(P)->Z, (flags)); \ |
1479 | } while(0) | 1479 | } while(0) |
1480 | 1480 | ||
1481 | #define EC_POINT_CSWAP(c, a, b, w, t) do { \ | 1481 | #define EC_POINT_CSWAP(c, a, b, w, t) do { \ |
1482 | if (!BN_swap_ct(c, &(a)->X, &(b)->X, w) || \ | 1482 | if (!BN_swap_ct(c, &(a)->X, &(b)->X, w) || \ |
1483 | !BN_swap_ct(c, &(a)->Y, &(b)->Y, w) || \ | 1483 | !BN_swap_ct(c, &(a)->Y, &(b)->Y, w) || \ |
1484 | !BN_swap_ct(c, &(a)->Z, &(b)->Z, w)) \ | 1484 | !BN_swap_ct(c, &(a)->Z, &(b)->Z, w)) \ |
1485 | goto err; \ | 1485 | goto err; \ |
1486 | t = ((a)->Z_is_one ^ (b)->Z_is_one) & (c); \ | 1486 | t = ((a)->Z_is_one ^ (b)->Z_is_one) & (c); \ |