VirtualBox

Ignore:
Timestamp:
Mar 3, 2022 7:17:34 PM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
150325
Message:

libs/openssl-3.0.1: started applying and adjusting our OpenSSL changes to 3.0.1. bugref:10128

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  
        1212/vendor/openssl/1.1.1c:131722-131725
        1313/vendor/openssl/1.1.1k:145841-145843
         14/vendor/openssl/3.0.1:150323-150324
         15/vendor/openssl/current:147554-150322
  • trunk/src/libs/openssl-3.0.1/crypto/ec/ec2_smpl.c

    r91772 r94082  
    11/*
    2  * Copyright 2002-2019 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 2002-2021 The OpenSSL Project Authors. All Rights Reserved.
    33 * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
    44 *
    5  * Licensed under the OpenSSL license (the "License").  You may not use
     5 * Licensed under the Apache License 2.0 (the "License").  You may not use
    66 * this file except in compliance with the License.  You can obtain a copy
    77 * in the file LICENSE in the source distribution or at
     
    99 */
    1010
     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
    1117#include <openssl/err.h>
    1218
     
    2026 * are handled by EC_GROUP_new.
    2127 */
    22 int ec_GF2m_simple_group_init(EC_GROUP *group)
     28int ossl_ec_GF2m_simple_group_init(EC_GROUP *group)
    2329{
    2430    group->field = BN_new();
     
    3945 * handled by EC_GROUP_free.
    4046 */
    41 void ec_GF2m_simple_group_finish(EC_GROUP *group)
     47void ossl_ec_GF2m_simple_group_finish(EC_GROUP *group)
    4248{
    4349    BN_free(group->field);
     
    5056 * members are handled by EC_GROUP_clear_free.
    5157 */
    52 void ec_GF2m_simple_group_clear_finish(EC_GROUP *group)
     58void ossl_ec_GF2m_simple_group_clear_finish(EC_GROUP *group)
    5359{
    5460    BN_clear_free(group->field);
     
    6773 * handled by EC_GROUP_copy.
    6874 */
    69 int ec_GF2m_simple_group_copy(EC_GROUP *dest, const EC_GROUP *src)
     75int ossl_ec_GF2m_simple_group_copy(EC_GROUP *dest, const EC_GROUP *src)
    7076{
    7177    if (!BN_copy(dest->field, src->field))
     
    9399
    94100/* 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)
     101int ossl_ec_GF2m_simple_group_set_curve(EC_GROUP *group,
     102                                        const BIGNUM *p, const BIGNUM *a,
     103                                        const BIGNUM *b, BN_CTX *ctx)
    98104{
    99105    int ret = 0, i;
     
    104110    i = BN_GF2m_poly2arr(group->field, group->poly, 6) - 1;
    105111    if ((i != 5) && (i != 3)) {
    106         ECerr(EC_F_EC_GF2M_SIMPLE_GROUP_SET_CURVE, EC_R_UNSUPPORTED_FIELD);
     112        ERR_raise(ERR_LIB_EC, EC_R_UNSUPPORTED_FIELD);
    107113        goto err;
    108114    }
     
    133139 * then there values will not be set but the method will return with success.
    134140 */
    135 int ec_GF2m_simple_group_get_curve(const EC_GROUP *group, BIGNUM *p,
    136                                    BIGNUM *a, BIGNUM *b, BN_CTX *ctx)
     141int ossl_ec_GF2m_simple_group_get_curve(const EC_GROUP *group, BIGNUM *p,
     142                                        BIGNUM *a, BIGNUM *b, BN_CTX *ctx)
    137143{
    138144    int ret = 0;
     
    163169 * m.
    164170 */
    165 int ec_GF2m_simple_group_get_degree(const EC_GROUP *group)
     171int ossl_ec_GF2m_simple_group_get_degree(const EC_GROUP *group)
    166172{
    167173    return BN_num_bits(group->field) - 1;
     
    172178 * elliptic curve <=> b != 0 (mod p)
    173179 */
    174 int ec_GF2m_simple_group_check_discriminant(const EC_GROUP *group,
    175                                             BN_CTX *ctx)
     180int ossl_ec_GF2m_simple_group_check_discriminant(const EC_GROUP *group,
     181                                                 BN_CTX *ctx)
    176182{
    177183    int ret = 0;
    178184    BIGNUM *b;
     185#ifndef FIPS_MODULE
    179186    BN_CTX *new_ctx = NULL;
    180187
     
    182189        ctx = new_ctx = BN_CTX_new();
    183190        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);
    186192            goto err;
    187193        }
    188194    }
     195#endif
    189196    BN_CTX_start(ctx);
    190197    b = BN_CTX_get(ctx);
     
    206213 err:
    207214    BN_CTX_end(ctx);
     215#ifndef FIPS_MODULE
    208216    BN_CTX_free(new_ctx);
     217#endif
    209218    return ret;
    210219}
    211220
    212221/* Initializes an EC_POINT. */
    213 int ec_GF2m_simple_point_init(EC_POINT *point)
     222int ossl_ec_GF2m_simple_point_init(EC_POINT *point)
    214223{
    215224    point->X = BN_new();
     
    227236
    228237/* Frees an EC_POINT. */
    229 void ec_GF2m_simple_point_finish(EC_POINT *point)
     238void ossl_ec_GF2m_simple_point_finish(EC_POINT *point)
    230239{
    231240    BN_free(point->X);
     
    235244
    236245/* Clears and frees an EC_POINT. */
    237 void ec_GF2m_simple_point_clear_finish(EC_POINT *point)
     246void ossl_ec_GF2m_simple_point_clear_finish(EC_POINT *point)
    238247{
    239248    BN_clear_free(point->X);
     
    247256 * initialized.
    248257 */
    249 int ec_GF2m_simple_point_copy(EC_POINT *dest, const EC_POINT *src)
     258int ossl_ec_GF2m_simple_point_copy(EC_POINT *dest, const EC_POINT *src)
    250259{
    251260    if (!BN_copy(dest->X, src->X))
     
    265274 * represented by having Z=0.
    266275 */
    267 int ec_GF2m_simple_point_set_to_infinity(const EC_GROUP *group,
    268                                          EC_POINT *point)
     276int ossl_ec_GF2m_simple_point_set_to_infinity(const EC_GROUP *group,
     277                                              EC_POINT *point)
    269278{
    270279    point->Z_is_one = 0;
     
    277286 * the simple implementation only uses affine coordinates.
    278287 */
    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)
     288int 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)
    283293{
    284294    int ret = 0;
    285295    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);
    288297        return 0;
    289298    }
     
    309318 * implementation only uses affine coordinates.
    310319 */
    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)
     320int 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)
    315324{
    316325    int ret = 0;
    317326
    318327    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);
    321329        return 0;
    322330    }
    323331
    324332    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);
    327334        return 0;
    328335    }
     
    347354 * b. Uses algorithm A.10.2 of IEEE P1363.
    348355 */
    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;
     356int 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{
    353359    BIGNUM *x0, *y0, *x1, *y1, *x2, *y2, *s, *t;
    354360    int ret = 0;
     361#ifndef FIPS_MODULE
     362    BN_CTX *new_ctx = NULL;
     363#endif
    355364
    356365    if (EC_POINT_is_at_infinity(group, a)) {
     
    366375    }
    367376
     377#ifndef FIPS_MODULE
    368378    if (ctx == NULL) {
    369379        ctx = new_ctx = BN_CTX_new();
     
    371381            return 0;
    372382    }
     383#endif
    373384
    374385    BN_CTX_start(ctx);
     
    454465 err:
    455466    BN_CTX_end(ctx);
     467#ifndef FIPS_MODULE
    456468    BN_CTX_free(new_ctx);
     469#endif
    457470    return ret;
    458471}
     
    462475 * A.10.2 of IEEE P1363.
    463476 */
    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)
     477int 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
     483int ossl_ec_GF2m_simple_invert(const EC_GROUP *group, EC_POINT *point,
     484                               BN_CTX *ctx)
    471485{
    472486    if (EC_POINT_is_at_infinity(group, point) || BN_is_zero(point->Y))
     
    474488        return 1;
    475489
    476     if (!EC_POINT_make_affine(group, point, ctx))
     490    if (group->meth->make_affine == NULL
     491        || !group->meth->make_affine(group, point, ctx))
    477492        return 0;
    478493    return BN_GF2m_add(point->Y, point->X, point->Y);
     
    480495
    481496/* 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)
     497int ossl_ec_GF2m_simple_is_at_infinity(const EC_GROUP *group,
     498                                       const EC_POINT *point)
    484499{
    485500    return BN_is_zero(point->Z);
     
    491506 *      y^2 + x*y = x^3 + a*x^2 + b.
    492507 */
    493 int ec_GF2m_simple_is_on_curve(const EC_GROUP *group, const EC_POINT *point,
    494                                BN_CTX *ctx)
     508int ossl_ec_GF2m_simple_is_on_curve(const EC_GROUP *group, const EC_POINT *point,
     509                                    BN_CTX *ctx)
    495510{
    496511    int ret = -1;
    497     BN_CTX *new_ctx = NULL;
    498512    BIGNUM *lh, *y2;
    499513    int (*field_mul) (const EC_GROUP *, BIGNUM *, const BIGNUM *,
    500514                      const BIGNUM *, BN_CTX *);
    501515    int (*field_sqr) (const EC_GROUP *, BIGNUM *, const BIGNUM *, BN_CTX *);
     516#ifndef FIPS_MODULE
     517    BN_CTX *new_ctx = NULL;
     518#endif
    502519
    503520    if (EC_POINT_is_at_infinity(group, point))
     
    511528        return -1;
    512529
     530#ifndef FIPS_MODULE
    513531    if (ctx == NULL) {
    514532        ctx = new_ctx = BN_CTX_new();
     
    516534            return -1;
    517535    }
     536#endif
    518537
    519538    BN_CTX_start(ctx);
     
    547566 err:
    548567    BN_CTX_end(ctx);
     568#ifndef FIPS_MODULE
    549569    BN_CTX_free(new_ctx);
     570#endif
    550571    return ret;
    551572}
     
    558579 *   1   not equal
    559580 */
    560 int ec_GF2m_simple_cmp(const EC_GROUP *group, const EC_POINT *a,
    561                        const EC_POINT *b, BN_CTX *ctx)
     581int ossl_ec_GF2m_simple_cmp(const EC_GROUP *group, const EC_POINT *a,
     582                            const EC_POINT *b, BN_CTX *ctx)
    562583{
    563584    BIGNUM *aX, *aY, *bX, *bY;
     585    int ret = -1;
     586#ifndef FIPS_MODULE
    564587    BN_CTX *new_ctx = NULL;
    565     int ret = -1;
     588#endif
    566589
    567590    if (EC_POINT_is_at_infinity(group, a)) {
     
    576599    }
    577600
     601#ifndef FIPS_MODULE
    578602    if (ctx == NULL) {
    579603        ctx = new_ctx = BN_CTX_new();
     
    581605            return -1;
    582606    }
     607#endif
    583608
    584609    BN_CTX_start(ctx);
     
    598623 err:
    599624    BN_CTX_end(ctx);
     625#ifndef FIPS_MODULE
    600626    BN_CTX_free(new_ctx);
     627#endif
    601628    return ret;
    602629}
    603630
    604631/* 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;
     632int ossl_ec_GF2m_simple_make_affine(const EC_GROUP *group, EC_POINT *point,
     633                                    BN_CTX *ctx)
     634{
    609635    BIGNUM *x, *y;
    610636    int ret = 0;
     637#ifndef FIPS_MODULE
     638    BN_CTX *new_ctx = NULL;
     639#endif
    611640
    612641    if (point->Z_is_one || EC_POINT_is_at_infinity(group, point))
    613642        return 1;
    614643
     644#ifndef FIPS_MODULE
    615645    if (ctx == NULL) {
    616646        ctx = new_ctx = BN_CTX_new();
     
    618648            return 0;
    619649    }
     650#endif
    620651
    621652    BN_CTX_start(ctx);
     
    639670 err:
    640671    BN_CTX_end(ctx);
     672#ifndef FIPS_MODULE
    641673    BN_CTX_free(new_ctx);
     674#endif
    642675    return ret;
    643676}
     
    646679 * Forces each of the EC_POINTs in the given array to use affine coordinates.
    647680 */
    648 int ec_GF2m_simple_points_make_affine(const EC_GROUP *group, size_t num,
    649                                       EC_POINT *points[], BN_CTX *ctx)
     681int ossl_ec_GF2m_simple_points_make_affine(const EC_GROUP *group, size_t num,
     682                                           EC_POINT *points[], BN_CTX *ctx)
    650683{
    651684    size_t i;
     
    660693
    661694/* 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)
     695int ossl_ec_GF2m_simple_field_mul(const EC_GROUP *group, BIGNUM *r,
     696                                  const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
    664697{
    665698    return BN_GF2m_mod_mul_arr(r, a, b, group->poly, ctx);
     
    667700
    668701/* 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)
     702int ossl_ec_GF2m_simple_field_sqr(const EC_GROUP *group, BIGNUM *r,
     703                                  const BIGNUM *a, BN_CTX *ctx)
    671704{
    672705    return BN_GF2m_mod_sqr_arr(r, a, group->poly, ctx);
     
    674707
    675708/* 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)
     709int ossl_ec_GF2m_simple_field_div(const EC_GROUP *group, BIGNUM *r,
     710                                  const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
    678711{
    679712    return BN_GF2m_mod_div(r, a, b, group->field, ctx);
     
    697730    /* s blinding: make sure lambda (s->Z here) is not zero */
    698731    do {
    699         if (!BN_priv_rand(s->Z, BN_num_bits(group->field) - 1,
    700                           BN_RAND_TOP_ANY, BN_RAND_BOTTOM_ANY)) {
    701             ECerr(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);
    702735            return 0;
    703736        }
     
    712745    /* r blinding: make sure lambda (r->Y here for storage) is not zero */
    713746    do {
    714         if (!BN_priv_rand(r->Y, BN_num_bits(group->field) - 1,
    715                           BN_RAND_TOP_ANY, BN_RAND_BOTTOM_ANY)) {
    716             ECerr(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);
    717750            return 0;
    718751        }
     
    783816        if (!EC_POINT_copy(r, p)
    784817            || !EC_POINT_invert(group, r, ctx)) {
    785             ECerr(EC_F_EC_GF2M_SIMPLE_LADDER_POST, ERR_R_EC_LIB);
     818            ERR_raise(ERR_LIB_EC, ERR_R_EC_LIB);
    786819            return 0;
    787820        }
     
    794827    t2 = BN_CTX_get(ctx);
    795828    if (t2 == NULL) {
    796         ECerr(EC_F_EC_GF2M_SIMPLE_LADDER_POST, ERR_R_MALLOC_FAILURE);
     829        ERR_raise(ERR_LIB_EC, ERR_R_MALLOC_FAILURE);
    797830        goto err;
    798831    }
     
    857890     */
    858891    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);
    860893
    861894    if (scalar != NULL && num == 0)
    862895        /* 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);
    864897
    865898    if (scalar == NULL && num == 1)
    866899        /* 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);
    868901
    869902    /*-
     
    873906
    874907    if ((t = EC_POINT_new(group)) == NULL) {
    875         ECerr(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)
    881914        || !EC_POINT_add(group, r, t, r, ctx))
    882915        goto err;
     
    900933
    901934    if (!(ret = BN_GF2m_mod_inv(r, a, group->field, ctx)))
    902         ECerr(EC_F_EC_GF2M_SIMPLE_FIELD_INV, EC_R_CANNOT_INVERT);
     935        ERR_raise(ERR_LIB_EC, EC_R_CANNOT_INVERT);
    903936    return ret;
    904937}
     
    909942        EC_FLAGS_DEFAULT_OCT,
    910943        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,
    929960        0, /* point_set_compressed_coordinates */
    930961        0, /* point2oct */
    931962        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,
    940971        ec_GF2m_simple_points_mul,
    941972        0, /* precompute_mult */
    942973        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,
    946977        ec_GF2m_simple_field_inv,
    947978        0, /* field_encode */
    948979        0, /* field_decode */
    949980        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,
    952983        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,
    956987        0, /* keycopy */
    957988        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,
    959993        0, /* field_inverse_mod_ord */
    960994        0, /* blind_coordinates */
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette