diff options
Diffstat (limited to '')
| -rw-r--r-- | src/regress/lib/libcrypto/ec/ectest.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/regress/lib/libcrypto/ec/ectest.c b/src/regress/lib/libcrypto/ec/ectest.c index 2b9c6a99f3..d2253609cd 100644 --- a/src/regress/lib/libcrypto/ec/ectest.c +++ b/src/regress/lib/libcrypto/ec/ectest.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ectest.c,v 1.13 2023/04/13 05:25:30 tb Exp $ */ | 1 | /* $OpenBSD: ectest.c,v 1.14 2023/04/17 20:41:02 tb Exp $ */ |
| 2 | /* crypto/ec/ectest.c */ | 2 | /* crypto/ec/ectest.c */ |
| 3 | /* | 3 | /* |
| 4 | * Originally written by Bodo Moeller for the OpenSSL project. | 4 | * Originally written by Bodo Moeller for the OpenSSL project. |
| @@ -96,6 +96,9 @@ | |||
| 96 | #define TIMING_RAND_PT 1 | 96 | #define TIMING_RAND_PT 1 |
| 97 | #define TIMING_SIMUL 2 | 97 | #define TIMING_SIMUL 2 |
| 98 | 98 | ||
| 99 | int EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group, | ||
| 100 | const EC_POINT *point, BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *ctx); | ||
| 101 | |||
| 99 | /* test multiplication with group order, long and negative scalars */ | 102 | /* test multiplication with group order, long and negative scalars */ |
| 100 | static void | 103 | static void |
| 101 | group_order_tests(EC_GROUP *group) | 104 | group_order_tests(EC_GROUP *group) |
| @@ -132,7 +135,8 @@ group_order_tests(EC_GROUP *group) | |||
| 132 | ABORT; | 135 | ABORT; |
| 133 | fprintf(stdout, " ok\n"); | 136 | fprintf(stdout, " ok\n"); |
| 134 | fprintf(stdout, "long/negative scalar tests ... "); | 137 | fprintf(stdout, "long/negative scalar tests ... "); |
| 135 | if (!BN_one(n1)) | 138 | /* XXX - switch back to BN_one() after next bump. */ |
| 139 | if (!BN_set_word(n1, 1)) | ||
| 136 | ABORT; | 140 | ABORT; |
| 137 | /* n1 = 1 - order */ | 141 | /* n1 = 1 - order */ |
| 138 | if (!BN_sub(n1, n1, order)) | 142 | if (!BN_sub(n1, n1, order)) |
| @@ -342,7 +346,7 @@ prime_field_tests(void) | |||
| 342 | fprintf(stdout, "\nGenerator as octet string, hybrid form:\n "); | 346 | fprintf(stdout, "\nGenerator as octet string, hybrid form:\n "); |
| 343 | for (i = 0; i < len; i++) fprintf(stdout, "%02X", buf[i]); | 347 | for (i = 0; i < len; i++) fprintf(stdout, "%02X", buf[i]); |
| 344 | 348 | ||
| 345 | if (!EC_POINT_get_Jprojective_coordinates(group, R, x, y, z, ctx)) | 349 | if (!EC_POINT_get_Jprojective_coordinates_GFp(group, R, x, y, z, ctx)) |
| 346 | ABORT; | 350 | ABORT; |
| 347 | fprintf(stdout, "\nA representation of the inverse of that generator in\nJacobian projective coordinates:\n X = 0x"); | 351 | fprintf(stdout, "\nA representation of the inverse of that generator in\nJacobian projective coordinates:\n X = 0x"); |
| 348 | BN_print_fp(stdout, x); | 352 | BN_print_fp(stdout, x); |
