Changeset 94082 in vbox for trunk/src/libs/openssl-3.0.1/crypto/ec/ec2_smpl.c
- Timestamp:
- Mar 3, 2022 7:17:34 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 150325
- Location:
- trunk/src/libs/openssl-3.0.1
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/openssl-3.0.1
- Property svn:mergeinfo
-
old new 12 12 /vendor/openssl/1.1.1c:131722-131725 13 13 /vendor/openssl/1.1.1k:145841-145843 14 /vendor/openssl/3.0.1:150323-150324 15 /vendor/openssl/current:147554-150322
-
- Property svn:mergeinfo
-
trunk/src/libs/openssl-3.0.1/crypto/ec/ec2_smpl.c
r91772 r94082 1 1 /* 2 * Copyright 2002-20 19The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 2002-2021 The OpenSSL Project Authors. All Rights Reserved. 3 3 * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved 4 4 * 5 * Licensed under the OpenSSL license(the "License"). You may not use5 * Licensed under the Apache License 2.0 (the "License"). You may not use 6 6 * this file except in compliance with the License. You can obtain a copy 7 7 * in the file LICENSE in the source distribution or at … … 9 9 */ 10 10 11 /* 12 * ECDSA low level APIs are deprecated for public use, but still ok for 13 * internal use. 14 */ 15 #include "internal/deprecated.h" 16 11 17 #include <openssl/err.h> 12 18 … … 20 26 * are handled by EC_GROUP_new. 21 27 */ 22 int ec_GF2m_simple_group_init(EC_GROUP *group)28 int ossl_ec_GF2m_simple_group_init(EC_GROUP *group) 23 29 { 24 30 group->field = BN_new(); … … 39 45 * handled by EC_GROUP_free. 40 46 */ 41 void ec_GF2m_simple_group_finish(EC_GROUP *group)47 void ossl_ec_GF2m_simple_group_finish(EC_GROUP *group) 42 48 { 43 49 BN_free(group->field); … … 50 56 * members are handled by EC_GROUP_clear_free. 51 57 */ 52 void ec_GF2m_simple_group_clear_finish(EC_GROUP *group)58 void ossl_ec_GF2m_simple_group_clear_finish(EC_GROUP *group) 53 59 { 54 60 BN_clear_free(group->field); … … 67 73 * handled by EC_GROUP_copy. 68 74 */ 69 int ec_GF2m_simple_group_copy(EC_GROUP *dest, const EC_GROUP *src)75 int ossl_ec_GF2m_simple_group_copy(EC_GROUP *dest, const EC_GROUP *src) 70 76 { 71 77 if (!BN_copy(dest->field, src->field)) … … 93 99 94 100 /* Set the curve parameters of an EC_GROUP structure. */ 95 int ec_GF2m_simple_group_set_curve(EC_GROUP *group,96 const BIGNUM *p, const BIGNUM *a,97 const BIGNUM *b, BN_CTX *ctx)101 int ossl_ec_GF2m_simple_group_set_curve(EC_GROUP *group, 102 const BIGNUM *p, const BIGNUM *a, 103 const BIGNUM *b, BN_CTX *ctx) 98 104 { 99 105 int ret = 0, i; … … 104 110 i = BN_GF2m_poly2arr(group->field, group->poly, 6) - 1; 105 111 if ((i != 5) && (i != 3)) { 106 E Cerr(EC_F_EC_GF2M_SIMPLE_GROUP_SET_CURVE, EC_R_UNSUPPORTED_FIELD);112 ERR_raise(ERR_LIB_EC, EC_R_UNSUPPORTED_FIELD); 107 113 goto err; 108 114 } … … 133 139 * then there values will not be set but the method will return with success. 134 140 */ 135 int ec_GF2m_simple_group_get_curve(const EC_GROUP *group, BIGNUM *p,136 BIGNUM *a, BIGNUM *b, BN_CTX *ctx)141 int ossl_ec_GF2m_simple_group_get_curve(const EC_GROUP *group, BIGNUM *p, 142 BIGNUM *a, BIGNUM *b, BN_CTX *ctx) 137 143 { 138 144 int ret = 0; … … 163 169 * m. 164 170 */ 165 int ec_GF2m_simple_group_get_degree(const EC_GROUP *group)171 int ossl_ec_GF2m_simple_group_get_degree(const EC_GROUP *group) 166 172 { 167 173 return BN_num_bits(group->field) - 1; … … 172 178 * elliptic curve <=> b != 0 (mod p) 173 179 */ 174 int ec_GF2m_simple_group_check_discriminant(const EC_GROUP *group,175 BN_CTX *ctx)180 int ossl_ec_GF2m_simple_group_check_discriminant(const EC_GROUP *group, 181 BN_CTX *ctx) 176 182 { 177 183 int ret = 0; 178 184 BIGNUM *b; 185 #ifndef FIPS_MODULE 179 186 BN_CTX *new_ctx = NULL; 180 187 … … 182 189 ctx = new_ctx = BN_CTX_new(); 183 190 if (ctx == NULL) { 184 ECerr(EC_F_EC_GF2M_SIMPLE_GROUP_CHECK_DISCRIMINANT, 185 ERR_R_MALLOC_FAILURE); 191 ERR_raise(ERR_LIB_EC, ERR_R_MALLOC_FAILURE); 186 192 goto err; 187 193 } 188 194 } 195 #endif 189 196 BN_CTX_start(ctx); 190 197 b = BN_CTX_get(ctx); … … 206 213 err: 207 214 BN_CTX_end(ctx); 215 #ifndef FIPS_MODULE 208 216 BN_CTX_free(new_ctx); 217 #endif 209 218 return ret; 210 219 } 211 220 212 221 /* Initializes an EC_POINT. */ 213 int ec_GF2m_simple_point_init(EC_POINT *point)222 int ossl_ec_GF2m_simple_point_init(EC_POINT *point) 214 223 { 215 224 point->X = BN_new(); … … 227 236 228 237 /* Frees an EC_POINT. */ 229 void ec_GF2m_simple_point_finish(EC_POINT *point)238 void ossl_ec_GF2m_simple_point_finish(EC_POINT *point) 230 239 { 231 240 BN_free(point->X); … … 235 244 236 245 /* Clears and frees an EC_POINT. */ 237 void ec_GF2m_simple_point_clear_finish(EC_POINT *point)246 void ossl_ec_GF2m_simple_point_clear_finish(EC_POINT *point) 238 247 { 239 248 BN_clear_free(point->X); … … 247 256 * initialized. 248 257 */ 249 int ec_GF2m_simple_point_copy(EC_POINT *dest, const EC_POINT *src)258 int ossl_ec_GF2m_simple_point_copy(EC_POINT *dest, const EC_POINT *src) 250 259 { 251 260 if (!BN_copy(dest->X, src->X)) … … 265 274 * represented by having Z=0. 266 275 */ 267 int ec_GF2m_simple_point_set_to_infinity(const EC_GROUP *group,268 EC_POINT *point)276 int ossl_ec_GF2m_simple_point_set_to_infinity(const EC_GROUP *group, 277 EC_POINT *point) 269 278 { 270 279 point->Z_is_one = 0; … … 277 286 * the simple implementation only uses affine coordinates. 278 287 */ 279 int ec_GF2m_simple_point_set_affine_coordinates(const EC_GROUP *group, 280 EC_POINT *point, 281 const BIGNUM *x, 282 const BIGNUM *y, BN_CTX *ctx) 288 int ossl_ec_GF2m_simple_point_set_affine_coordinates(const EC_GROUP *group, 289 EC_POINT *point, 290 const BIGNUM *x, 291 const BIGNUM *y, 292 BN_CTX *ctx) 283 293 { 284 294 int ret = 0; 285 295 if (x == NULL || y == NULL) { 286 ECerr(EC_F_EC_GF2M_SIMPLE_POINT_SET_AFFINE_COORDINATES, 287 ERR_R_PASSED_NULL_PARAMETER); 296 ERR_raise(ERR_LIB_EC, ERR_R_PASSED_NULL_PARAMETER); 288 297 return 0; 289 298 } … … 309 318 * implementation only uses affine coordinates. 310 319 */ 311 int ec_GF2m_simple_point_get_affine_coordinates(const EC_GROUP *group,312 const EC_POINT *point,313 BIGNUM *x, BIGNUM *y,314 BN_CTX *ctx)320 int ossl_ec_GF2m_simple_point_get_affine_coordinates(const EC_GROUP *group, 321 const EC_POINT *point, 322 BIGNUM *x, BIGNUM *y, 323 BN_CTX *ctx) 315 324 { 316 325 int ret = 0; 317 326 318 327 if (EC_POINT_is_at_infinity(group, point)) { 319 ECerr(EC_F_EC_GF2M_SIMPLE_POINT_GET_AFFINE_COORDINATES, 320 EC_R_POINT_AT_INFINITY); 328 ERR_raise(ERR_LIB_EC, EC_R_POINT_AT_INFINITY); 321 329 return 0; 322 330 } 323 331 324 332 if (BN_cmp(point->Z, BN_value_one())) { 325 ECerr(EC_F_EC_GF2M_SIMPLE_POINT_GET_AFFINE_COORDINATES, 326 ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); 333 ERR_raise(ERR_LIB_EC, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); 327 334 return 0; 328 335 } … … 347 354 * b. Uses algorithm A.10.2 of IEEE P1363. 348 355 */ 349 int ec_GF2m_simple_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, 350 const EC_POINT *b, BN_CTX *ctx) 351 { 352 BN_CTX *new_ctx = NULL; 356 int ossl_ec_GF2m_simple_add(const EC_GROUP *group, EC_POINT *r, 357 const EC_POINT *a, const EC_POINT *b, BN_CTX *ctx) 358 { 353 359 BIGNUM *x0, *y0, *x1, *y1, *x2, *y2, *s, *t; 354 360 int ret = 0; 361 #ifndef FIPS_MODULE 362 BN_CTX *new_ctx = NULL; 363 #endif 355 364 356 365 if (EC_POINT_is_at_infinity(group, a)) { … … 366 375 } 367 376 377 #ifndef FIPS_MODULE 368 378 if (ctx == NULL) { 369 379 ctx = new_ctx = BN_CTX_new(); … … 371 381 return 0; 372 382 } 383 #endif 373 384 374 385 BN_CTX_start(ctx); … … 454 465 err: 455 466 BN_CTX_end(ctx); 467 #ifndef FIPS_MODULE 456 468 BN_CTX_free(new_ctx); 469 #endif 457 470 return ret; 458 471 } … … 462 475 * A.10.2 of IEEE P1363. 463 476 */ 464 int ec_GF2m_simple_dbl(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a, 465 BN_CTX *ctx) 466 { 467 return ec_GF2m_simple_add(group, r, a, a, ctx); 468 } 469 470 int ec_GF2m_simple_invert(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx) 477 int ossl_ec_GF2m_simple_dbl(const EC_GROUP *group, EC_POINT *r, 478 const EC_POINT *a, BN_CTX *ctx) 479 { 480 return ossl_ec_GF2m_simple_add(group, r, a, a, ctx); 481 } 482 483 int ossl_ec_GF2m_simple_invert(const EC_GROUP *group, EC_POINT *point, 484 BN_CTX *ctx) 471 485 { 472 486 if (EC_POINT_is_at_infinity(group, point) || BN_is_zero(point->Y)) … … 474 488 return 1; 475 489 476 if (!EC_POINT_make_affine(group, point, ctx)) 490 if (group->meth->make_affine == NULL 491 || !group->meth->make_affine(group, point, ctx)) 477 492 return 0; 478 493 return BN_GF2m_add(point->Y, point->X, point->Y); … … 480 495 481 496 /* Indicates whether the given point is the point at infinity. */ 482 int ec_GF2m_simple_is_at_infinity(const EC_GROUP *group,483 const EC_POINT *point)497 int ossl_ec_GF2m_simple_is_at_infinity(const EC_GROUP *group, 498 const EC_POINT *point) 484 499 { 485 500 return BN_is_zero(point->Z); … … 491 506 * y^2 + x*y = x^3 + a*x^2 + b. 492 507 */ 493 int ec_GF2m_simple_is_on_curve(const EC_GROUP *group, const EC_POINT *point,494 BN_CTX *ctx)508 int ossl_ec_GF2m_simple_is_on_curve(const EC_GROUP *group, const EC_POINT *point, 509 BN_CTX *ctx) 495 510 { 496 511 int ret = -1; 497 BN_CTX *new_ctx = NULL;498 512 BIGNUM *lh, *y2; 499 513 int (*field_mul) (const EC_GROUP *, BIGNUM *, const BIGNUM *, 500 514 const BIGNUM *, BN_CTX *); 501 515 int (*field_sqr) (const EC_GROUP *, BIGNUM *, const BIGNUM *, BN_CTX *); 516 #ifndef FIPS_MODULE 517 BN_CTX *new_ctx = NULL; 518 #endif 502 519 503 520 if (EC_POINT_is_at_infinity(group, point)) … … 511 528 return -1; 512 529 530 #ifndef FIPS_MODULE 513 531 if (ctx == NULL) { 514 532 ctx = new_ctx = BN_CTX_new(); … … 516 534 return -1; 517 535 } 536 #endif 518 537 519 538 BN_CTX_start(ctx); … … 547 566 err: 548 567 BN_CTX_end(ctx); 568 #ifndef FIPS_MODULE 549 569 BN_CTX_free(new_ctx); 570 #endif 550 571 return ret; 551 572 } … … 558 579 * 1 not equal 559 580 */ 560 int ec_GF2m_simple_cmp(const EC_GROUP *group, const EC_POINT *a,561 const EC_POINT *b, BN_CTX *ctx)581 int ossl_ec_GF2m_simple_cmp(const EC_GROUP *group, const EC_POINT *a, 582 const EC_POINT *b, BN_CTX *ctx) 562 583 { 563 584 BIGNUM *aX, *aY, *bX, *bY; 585 int ret = -1; 586 #ifndef FIPS_MODULE 564 587 BN_CTX *new_ctx = NULL; 565 int ret = -1; 588 #endif 566 589 567 590 if (EC_POINT_is_at_infinity(group, a)) { … … 576 599 } 577 600 601 #ifndef FIPS_MODULE 578 602 if (ctx == NULL) { 579 603 ctx = new_ctx = BN_CTX_new(); … … 581 605 return -1; 582 606 } 607 #endif 583 608 584 609 BN_CTX_start(ctx); … … 598 623 err: 599 624 BN_CTX_end(ctx); 625 #ifndef FIPS_MODULE 600 626 BN_CTX_free(new_ctx); 627 #endif 601 628 return ret; 602 629 } 603 630 604 631 /* Forces the given EC_POINT to internally use affine coordinates. */ 605 int ec_GF2m_simple_make_affine(const EC_GROUP *group, EC_POINT *point, 606 BN_CTX *ctx) 607 { 608 BN_CTX *new_ctx = NULL; 632 int ossl_ec_GF2m_simple_make_affine(const EC_GROUP *group, EC_POINT *point, 633 BN_CTX *ctx) 634 { 609 635 BIGNUM *x, *y; 610 636 int ret = 0; 637 #ifndef FIPS_MODULE 638 BN_CTX *new_ctx = NULL; 639 #endif 611 640 612 641 if (point->Z_is_one || EC_POINT_is_at_infinity(group, point)) 613 642 return 1; 614 643 644 #ifndef FIPS_MODULE 615 645 if (ctx == NULL) { 616 646 ctx = new_ctx = BN_CTX_new(); … … 618 648 return 0; 619 649 } 650 #endif 620 651 621 652 BN_CTX_start(ctx); … … 639 670 err: 640 671 BN_CTX_end(ctx); 672 #ifndef FIPS_MODULE 641 673 BN_CTX_free(new_ctx); 674 #endif 642 675 return ret; 643 676 } … … 646 679 * Forces each of the EC_POINTs in the given array to use affine coordinates. 647 680 */ 648 int ec_GF2m_simple_points_make_affine(const EC_GROUP *group, size_t num,649 EC_POINT *points[], BN_CTX *ctx)681 int ossl_ec_GF2m_simple_points_make_affine(const EC_GROUP *group, size_t num, 682 EC_POINT *points[], BN_CTX *ctx) 650 683 { 651 684 size_t i; … … 660 693 661 694 /* Wrapper to simple binary polynomial field multiplication implementation. */ 662 int ec_GF2m_simple_field_mul(const EC_GROUP *group, BIGNUM *r,663 const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)695 int ossl_ec_GF2m_simple_field_mul(const EC_GROUP *group, BIGNUM *r, 696 const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx) 664 697 { 665 698 return BN_GF2m_mod_mul_arr(r, a, b, group->poly, ctx); … … 667 700 668 701 /* Wrapper to simple binary polynomial field squaring implementation. */ 669 int ec_GF2m_simple_field_sqr(const EC_GROUP *group, BIGNUM *r,670 const BIGNUM *a, BN_CTX *ctx)702 int ossl_ec_GF2m_simple_field_sqr(const EC_GROUP *group, BIGNUM *r, 703 const BIGNUM *a, BN_CTX *ctx) 671 704 { 672 705 return BN_GF2m_mod_sqr_arr(r, a, group->poly, ctx); … … 674 707 675 708 /* Wrapper to simple binary polynomial field division implementation. */ 676 int ec_GF2m_simple_field_div(const EC_GROUP *group, BIGNUM *r,677 const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)709 int ossl_ec_GF2m_simple_field_div(const EC_GROUP *group, BIGNUM *r, 710 const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx) 678 711 { 679 712 return BN_GF2m_mod_div(r, a, b, group->field, ctx); … … 697 730 /* s blinding: make sure lambda (s->Z here) is not zero */ 698 731 do { 699 if (!BN_priv_rand (s->Z, BN_num_bits(group->field) - 1,700 BN_RAND_TOP_ANY, BN_RAND_BOTTOM_ANY)) {701 E Cerr(EC_F_EC_GF2M_SIMPLE_LADDER_PRE, ERR_R_BN_LIB);732 if (!BN_priv_rand_ex(s->Z, BN_num_bits(group->field) - 1, 733 BN_RAND_TOP_ANY, BN_RAND_BOTTOM_ANY, 0, ctx)) { 734 ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB); 702 735 return 0; 703 736 } … … 712 745 /* r blinding: make sure lambda (r->Y here for storage) is not zero */ 713 746 do { 714 if (!BN_priv_rand (r->Y, BN_num_bits(group->field) - 1,715 BN_RAND_TOP_ANY, BN_RAND_BOTTOM_ANY)) {716 E Cerr(EC_F_EC_GF2M_SIMPLE_LADDER_PRE, ERR_R_BN_LIB);747 if (!BN_priv_rand_ex(r->Y, BN_num_bits(group->field) - 1, 748 BN_RAND_TOP_ANY, BN_RAND_BOTTOM_ANY, 0, ctx)) { 749 ERR_raise(ERR_LIB_EC, ERR_R_BN_LIB); 717 750 return 0; 718 751 } … … 783 816 if (!EC_POINT_copy(r, p) 784 817 || !EC_POINT_invert(group, r, ctx)) { 785 E Cerr(EC_F_EC_GF2M_SIMPLE_LADDER_POST, ERR_R_EC_LIB);818 ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB); 786 819 return 0; 787 820 } … … 794 827 t2 = BN_CTX_get(ctx); 795 828 if (t2 == NULL) { 796 E Cerr(EC_F_EC_GF2M_SIMPLE_LADDER_POST, ERR_R_MALLOC_FAILURE);829 ERR_raise(ERR_LIB_EC, ERR_R_MALLOC_FAILURE); 797 830 goto err; 798 831 } … … 857 890 */ 858 891 if (num > 1 || BN_is_zero(group->order) || BN_is_zero(group->cofactor)) 859 return ec_wNAF_mul(group, r, scalar, num, points, scalars, ctx);892 return ossl_ec_wNAF_mul(group, r, scalar, num, points, scalars, ctx); 860 893 861 894 if (scalar != NULL && num == 0) 862 895 /* Fixed point multiplication */ 863 return ec_scalar_mul_ladder(group, r, scalar, NULL, ctx);896 return ossl_ec_scalar_mul_ladder(group, r, scalar, NULL, ctx); 864 897 865 898 if (scalar == NULL && num == 1) 866 899 /* Variable point multiplication */ 867 return ec_scalar_mul_ladder(group, r, scalars[0], points[0], ctx);900 return ossl_ec_scalar_mul_ladder(group, r, scalars[0], points[0], ctx); 868 901 869 902 /*- … … 873 906 874 907 if ((t = EC_POINT_new(group)) == NULL) { 875 E Cerr(EC_F_EC_GF2M_SIMPLE_POINTS_MUL, ERR_R_MALLOC_FAILURE);876 return 0; 877 } 878 879 if (! ec_scalar_mul_ladder(group, t, scalar, NULL, ctx)880 || ! ec_scalar_mul_ladder(group, r, scalars[0], points[0], ctx)908 ERR_raise(ERR_LIB_EC, ERR_R_MALLOC_FAILURE); 909 return 0; 910 } 911 912 if (!ossl_ec_scalar_mul_ladder(group, t, scalar, NULL, ctx) 913 || !ossl_ec_scalar_mul_ladder(group, r, scalars[0], points[0], ctx) 881 914 || !EC_POINT_add(group, r, t, r, ctx)) 882 915 goto err; … … 900 933 901 934 if (!(ret = BN_GF2m_mod_inv(r, a, group->field, ctx))) 902 E Cerr(EC_F_EC_GF2M_SIMPLE_FIELD_INV, EC_R_CANNOT_INVERT);935 ERR_raise(ERR_LIB_EC, EC_R_CANNOT_INVERT); 903 936 return ret; 904 937 } … … 909 942 EC_FLAGS_DEFAULT_OCT, 910 943 NID_X9_62_characteristic_two_field, 911 ec_GF2m_simple_group_init, 912 ec_GF2m_simple_group_finish, 913 ec_GF2m_simple_group_clear_finish, 914 ec_GF2m_simple_group_copy, 915 ec_GF2m_simple_group_set_curve, 916 ec_GF2m_simple_group_get_curve, 917 ec_GF2m_simple_group_get_degree, 918 ec_group_simple_order_bits, 919 ec_GF2m_simple_group_check_discriminant, 920 ec_GF2m_simple_point_init, 921 ec_GF2m_simple_point_finish, 922 ec_GF2m_simple_point_clear_finish, 923 ec_GF2m_simple_point_copy, 924 ec_GF2m_simple_point_set_to_infinity, 925 0, /* set_Jprojective_coordinates_GFp */ 926 0, /* get_Jprojective_coordinates_GFp */ 927 ec_GF2m_simple_point_set_affine_coordinates, 928 ec_GF2m_simple_point_get_affine_coordinates, 944 ossl_ec_GF2m_simple_group_init, 945 ossl_ec_GF2m_simple_group_finish, 946 ossl_ec_GF2m_simple_group_clear_finish, 947 ossl_ec_GF2m_simple_group_copy, 948 ossl_ec_GF2m_simple_group_set_curve, 949 ossl_ec_GF2m_simple_group_get_curve, 950 ossl_ec_GF2m_simple_group_get_degree, 951 ossl_ec_group_simple_order_bits, 952 ossl_ec_GF2m_simple_group_check_discriminant, 953 ossl_ec_GF2m_simple_point_init, 954 ossl_ec_GF2m_simple_point_finish, 955 ossl_ec_GF2m_simple_point_clear_finish, 956 ossl_ec_GF2m_simple_point_copy, 957 ossl_ec_GF2m_simple_point_set_to_infinity, 958 ossl_ec_GF2m_simple_point_set_affine_coordinates, 959 ossl_ec_GF2m_simple_point_get_affine_coordinates, 929 960 0, /* point_set_compressed_coordinates */ 930 961 0, /* point2oct */ 931 962 0, /* oct2point */ 932 ec_GF2m_simple_add,933 ec_GF2m_simple_dbl,934 ec_GF2m_simple_invert,935 ec_GF2m_simple_is_at_infinity,936 ec_GF2m_simple_is_on_curve,937 ec_GF2m_simple_cmp,938 ec_GF2m_simple_make_affine,939 ec_GF2m_simple_points_make_affine,963 ossl_ec_GF2m_simple_add, 964 ossl_ec_GF2m_simple_dbl, 965 ossl_ec_GF2m_simple_invert, 966 ossl_ec_GF2m_simple_is_at_infinity, 967 ossl_ec_GF2m_simple_is_on_curve, 968 ossl_ec_GF2m_simple_cmp, 969 ossl_ec_GF2m_simple_make_affine, 970 ossl_ec_GF2m_simple_points_make_affine, 940 971 ec_GF2m_simple_points_mul, 941 972 0, /* precompute_mult */ 942 973 0, /* have_precompute_mult */ 943 ec_GF2m_simple_field_mul,944 ec_GF2m_simple_field_sqr,945 ec_GF2m_simple_field_div,974 ossl_ec_GF2m_simple_field_mul, 975 ossl_ec_GF2m_simple_field_sqr, 976 ossl_ec_GF2m_simple_field_div, 946 977 ec_GF2m_simple_field_inv, 947 978 0, /* field_encode */ 948 979 0, /* field_decode */ 949 980 0, /* field_set_to_one */ 950 ec_key_simple_priv2oct,951 ec_key_simple_oct2priv,981 ossl_ec_key_simple_priv2oct, 982 ossl_ec_key_simple_oct2priv, 952 983 0, /* set private */ 953 ec_key_simple_generate_key,954 ec_key_simple_check_key,955 ec_key_simple_generate_public_key,984 ossl_ec_key_simple_generate_key, 985 ossl_ec_key_simple_check_key, 986 ossl_ec_key_simple_generate_public_key, 956 987 0, /* keycopy */ 957 988 0, /* keyfinish */ 958 ecdh_simple_compute_key, 989 ossl_ecdh_simple_compute_key, 990 ossl_ecdsa_simple_sign_setup, 991 ossl_ecdsa_simple_sign_sig, 992 ossl_ecdsa_simple_verify_sig, 959 993 0, /* field_inverse_mod_ord */ 960 994 0, /* blind_coordinates */
Note:
See TracChangeset
for help on using the changeset viewer.