summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authortb <>2024-11-12 10:53:22 +0000
committertb <>2024-11-12 10:53:22 +0000
commitcde411b8edf0f61e87592c72f6f779af3d07ebc6 (patch)
tree96f9afd477779eb0cea46bbb5071123645cf95af /src/lib
parent62ef3857e7799820c922e269826a302dbfb1416a (diff)
downloadopenbsd-cde411b8edf0f61e87592c72f6f779af3d07ebc6.tar.gz
openbsd-cde411b8edf0f61e87592c72f6f779af3d07ebc6.tar.bz2
openbsd-cde411b8edf0f61e87592c72f6f779af3d07ebc6.zip
Make ec_GFp_simple_* static
These functions are no longer shared between multiple files, so they can be static in ecp_methods.c and the long list of prototypes can go away.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/ec/ec_local.h41
-rw-r--r--src/lib/libcrypto/ec/ecp_methods.c62
2 files changed, 32 insertions, 71 deletions
diff --git a/src/lib/libcrypto/ec/ec_local.h b/src/lib/libcrypto/ec/ec_local.h
index 56402a2b04..e5189361e0 100644
--- a/src/lib/libcrypto/ec/ec_local.h
+++ b/src/lib/libcrypto/ec/ec_local.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec_local.h,v 1.36 2024/11/01 05:10:40 tb Exp $ */ 1/* $OpenBSD: ec_local.h,v 1.37 2024/11/12 10:53:22 tb Exp $ */
2/* 2/*
3 * Originally written by Bodo Moeller for the OpenSSL project. 3 * Originally written by Bodo Moeller for the OpenSSL project.
4 */ 4 */
@@ -252,45 +252,6 @@ struct ec_point_st {
252int ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar, 252int ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
253 size_t num, const EC_POINT *points[], const BIGNUM *scalars[], BN_CTX *); 253 size_t num, const EC_POINT *points[], const BIGNUM *scalars[], BN_CTX *);
254 254
255/* method functions in ecp_smpl.c */
256int ec_GFp_simple_group_init(EC_GROUP *);
257void ec_GFp_simple_group_finish(EC_GROUP *);
258int ec_GFp_simple_group_copy(EC_GROUP *, const EC_GROUP *);
259int ec_GFp_simple_group_set_curve(EC_GROUP *, const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *);
260int ec_GFp_simple_group_get_curve(const EC_GROUP *, BIGNUM *p, BIGNUM *a, BIGNUM *b, BN_CTX *);
261int ec_GFp_simple_group_get_degree(const EC_GROUP *);
262int ec_GFp_simple_group_check_discriminant(const EC_GROUP *, BN_CTX *);
263int ec_GFp_simple_point_init(EC_POINT *);
264void ec_GFp_simple_point_finish(EC_POINT *);
265int ec_GFp_simple_point_copy(EC_POINT *, const EC_POINT *);
266int ec_GFp_simple_point_set_to_infinity(const EC_GROUP *, EC_POINT *);
267int ec_GFp_simple_set_Jprojective_coordinates(const EC_GROUP *, EC_POINT *,
268 const BIGNUM *x, const BIGNUM *y, const BIGNUM *z, BN_CTX *);
269int ec_GFp_simple_get_Jprojective_coordinates(const EC_GROUP *,
270 const EC_POINT *, BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *);
271int ec_GFp_simple_point_set_affine_coordinates(const EC_GROUP *, EC_POINT *,
272 const BIGNUM *x, const BIGNUM *y, BN_CTX *);
273int ec_GFp_simple_point_get_affine_coordinates(const EC_GROUP *, const EC_POINT *,
274 BIGNUM *x, BIGNUM *y, BN_CTX *);
275int ec_GFp_simple_set_compressed_coordinates(const EC_GROUP *, EC_POINT *,
276 const BIGNUM *x, int y_bit, BN_CTX *);
277int ec_GFp_simple_add(const EC_GROUP *, EC_POINT *r, const EC_POINT *a, const EC_POINT *b, BN_CTX *);
278int ec_GFp_simple_dbl(const EC_GROUP *, EC_POINT *r, const EC_POINT *a, BN_CTX *);
279int ec_GFp_simple_invert(const EC_GROUP *, EC_POINT *, BN_CTX *);
280int ec_GFp_simple_is_at_infinity(const EC_GROUP *, const EC_POINT *);
281int ec_GFp_simple_is_on_curve(const EC_GROUP *, const EC_POINT *, BN_CTX *);
282int ec_GFp_simple_cmp(const EC_GROUP *, const EC_POINT *a, const EC_POINT *b, BN_CTX *);
283int ec_GFp_simple_make_affine(const EC_GROUP *, EC_POINT *, BN_CTX *);
284int ec_GFp_simple_points_make_affine(const EC_GROUP *, size_t num, EC_POINT *[], BN_CTX *);
285int ec_GFp_simple_field_mul(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *);
286int ec_GFp_simple_field_sqr(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, BN_CTX *);
287int ec_GFp_simple_blind_coordinates(const EC_GROUP *group, EC_POINT *p, BN_CTX *ctx);
288int ec_GFp_simple_mul_generator_ct(const EC_GROUP *, EC_POINT *r, const BIGNUM *scalar, BN_CTX *);
289int ec_GFp_simple_mul_single_ct(const EC_GROUP *, EC_POINT *r, const BIGNUM *scalar,
290 const EC_POINT *point, BN_CTX *);
291int ec_GFp_simple_mul_double_nonct(const EC_GROUP *, EC_POINT *r, const BIGNUM *g_scalar,
292 const BIGNUM *p_scalar, const EC_POINT *point, BN_CTX *);
293
294int ec_group_simple_order_bits(const EC_GROUP *group); 255int ec_group_simple_order_bits(const EC_GROUP *group);
295int ec_point_blind_coordinates(const EC_GROUP *group, EC_POINT *p, BN_CTX *ctx); 256int ec_point_blind_coordinates(const EC_GROUP *group, EC_POINT *p, BN_CTX *ctx);
296 257
diff --git a/src/lib/libcrypto/ec/ecp_methods.c b/src/lib/libcrypto/ec/ecp_methods.c
index f3c9f05850..6770ef839b 100644
--- a/src/lib/libcrypto/ec/ecp_methods.c
+++ b/src/lib/libcrypto/ec/ecp_methods.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ecp_methods.c,v 1.3 2024/11/12 10:44:25 tb Exp $ */ 1/* $OpenBSD: ecp_methods.c,v 1.4 2024/11/12 10:53:22 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.
@@ -86,7 +86,7 @@
86 * representation (i.e. 'encoding' means multiplying by some factor R). 86 * representation (i.e. 'encoding' means multiplying by some factor R).
87 */ 87 */
88 88
89int 89static int
90ec_GFp_simple_group_init(EC_GROUP *group) 90ec_GFp_simple_group_init(EC_GROUP *group)
91{ 91{
92 BN_init(&group->field); 92 BN_init(&group->field);
@@ -96,7 +96,7 @@ ec_GFp_simple_group_init(EC_GROUP *group)
96 return 1; 96 return 1;
97} 97}
98 98
99void 99static void
100ec_GFp_simple_group_finish(EC_GROUP *group) 100ec_GFp_simple_group_finish(EC_GROUP *group)
101{ 101{
102 BN_free(&group->field); 102 BN_free(&group->field);
@@ -104,7 +104,7 @@ ec_GFp_simple_group_finish(EC_GROUP *group)
104 BN_free(&group->b); 104 BN_free(&group->b);
105} 105}
106 106
107int 107static int
108ec_GFp_simple_group_copy(EC_GROUP *dest, const EC_GROUP *src) 108ec_GFp_simple_group_copy(EC_GROUP *dest, const EC_GROUP *src)
109{ 109{
110 if (!bn_copy(&dest->field, &src->field)) 110 if (!bn_copy(&dest->field, &src->field))
@@ -160,7 +160,7 @@ ec_encode_z_coordinate(const EC_GROUP *group, BIGNUM *bn, int *is_one,
160 return 1; 160 return 1;
161} 161}
162 162
163int 163static int
164ec_GFp_simple_group_set_curve(EC_GROUP *group, 164ec_GFp_simple_group_set_curve(EC_GROUP *group,
165 const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx) 165 const BIGNUM *p, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
166{ 166{
@@ -202,7 +202,7 @@ ec_GFp_simple_group_set_curve(EC_GROUP *group,
202 return ret; 202 return ret;
203} 203}
204 204
205int 205static int
206ec_GFp_simple_group_get_curve(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, 206ec_GFp_simple_group_get_curve(const EC_GROUP *group, BIGNUM *p, BIGNUM *a,
207 BIGNUM *b, BN_CTX *ctx) 207 BIGNUM *b, BN_CTX *ctx)
208{ 208{
@@ -218,13 +218,13 @@ ec_GFp_simple_group_get_curve(const EC_GROUP *group, BIGNUM *p, BIGNUM *a,
218 return 1; 218 return 1;
219} 219}
220 220
221int 221static int
222ec_GFp_simple_group_get_degree(const EC_GROUP *group) 222ec_GFp_simple_group_get_degree(const EC_GROUP *group)
223{ 223{
224 return BN_num_bits(&group->field); 224 return BN_num_bits(&group->field);
225} 225}
226 226
227int 227static int
228ec_GFp_simple_group_check_discriminant(const EC_GROUP *group, BN_CTX *ctx) 228ec_GFp_simple_group_check_discriminant(const EC_GROUP *group, BN_CTX *ctx)
229{ 229{
230 BIGNUM *p, *a, *b, *discriminant; 230 BIGNUM *p, *a, *b, *discriminant;
@@ -281,7 +281,7 @@ ec_GFp_simple_group_check_discriminant(const EC_GROUP *group, BN_CTX *ctx)
281 return ret; 281 return ret;
282} 282}
283 283
284int 284static int
285ec_GFp_simple_point_init(EC_POINT * point) 285ec_GFp_simple_point_init(EC_POINT * point)
286{ 286{
287 BN_init(&point->X); 287 BN_init(&point->X);
@@ -292,7 +292,7 @@ ec_GFp_simple_point_init(EC_POINT * point)
292 return 1; 292 return 1;
293} 293}
294 294
295void 295static void
296ec_GFp_simple_point_finish(EC_POINT *point) 296ec_GFp_simple_point_finish(EC_POINT *point)
297{ 297{
298 BN_free(&point->X); 298 BN_free(&point->X);
@@ -301,7 +301,7 @@ ec_GFp_simple_point_finish(EC_POINT *point)
301 point->Z_is_one = 0; 301 point->Z_is_one = 0;
302} 302}
303 303
304int 304static int
305ec_GFp_simple_point_copy(EC_POINT *dest, const EC_POINT *src) 305ec_GFp_simple_point_copy(EC_POINT *dest, const EC_POINT *src)
306{ 306{
307 if (!bn_copy(&dest->X, &src->X)) 307 if (!bn_copy(&dest->X, &src->X))
@@ -315,7 +315,7 @@ ec_GFp_simple_point_copy(EC_POINT *dest, const EC_POINT *src)
315 return 1; 315 return 1;
316} 316}
317 317
318int 318static int
319ec_GFp_simple_point_set_to_infinity(const EC_GROUP *group, EC_POINT *point) 319ec_GFp_simple_point_set_to_infinity(const EC_GROUP *group, EC_POINT *point)
320{ 320{
321 point->Z_is_one = 0; 321 point->Z_is_one = 0;
@@ -323,7 +323,7 @@ ec_GFp_simple_point_set_to_infinity(const EC_GROUP *group, EC_POINT *point)
323 return 1; 323 return 1;
324} 324}
325 325
326int 326static int
327ec_GFp_simple_set_Jprojective_coordinates(const EC_GROUP *group, 327ec_GFp_simple_set_Jprojective_coordinates(const EC_GROUP *group,
328 EC_POINT *point, const BIGNUM *x, const BIGNUM *y, const BIGNUM *z, 328 EC_POINT *point, const BIGNUM *x, const BIGNUM *y, const BIGNUM *z,
329 BN_CTX *ctx) 329 BN_CTX *ctx)
@@ -355,7 +355,7 @@ ec_GFp_simple_set_Jprojective_coordinates(const EC_GROUP *group,
355 return ret; 355 return ret;
356} 356}
357 357
358int 358static int
359ec_GFp_simple_get_Jprojective_coordinates(const EC_GROUP *group, 359ec_GFp_simple_get_Jprojective_coordinates(const EC_GROUP *group,
360 const EC_POINT *point, BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *ctx) 360 const EC_POINT *point, BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *ctx)
361{ 361{
@@ -374,7 +374,7 @@ ec_GFp_simple_get_Jprojective_coordinates(const EC_GROUP *group,
374 return ret; 374 return ret;
375} 375}
376 376
377int 377static int
378ec_GFp_simple_point_set_affine_coordinates(const EC_GROUP *group, EC_POINT *point, 378ec_GFp_simple_point_set_affine_coordinates(const EC_GROUP *group, EC_POINT *point,
379 const BIGNUM *x, const BIGNUM *y, BN_CTX *ctx) 379 const BIGNUM *x, const BIGNUM *y, BN_CTX *ctx)
380{ 380{
@@ -387,7 +387,7 @@ ec_GFp_simple_point_set_affine_coordinates(const EC_GROUP *group, EC_POINT *poin
387 BN_value_one(), ctx); 387 BN_value_one(), ctx);
388} 388}
389 389
390int 390static int
391ec_GFp_simple_point_get_affine_coordinates(const EC_GROUP *group, 391ec_GFp_simple_point_get_affine_coordinates(const EC_GROUP *group,
392 const EC_POINT *point, BIGNUM *x, BIGNUM *y, BN_CTX *ctx) 392 const EC_POINT *point, BIGNUM *x, BIGNUM *y, BN_CTX *ctx)
393{ 393{
@@ -468,7 +468,7 @@ ec_GFp_simple_point_get_affine_coordinates(const EC_GROUP *group,
468 return ret; 468 return ret;
469} 469}
470 470
471int 471static int
472ec_GFp_simple_set_compressed_coordinates(const EC_GROUP *group, 472ec_GFp_simple_set_compressed_coordinates(const EC_GROUP *group,
473 EC_POINT *point, const BIGNUM *in_x, int y_bit, BN_CTX *ctx) 473 EC_POINT *point, const BIGNUM *in_x, int y_bit, BN_CTX *ctx)
474{ 474{
@@ -566,7 +566,7 @@ ec_GFp_simple_set_compressed_coordinates(const EC_GROUP *group,
566 return ret; 566 return ret;
567} 567}
568 568
569int 569static int
570ec_GFp_simple_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, const EC_POINT *b, BN_CTX *ctx) 570ec_GFp_simple_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, const EC_POINT *b, BN_CTX *ctx)
571{ 571{
572 int (*field_mul) (const EC_GROUP *, BIGNUM *, const BIGNUM *, const BIGNUM *, BN_CTX *); 572 int (*field_mul) (const EC_GROUP *, BIGNUM *, const BIGNUM *, const BIGNUM *, BN_CTX *);
@@ -748,7 +748,7 @@ ec_GFp_simple_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, const E
748 return ret; 748 return ret;
749} 749}
750 750
751int 751static int
752ec_GFp_simple_dbl(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, BN_CTX *ctx) 752ec_GFp_simple_dbl(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, BN_CTX *ctx)
753{ 753{
754 int (*field_mul) (const EC_GROUP *, BIGNUM *, const BIGNUM *, const BIGNUM *, BN_CTX *); 754 int (*field_mul) (const EC_GROUP *, BIGNUM *, const BIGNUM *, const BIGNUM *, BN_CTX *);
@@ -882,7 +882,7 @@ ec_GFp_simple_dbl(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, BN_CTX
882 return ret; 882 return ret;
883} 883}
884 884
885int 885static int
886ec_GFp_simple_invert(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx) 886ec_GFp_simple_invert(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx)
887{ 887{
888 if (EC_POINT_is_at_infinity(group, point) || BN_is_zero(&point->Y)) 888 if (EC_POINT_is_at_infinity(group, point) || BN_is_zero(&point->Y))
@@ -892,13 +892,13 @@ ec_GFp_simple_invert(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx)
892 return BN_usub(&point->Y, &group->field, &point->Y); 892 return BN_usub(&point->Y, &group->field, &point->Y);
893} 893}
894 894
895int 895static int
896ec_GFp_simple_is_at_infinity(const EC_GROUP *group, const EC_POINT *point) 896ec_GFp_simple_is_at_infinity(const EC_GROUP *group, const EC_POINT *point)
897{ 897{
898 return BN_is_zero(&point->Z); 898 return BN_is_zero(&point->Z);
899} 899}
900 900
901int 901static int
902ec_GFp_simple_is_on_curve(const EC_GROUP *group, const EC_POINT *point, BN_CTX *ctx) 902ec_GFp_simple_is_on_curve(const EC_GROUP *group, const EC_POINT *point, BN_CTX *ctx)
903{ 903{
904 int (*field_mul) (const EC_GROUP *, BIGNUM *, const BIGNUM *, const BIGNUM *, BN_CTX *); 904 int (*field_mul) (const EC_GROUP *, BIGNUM *, const BIGNUM *, const BIGNUM *, BN_CTX *);
@@ -995,7 +995,7 @@ ec_GFp_simple_is_on_curve(const EC_GROUP *group, const EC_POINT *point, BN_CTX *
995 return ret; 995 return ret;
996} 996}
997 997
998int 998static int
999ec_GFp_simple_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b, BN_CTX *ctx) 999ec_GFp_simple_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b, BN_CTX *ctx)
1000{ 1000{
1001 /* 1001 /*
@@ -1091,7 +1091,7 @@ ec_GFp_simple_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b, B
1091 return ret; 1091 return ret;
1092} 1092}
1093 1093
1094int 1094static int
1095ec_GFp_simple_make_affine(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx) 1095ec_GFp_simple_make_affine(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx)
1096{ 1096{
1097 BIGNUM *x, *y; 1097 BIGNUM *x, *y;
@@ -1123,7 +1123,7 @@ ec_GFp_simple_make_affine(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx)
1123 return ret; 1123 return ret;
1124} 1124}
1125 1125
1126int 1126static int
1127ec_GFp_simple_points_make_affine(const EC_GROUP *group, size_t num, EC_POINT *points[], BN_CTX *ctx) 1127ec_GFp_simple_points_make_affine(const EC_GROUP *group, size_t num, EC_POINT *points[], BN_CTX *ctx)
1128{ 1128{
1129 BIGNUM *tmp0, *tmp1; 1129 BIGNUM *tmp0, *tmp1;
@@ -1292,13 +1292,13 @@ ec_GFp_simple_points_make_affine(const EC_GROUP *group, size_t num, EC_POINT *po
1292 return ret; 1292 return ret;
1293} 1293}
1294 1294
1295int 1295static int
1296ec_GFp_simple_field_mul(const EC_GROUP *group, BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx) 1296ec_GFp_simple_field_mul(const EC_GROUP *group, BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
1297{ 1297{
1298 return BN_mod_mul(r, a, b, &group->field, ctx); 1298 return BN_mod_mul(r, a, b, &group->field, ctx);
1299} 1299}
1300 1300
1301int 1301static int
1302ec_GFp_simple_field_sqr(const EC_GROUP *group, BIGNUM *r, const BIGNUM *a, BN_CTX *ctx) 1302ec_GFp_simple_field_sqr(const EC_GROUP *group, BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
1303{ 1303{
1304 return BN_mod_sqr(r, a, &group->field, ctx); 1304 return BN_mod_sqr(r, a, &group->field, ctx);
@@ -1311,7 +1311,7 @@ ec_GFp_simple_field_sqr(const EC_GROUP *group, BIGNUM *r, const BIGNUM *a, BN_CT
1311 * 1311 *
1312 * where lambda is in the interval [1, group->field). 1312 * where lambda is in the interval [1, group->field).
1313 */ 1313 */
1314int 1314static int
1315ec_GFp_simple_blind_coordinates(const EC_GROUP *group, EC_POINT *p, BN_CTX *ctx) 1315ec_GFp_simple_blind_coordinates(const EC_GROUP *group, EC_POINT *p, BN_CTX *ctx)
1316{ 1316{
1317 BIGNUM *lambda = NULL; 1317 BIGNUM *lambda = NULL;
@@ -1586,21 +1586,21 @@ ec_GFp_simple_mul_ct(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
1586#undef EC_POINT_BN_set_flags 1586#undef EC_POINT_BN_set_flags
1587#undef EC_POINT_CSWAP 1587#undef EC_POINT_CSWAP
1588 1588
1589int 1589static int
1590ec_GFp_simple_mul_generator_ct(const EC_GROUP *group, EC_POINT *r, 1590ec_GFp_simple_mul_generator_ct(const EC_GROUP *group, EC_POINT *r,
1591 const BIGNUM *scalar, BN_CTX *ctx) 1591 const BIGNUM *scalar, BN_CTX *ctx)
1592{ 1592{
1593 return ec_GFp_simple_mul_ct(group, r, scalar, NULL, ctx); 1593 return ec_GFp_simple_mul_ct(group, r, scalar, NULL, ctx);
1594} 1594}
1595 1595
1596int 1596static int
1597ec_GFp_simple_mul_single_ct(const EC_GROUP *group, EC_POINT *r, 1597ec_GFp_simple_mul_single_ct(const EC_GROUP *group, EC_POINT *r,
1598 const BIGNUM *scalar, const EC_POINT *point, BN_CTX *ctx) 1598 const BIGNUM *scalar, const EC_POINT *point, BN_CTX *ctx)
1599{ 1599{
1600 return ec_GFp_simple_mul_ct(group, r, scalar, point, ctx); 1600 return ec_GFp_simple_mul_ct(group, r, scalar, point, ctx);
1601} 1601}
1602 1602
1603int 1603static int
1604ec_GFp_simple_mul_double_nonct(const EC_GROUP *group, EC_POINT *r, 1604ec_GFp_simple_mul_double_nonct(const EC_GROUP *group, EC_POINT *r,
1605 const BIGNUM *g_scalar, const BIGNUM *p_scalar, const EC_POINT *point, 1605 const BIGNUM *g_scalar, const BIGNUM *p_scalar, const EC_POINT *point,
1606 BN_CTX *ctx) 1606 BN_CTX *ctx)