Coverage Report

Created: 2026-07-16 06:59

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/openssl/crypto/ec/ec_local.h
Line
Count
Source
1
/*
2
 * Copyright 2001-2024 The OpenSSL Project Authors. All Rights Reserved.
3
 * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
4
 *
5
 * Licensed under the Apache License 2.0 (the "License").  You may not use
6
 * this file except in compliance with the License.  You can obtain a copy
7
 * in the file LICENSE in the source distribution or at
8
 * https://www.openssl.org/source/license.html
9
 */
10
11
#if !defined(OSSL_LIBCRYPTO_EC_EC_LOCAL_H)
12
#define OSSL_LIBCRYPTO_EC_EC_LOCAL_H
13
14
#include <stdlib.h>
15
16
#include <openssl/obj_mac.h>
17
#include <openssl/ec.h>
18
#include <openssl/bn.h>
19
#include "internal/refcount.h"
20
#include "crypto/ec.h"
21
22
#if defined(__SUNPRO_C)
23
#if __SUNPRO_C >= 0x520
24
#pragma error_messages(off, E_ARRAY_OF_INCOMPLETE_NONAME, E_ARRAY_OF_INCOMPLETE)
25
#endif
26
#endif
27
28
/* Use default functions for poin2oct, oct2point and compressed coordinates */
29
0
#define EC_FLAGS_DEFAULT_OCT 0x1
30
31
/* Use custom formats for EC_GROUP, EC_POINT and EC_KEY */
32
0
#define EC_FLAGS_CUSTOM_CURVE 0x2
33
34
/* Curve does not support signing operations */
35
0
#define EC_FLAGS_NO_SIGN 0x4
36
37
#ifdef OPENSSL_NO_DEPRECATED_3_0
38
typedef struct ec_method_st EC_METHOD;
39
#endif
40
41
/*
42
 * Structure details are not part of the exported interface, so all this may
43
 * change in future versions.
44
 */
45
46
struct ec_method_st {
47
    /* Various method flags */
48
    int flags;
49
    /* used by EC_METHOD_get_field_type: */
50
    int field_type; /* a NID */
51
    /*
52
     * used by EC_GROUP_new, EC_GROUP_free, EC_GROUP_clear_free,
53
     * EC_GROUP_copy:
54
     */
55
    int (*group_init)(EC_GROUP *);
56
    void (*group_finish)(EC_GROUP *);
57
    void (*group_clear_finish)(EC_GROUP *);
58
    int (*group_copy)(EC_GROUP *, const EC_GROUP *);
59
    /* used by EC_GROUP_set_curve, EC_GROUP_get_curve: */
60
    int (*group_set_curve)(EC_GROUP *, const BIGNUM *p, const BIGNUM *a,
61
        const BIGNUM *b, BN_CTX *);
62
    int (*group_get_curve)(const EC_GROUP *, BIGNUM *p, BIGNUM *a, BIGNUM *b,
63
        BN_CTX *);
64
    /* used by EC_GROUP_get_degree: */
65
    int (*group_get_degree)(const EC_GROUP *);
66
    int (*group_order_bits)(const EC_GROUP *);
67
    /* used by EC_GROUP_check: */
68
    int (*group_check_discriminant)(const EC_GROUP *, BN_CTX *);
69
    /*
70
     * used by EC_POINT_new, EC_POINT_free, EC_POINT_clear_free,
71
     * EC_POINT_copy:
72
     */
73
    int (*point_init)(EC_POINT *);
74
    void (*point_finish)(EC_POINT *);
75
    void (*point_clear_finish)(EC_POINT *);
76
    int (*point_copy)(EC_POINT *, const EC_POINT *);
77
    /*-
78
     * used by EC_POINT_set_to_infinity,
79
     * EC_POINT_set_Jprojective_coordinates_GFp,
80
     * EC_POINT_get_Jprojective_coordinates_GFp,
81
     * EC_POINT_set_affine_coordinates,
82
     * EC_POINT_get_affine_coordinates,
83
     * EC_POINT_set_compressed_coordinates:
84
     */
85
    int (*point_set_to_infinity)(const EC_GROUP *, EC_POINT *);
86
    int (*point_set_affine_coordinates)(const EC_GROUP *, EC_POINT *,
87
        const BIGNUM *x, const BIGNUM *y,
88
        BN_CTX *);
89
    int (*point_get_affine_coordinates)(const EC_GROUP *, const EC_POINT *,
90
        BIGNUM *x, BIGNUM *y, BN_CTX *);
91
    int (*point_set_compressed_coordinates)(const EC_GROUP *, EC_POINT *,
92
        const BIGNUM *x, int y_bit,
93
        BN_CTX *);
94
    /* used by EC_POINT_point2oct, EC_POINT_oct2point: */
95
    size_t (*point2oct)(const EC_GROUP *, const EC_POINT *,
96
        point_conversion_form_t form, unsigned char *buf,
97
        size_t len, BN_CTX *);
98
    int (*oct2point)(const EC_GROUP *, EC_POINT *, const unsigned char *buf,
99
        size_t len, BN_CTX *);
100
    /* used by EC_POINT_add, EC_POINT_dbl, ECP_POINT_invert: */
101
    int (*add)(const EC_GROUP *, EC_POINT *r, const EC_POINT *a,
102
        const EC_POINT *b, BN_CTX *);
103
    int (*dbl)(const EC_GROUP *, EC_POINT *r, const EC_POINT *a, BN_CTX *);
104
    int (*invert)(const EC_GROUP *, EC_POINT *, BN_CTX *);
105
    /*
106
     * used by EC_POINT_is_at_infinity, EC_POINT_is_on_curve, EC_POINT_cmp:
107
     */
108
    int (*is_at_infinity)(const EC_GROUP *, const EC_POINT *);
109
    int (*is_on_curve)(const EC_GROUP *, const EC_POINT *, BN_CTX *);
110
    int (*point_cmp)(const EC_GROUP *, const EC_POINT *a, const EC_POINT *b,
111
        BN_CTX *);
112
    /* used by EC_POINT_make_affine, EC_POINTs_make_affine: */
113
    int (*make_affine)(const EC_GROUP *, EC_POINT *, BN_CTX *);
114
    int (*points_make_affine)(const EC_GROUP *, size_t num, EC_POINT *[],
115
        BN_CTX *);
116
    /*
117
     * used by EC_POINTs_mul, EC_POINT_mul, EC_POINT_precompute_mult,
118
     * EC_POINT_have_precompute_mult (default implementations are used if the
119
     * 'mul' pointer is 0):
120
     */
121
    /*-
122
     * mul() calculates the value
123
     *
124
     *   r := generator * scalar
125
     *        + points[0] * scalars[0]
126
     *        + ...
127
     *        + points[num-1] * scalars[num-1].
128
     *
129
     * For a fixed point multiplication (scalar != NULL, num == 0)
130
     * or a variable point multiplication (scalar == NULL, num == 1),
131
     * mul() must use a constant time algorithm: in both cases callers
132
     * should provide an input scalar (either scalar or scalars[0])
133
     * in the range [0, ec_group_order); for robustness, implementers
134
     * should handle the case when the scalar has not been reduced, but
135
     * may treat it as an unusual input, without any constant-timeness
136
     * guarantee.
137
     */
138
    int (*mul)(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
139
        size_t num, const EC_POINT *points[], const BIGNUM *scalars[],
140
        BN_CTX *);
141
    int (*precompute_mult)(EC_GROUP *group, BN_CTX *);
142
    int (*have_precompute_mult)(const EC_GROUP *group);
143
    /* internal functions */
144
    /*
145
     * 'field_mul', 'field_sqr', and 'field_div' can be used by 'add' and
146
     * 'dbl' so that the same implementations of point operations can be used
147
     * with different optimized implementations of expensive field
148
     * operations:
149
     */
150
    int (*field_mul)(const EC_GROUP *, BIGNUM *r, const BIGNUM *a,
151
        const BIGNUM *b, BN_CTX *);
152
    int (*field_sqr)(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, BN_CTX *);
153
    int (*field_div)(const EC_GROUP *, BIGNUM *r, const BIGNUM *a,
154
        const BIGNUM *b, BN_CTX *);
155
    /*-
156
     * 'field_inv' computes the multiplicative inverse of a in the field,
157
     * storing the result in r.
158
     *
159
     * If 'a' is zero (or equivalent), you'll get an EC_R_CANNOT_INVERT error.
160
     */
161
    int (*field_inv)(const EC_GROUP *, BIGNUM *r, const BIGNUM *a, BN_CTX *);
162
    /* e.g. to Montgomery */
163
    int (*field_encode)(const EC_GROUP *, BIGNUM *r, const BIGNUM *a,
164
        BN_CTX *);
165
    /* e.g. from Montgomery */
166
    int (*field_decode)(const EC_GROUP *, BIGNUM *r, const BIGNUM *a,
167
        BN_CTX *);
168
    int (*field_set_to_one)(const EC_GROUP *, BIGNUM *r, BN_CTX *);
169
    /* private key operations */
170
    size_t (*priv2oct)(const EC_KEY *eckey, unsigned char *buf, size_t len);
171
    int (*oct2priv)(EC_KEY *eckey, const unsigned char *buf, size_t len);
172
    int (*set_private)(EC_KEY *eckey, const BIGNUM *priv_key);
173
    int (*keygen)(EC_KEY *eckey);
174
    int (*keycheck)(const EC_KEY *eckey);
175
    int (*keygenpub)(EC_KEY *eckey);
176
    int (*keycopy)(EC_KEY *dst, const EC_KEY *src);
177
    void (*keyfinish)(EC_KEY *eckey);
178
    /* custom ECDH operation */
179
    int (*ecdh_compute_key)(unsigned char **pout, size_t *poutlen,
180
        const EC_POINT *pub_key, const EC_KEY *ecdh);
181
    /* custom ECDSA */
182
    int (*ecdsa_sign_setup)(EC_KEY *eckey, BN_CTX *ctx, BIGNUM **kinvp,
183
        BIGNUM **rp);
184
    ECDSA_SIG *(*ecdsa_sign_sig)(const unsigned char *dgst, int dgstlen,
185
        const BIGNUM *kinv, const BIGNUM *r,
186
        EC_KEY *eckey);
187
    int (*ecdsa_verify_sig)(const unsigned char *dgst, int dgstlen,
188
        const ECDSA_SIG *sig, EC_KEY *eckey);
189
    /* Inverse modulo order */
190
    int (*field_inverse_mod_ord)(const EC_GROUP *, BIGNUM *r,
191
        const BIGNUM *x, BN_CTX *);
192
    int (*blind_coordinates)(const EC_GROUP *group, EC_POINT *p, BN_CTX *ctx);
193
    int (*ladder_pre)(const EC_GROUP *group,
194
        EC_POINT *r, EC_POINT *s,
195
        EC_POINT *p, BN_CTX *ctx);
196
    int (*ladder_step)(const EC_GROUP *group,
197
        EC_POINT *r, EC_POINT *s,
198
        EC_POINT *p, BN_CTX *ctx);
199
    int (*ladder_post)(const EC_GROUP *group,
200
        EC_POINT *r, EC_POINT *s,
201
        EC_POINT *p, BN_CTX *ctx);
202
    int (*group_full_init)(EC_GROUP *group, const unsigned char *data);
203
};
204
205
/*
206
 * Types and functions to manipulate pre-computed values.
207
 */
208
typedef struct nistp224_pre_comp_st NISTP224_PRE_COMP;
209
typedef struct nistp256_pre_comp_st NISTP256_PRE_COMP;
210
typedef struct nistp384_pre_comp_st NISTP384_PRE_COMP;
211
typedef struct nistp521_pre_comp_st NISTP521_PRE_COMP;
212
typedef struct nistz256_pre_comp_st NISTZ256_PRE_COMP;
213
typedef struct ec_pre_comp_st EC_PRE_COMP;
214
215
struct ec_group_st {
216
    const EC_METHOD *meth;
217
    EC_POINT *generator; /* optional */
218
    BIGNUM *order, *cofactor;
219
    int curve_name; /* optional NID for named curve */
220
    int asn1_flag; /* flag to control the asn1 encoding */
221
    int decoded_from_explicit_params; /* set if decoded from explicit
222
                                       * curve parameters encoding */
223
    point_conversion_form_t asn1_form;
224
    unsigned char *seed; /* optional seed for parameters (appears in
225
                          * ASN1) */
226
    size_t seed_len;
227
    /*
228
     * The following members are handled by the method functions, even if
229
     * they appear generic
230
     */
231
    /*
232
     * Field specification. For curves over GF(p), this is the modulus; for
233
     * curves over GF(2^m), this is the irreducible polynomial defining the
234
     * field.
235
     */
236
    BIGNUM *field;
237
    /*
238
     * Field specification for curves over GF(2^m). The irreducible f(t) is
239
     * then of the form: t^poly[0] + t^poly[1] + ... + t^poly[k] where m =
240
     * poly[0] > poly[1] > ... > poly[k] = 0. The array is terminated with
241
     * poly[k+1]=-1. All elliptic curve irreducibles have at most 5 non-zero
242
     * terms.
243
     */
244
    int poly[6];
245
    /*
246
     * Curve coefficients. (Here the assumption is that BIGNUMs can be used
247
     * or abused for all kinds of fields, not just GF(p).) For characteristic
248
     * > 3, the curve is defined by a Weierstrass equation of the form y^2 =
249
     * x^3 + a*x + b. For characteristic 2, the curve is defined by an
250
     * equation of the form y^2 + x*y = x^3 + a*x^2 + b.
251
     */
252
    BIGNUM *a, *b;
253
    /* enable optimized point arithmetic for special case */
254
    int a_is_minus3;
255
    /* method-specific (e.g., Montgomery structure) */
256
    void *field_data1;
257
    /* method-specific */
258
    void *field_data2;
259
    /* method-specific */
260
    int (*field_mod_func)(BIGNUM *, const BIGNUM *, const BIGNUM *,
261
        BN_CTX *);
262
    /* data for ECDSA inverse */
263
    BN_MONT_CTX *mont_data;
264
265
    /*
266
     * Precomputed values for speed. The PCT_xxx names match the
267
     * pre_comp.xxx union names; see the SETPRECOMP and HAVEPRECOMP
268
     * macros, below.
269
     */
270
    enum {
271
        PCT_none,
272
        PCT_nistp224,
273
        PCT_nistp256,
274
        PCT_nistp384,
275
        PCT_nistp521,
276
        PCT_nistz256,
277
        PCT_ec
278
    } pre_comp_type;
279
    union {
280
        NISTP224_PRE_COMP *nistp224;
281
        NISTP256_PRE_COMP *nistp256;
282
        NISTP384_PRE_COMP *nistp384;
283
        NISTP521_PRE_COMP *nistp521;
284
        NISTZ256_PRE_COMP *nistz256;
285
        EC_PRE_COMP *ec;
286
    } pre_comp;
287
288
    OSSL_LIB_CTX *libctx;
289
    char *propq;
290
};
291
292
#define SETPRECOMP(g, type, pre) \
293
0
    g->pre_comp_type = PCT_##type, g->pre_comp.type = pre
294
#define HAVEPRECOMP(g, type) \
295
0
    g->pre_comp_type == PCT_##type && g->pre_comp.type != NULL
296
297
struct ec_key_st {
298
    const EC_KEY_METHOD *meth;
299
    int version;
300
    EC_GROUP *group;
301
    EC_POINT *pub_key;
302
    BIGNUM *priv_key;
303
    unsigned int enc_flag;
304
    CRYPTO_REF_COUNT references;
305
    int flags;
306
#ifndef FIPS_MODULE
307
    CRYPTO_EX_DATA ex_data;
308
#endif
309
    OSSL_LIB_CTX *libctx;
310
    char *propq;
311
312
    /* Provider data */
313
    size_t dirty_cnt; /* If any key material changes, increment this */
314
};
315
316
struct ec_point_st {
317
    const EC_METHOD *meth;
318
    /* NID for the curve if known */
319
    int curve_name;
320
    /*
321
     * All members except 'meth' are handled by the method functions, even if
322
     * they appear generic
323
     */
324
    BIGNUM *X;
325
    BIGNUM *Y;
326
    BIGNUM *Z; /* Jacobian projective coordinates: * (X, Y,
327
                * Z) represents (X/Z^2, Y/Z^3) if Z != 0 */
328
    int Z_is_one; /* enable optimized point arithmetic for
329
                   * special case */
330
};
331
332
static ossl_inline int ec_point_is_compat(const EC_POINT *point,
333
    const EC_GROUP *group)
334
0
{
335
0
    return group->meth == point->meth
336
0
        && (group->curve_name == 0
337
0
            || point->curve_name == 0
338
0
            || group->curve_name == point->curve_name);
339
0
}
Unexecuted instantiation: curve25519.c:ec_point_is_compat
Unexecuted instantiation: ec_ameth.c:ec_point_is_compat
Unexecuted instantiation: ec_asn1.c:ec_point_is_compat
Unexecuted instantiation: ec_backend.c:ec_point_is_compat
Unexecuted instantiation: ec_check.c:ec_point_is_compat
Unexecuted instantiation: ec_curve.c:ec_point_is_compat
Unexecuted instantiation: ec_cvt.c:ec_point_is_compat
Unexecuted instantiation: ec_key.c:ec_point_is_compat
Unexecuted instantiation: ec_kmeth.c:ec_point_is_compat
Unexecuted instantiation: ec_lib.c:ec_point_is_compat
Unexecuted instantiation: ec_mult.c:ec_point_is_compat
Unexecuted instantiation: ec_oct.c:ec_point_is_compat
Unexecuted instantiation: ecdh_kdf.c:ec_point_is_compat
Unexecuted instantiation: ecdh_ossl.c:ec_point_is_compat
Unexecuted instantiation: ecdsa_ossl.c:ec_point_is_compat
Unexecuted instantiation: ecdsa_sign.c:ec_point_is_compat
Unexecuted instantiation: ecdsa_vrf.c:ec_point_is_compat
Unexecuted instantiation: ecp_mont.c:ec_point_is_compat
Unexecuted instantiation: ecp_nist.c:ec_point_is_compat
Unexecuted instantiation: ecp_oct.c:ec_point_is_compat
Unexecuted instantiation: ecp_smpl.c:ec_point_is_compat
Unexecuted instantiation: ecx_meth.c:ec_point_is_compat
Unexecuted instantiation: ec2_oct.c:ec_point_is_compat
Unexecuted instantiation: ec2_smpl.c:ec_point_is_compat
340
341
NISTP224_PRE_COMP *EC_nistp224_pre_comp_dup(NISTP224_PRE_COMP *);
342
NISTP256_PRE_COMP *EC_nistp256_pre_comp_dup(NISTP256_PRE_COMP *);
343
NISTP384_PRE_COMP *ossl_ec_nistp384_pre_comp_dup(NISTP384_PRE_COMP *);
344
NISTP521_PRE_COMP *EC_nistp521_pre_comp_dup(NISTP521_PRE_COMP *);
345
NISTZ256_PRE_COMP *EC_nistz256_pre_comp_dup(NISTZ256_PRE_COMP *);
346
NISTP256_PRE_COMP *EC_nistp256_pre_comp_dup(NISTP256_PRE_COMP *);
347
EC_PRE_COMP *EC_ec_pre_comp_dup(EC_PRE_COMP *);
348
349
void EC_pre_comp_free(EC_GROUP *group);
350
void EC_nistp224_pre_comp_free(NISTP224_PRE_COMP *);
351
void EC_nistp256_pre_comp_free(NISTP256_PRE_COMP *);
352
void ossl_ec_nistp384_pre_comp_free(NISTP384_PRE_COMP *);
353
void EC_nistp521_pre_comp_free(NISTP521_PRE_COMP *);
354
void EC_nistz256_pre_comp_free(NISTZ256_PRE_COMP *);
355
void EC_ec_pre_comp_free(EC_PRE_COMP *);
356
357
/*
358
 * method functions in ec_mult.c (ec_lib.c uses these as defaults if
359
 * group->method->mul is 0)
360
 */
361
int ossl_ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
362
    size_t num, const EC_POINT *points[],
363
    const BIGNUM *scalars[], BN_CTX *);
364
int ossl_ec_wNAF_precompute_mult(EC_GROUP *group, BN_CTX *);
365
int ossl_ec_wNAF_have_precompute_mult(const EC_GROUP *group);
366
367
/* method functions in ecp_smpl.c */
368
int ossl_ec_GFp_simple_group_init(EC_GROUP *);
369
void ossl_ec_GFp_simple_group_finish(EC_GROUP *);
370
void ossl_ec_GFp_simple_group_clear_finish(EC_GROUP *);
371
int ossl_ec_GFp_simple_group_copy(EC_GROUP *, const EC_GROUP *);
372
int ossl_ec_GFp_simple_group_set_curve(EC_GROUP *, const BIGNUM *p,
373
    const BIGNUM *a, const BIGNUM *b,
374
    BN_CTX *);
375
int ossl_ec_GFp_simple_group_get_curve(const EC_GROUP *, BIGNUM *p, BIGNUM *a,
376
    BIGNUM *b, BN_CTX *);
377
int ossl_ec_GFp_simple_group_get_degree(const EC_GROUP *);
378
int ossl_ec_GFp_simple_group_check_discriminant(const EC_GROUP *, BN_CTX *);
379
int ossl_ec_GFp_simple_point_init(EC_POINT *);
380
void ossl_ec_GFp_simple_point_finish(EC_POINT *);
381
void ossl_ec_GFp_simple_point_clear_finish(EC_POINT *);
382
int ossl_ec_GFp_simple_point_copy(EC_POINT *, const EC_POINT *);
383
int ossl_ec_GFp_simple_point_set_to_infinity(const EC_GROUP *, EC_POINT *);
384
int ossl_ec_GFp_simple_set_Jprojective_coordinates_GFp(const EC_GROUP *,
385
    EC_POINT *,
386
    const BIGNUM *x,
387
    const BIGNUM *y,
388
    const BIGNUM *z,
389
    BN_CTX *);
390
int ossl_ec_GFp_simple_get_Jprojective_coordinates_GFp(const EC_GROUP *,
391
    const EC_POINT *,
392
    BIGNUM *x,
393
    BIGNUM *y, BIGNUM *z,
394
    BN_CTX *);
395
int ossl_ec_GFp_simple_point_set_affine_coordinates(const EC_GROUP *, EC_POINT *,
396
    const BIGNUM *x,
397
    const BIGNUM *y, BN_CTX *);
398
int ossl_ec_GFp_simple_point_get_affine_coordinates(const EC_GROUP *,
399
    const EC_POINT *, BIGNUM *x,
400
    BIGNUM *y, BN_CTX *);
401
int ossl_ec_GFp_simple_set_compressed_coordinates(const EC_GROUP *, EC_POINT *,
402
    const BIGNUM *x, int y_bit,
403
    BN_CTX *);
404
size_t ossl_ec_GFp_simple_point2oct(const EC_GROUP *, const EC_POINT *,
405
    point_conversion_form_t form,
406
    unsigned char *buf, size_t len, BN_CTX *);
407
int ossl_ec_GFp_simple_oct2point(const EC_GROUP *, EC_POINT *,
408
    const unsigned char *buf, size_t len, BN_CTX *);
409
int ossl_ec_GFp_simple_add(const EC_GROUP *, EC_POINT *r, const EC_POINT *a,
410
    const EC_POINT *b, BN_CTX *);
411
int ossl_ec_GFp_simple_dbl(const EC_GROUP *, EC_POINT *r, const EC_POINT *a,
412
    BN_CTX *);
413
int ossl_ec_GFp_simple_invert(const EC_GROUP *, EC_POINT *, BN_CTX *);
414
int ossl_ec_GFp_simple_is_at_infinity(const EC_GROUP *, const EC_POINT *);
415
int ossl_ec_GFp_simple_is_on_curve(const EC_GROUP *, const EC_POINT *, BN_CTX *);
416
int ossl_ec_GFp_simple_cmp(const EC_GROUP *, const EC_POINT *a,
417
    const EC_POINT *b, BN_CTX *);
418
int ossl_ec_GFp_simple_make_affine(const EC_GROUP *, EC_POINT *, BN_CTX *);
419
int ossl_ec_GFp_simple_points_make_affine(const EC_GROUP *, size_t num,
420
    EC_POINT *[], BN_CTX *);
421
int ossl_ec_GFp_simple_field_mul(const EC_GROUP *, BIGNUM *r, const BIGNUM *a,
422
    const BIGNUM *b, BN_CTX *);
423
int ossl_ec_GFp_simple_field_sqr(const EC_GROUP *, BIGNUM *r, const BIGNUM *a,
424
    BN_CTX *);
425
int ossl_ec_GFp_simple_field_inv(const EC_GROUP *, BIGNUM *r, const BIGNUM *a,
426
    BN_CTX *);
427
int ossl_ec_GFp_simple_blind_coordinates(const EC_GROUP *group, EC_POINT *p,
428
    BN_CTX *ctx);
429
int ossl_ec_GFp_simple_ladder_pre(const EC_GROUP *group,
430
    EC_POINT *r, EC_POINT *s,
431
    EC_POINT *p, BN_CTX *ctx);
432
int ossl_ec_GFp_simple_ladder_step(const EC_GROUP *group,
433
    EC_POINT *r, EC_POINT *s,
434
    EC_POINT *p, BN_CTX *ctx);
435
int ossl_ec_GFp_simple_ladder_post(const EC_GROUP *group,
436
    EC_POINT *r, EC_POINT *s,
437
    EC_POINT *p, BN_CTX *ctx);
438
439
/* method functions in ecp_mont.c */
440
int ossl_ec_GFp_mont_group_init(EC_GROUP *);
441
int ossl_ec_GFp_mont_group_set_curve(EC_GROUP *, const BIGNUM *p,
442
    const BIGNUM *a,
443
    const BIGNUM *b, BN_CTX *);
444
void ossl_ec_GFp_mont_group_finish(EC_GROUP *);
445
void ossl_ec_GFp_mont_group_clear_finish(EC_GROUP *);
446
int ossl_ec_GFp_mont_group_copy(EC_GROUP *, const EC_GROUP *);
447
int ossl_ec_GFp_mont_field_mul(const EC_GROUP *, BIGNUM *r, const BIGNUM *a,
448
    const BIGNUM *b, BN_CTX *);
449
int ossl_ec_GFp_mont_field_sqr(const EC_GROUP *, BIGNUM *r, const BIGNUM *a,
450
    BN_CTX *);
451
int ossl_ec_GFp_mont_field_inv(const EC_GROUP *, BIGNUM *r, const BIGNUM *a,
452
    BN_CTX *);
453
int ossl_ec_GFp_mont_field_encode(const EC_GROUP *, BIGNUM *r, const BIGNUM *a,
454
    BN_CTX *);
455
int ossl_ec_GFp_mont_field_decode(const EC_GROUP *, BIGNUM *r, const BIGNUM *a,
456
    BN_CTX *);
457
int ossl_ec_GFp_mont_field_set_to_one(const EC_GROUP *, BIGNUM *r, BN_CTX *);
458
459
/* method functions in ecp_nist.c */
460
int ossl_ec_GFp_nist_group_copy(EC_GROUP *dest, const EC_GROUP *src);
461
int ossl_ec_GFp_nist_group_set_curve(EC_GROUP *, const BIGNUM *p,
462
    const BIGNUM *a, const BIGNUM *b, BN_CTX *);
463
int ossl_ec_GFp_nist_field_mul(const EC_GROUP *, BIGNUM *r, const BIGNUM *a,
464
    const BIGNUM *b, BN_CTX *);
465
int ossl_ec_GFp_nist_field_sqr(const EC_GROUP *, BIGNUM *r, const BIGNUM *a,
466
    BN_CTX *);
467
468
/* method functions in ec2_smpl.c */
469
int ossl_ec_GF2m_simple_group_init(EC_GROUP *);
470
void ossl_ec_GF2m_simple_group_finish(EC_GROUP *);
471
void ossl_ec_GF2m_simple_group_clear_finish(EC_GROUP *);
472
int ossl_ec_GF2m_simple_group_copy(EC_GROUP *, const EC_GROUP *);
473
int ossl_ec_GF2m_simple_group_set_curve(EC_GROUP *, const BIGNUM *p,
474
    const BIGNUM *a, const BIGNUM *b,
475
    BN_CTX *);
476
int ossl_ec_GF2m_simple_group_get_curve(const EC_GROUP *, BIGNUM *p, BIGNUM *a,
477
    BIGNUM *b, BN_CTX *);
478
int ossl_ec_GF2m_simple_group_get_degree(const EC_GROUP *);
479
int ossl_ec_GF2m_simple_group_check_discriminant(const EC_GROUP *, BN_CTX *);
480
int ossl_ec_GF2m_simple_point_init(EC_POINT *);
481
void ossl_ec_GF2m_simple_point_finish(EC_POINT *);
482
void ossl_ec_GF2m_simple_point_clear_finish(EC_POINT *);
483
int ossl_ec_GF2m_simple_point_copy(EC_POINT *, const EC_POINT *);
484
int ossl_ec_GF2m_simple_point_set_to_infinity(const EC_GROUP *, EC_POINT *);
485
int ossl_ec_GF2m_simple_point_set_affine_coordinates(const EC_GROUP *,
486
    EC_POINT *,
487
    const BIGNUM *x,
488
    const BIGNUM *y, BN_CTX *);
489
int ossl_ec_GF2m_simple_point_get_affine_coordinates(const EC_GROUP *,
490
    const EC_POINT *, BIGNUM *x,
491
    BIGNUM *y, BN_CTX *);
492
int ossl_ec_GF2m_simple_set_compressed_coordinates(const EC_GROUP *, EC_POINT *,
493
    const BIGNUM *x, int y_bit,
494
    BN_CTX *);
495
size_t ossl_ec_GF2m_simple_point2oct(const EC_GROUP *, const EC_POINT *,
496
    point_conversion_form_t form,
497
    unsigned char *buf, size_t len, BN_CTX *);
498
int ossl_ec_GF2m_simple_oct2point(const EC_GROUP *, EC_POINT *,
499
    const unsigned char *buf, size_t len, BN_CTX *);
500
int ossl_ec_GF2m_simple_add(const EC_GROUP *, EC_POINT *r, const EC_POINT *a,
501
    const EC_POINT *b, BN_CTX *);
502
int ossl_ec_GF2m_simple_dbl(const EC_GROUP *, EC_POINT *r, const EC_POINT *a,
503
    BN_CTX *);
504
int ossl_ec_GF2m_simple_invert(const EC_GROUP *, EC_POINT *, BN_CTX *);
505
int ossl_ec_GF2m_simple_is_at_infinity(const EC_GROUP *, const EC_POINT *);
506
int ossl_ec_GF2m_simple_is_on_curve(const EC_GROUP *, const EC_POINT *, BN_CTX *);
507
int ossl_ec_GF2m_simple_cmp(const EC_GROUP *, const EC_POINT *a,
508
    const EC_POINT *b, BN_CTX *);
509
int ossl_ec_GF2m_simple_make_affine(const EC_GROUP *, EC_POINT *, BN_CTX *);
510
int ossl_ec_GF2m_simple_points_make_affine(const EC_GROUP *, size_t num,
511
    EC_POINT *[], BN_CTX *);
512
int ossl_ec_GF2m_simple_field_mul(const EC_GROUP *, BIGNUM *r, const BIGNUM *a,
513
    const BIGNUM *b, BN_CTX *);
514
int ossl_ec_GF2m_simple_field_sqr(const EC_GROUP *, BIGNUM *r, const BIGNUM *a,
515
    BN_CTX *);
516
int ossl_ec_GF2m_simple_field_div(const EC_GROUP *, BIGNUM *r, const BIGNUM *a,
517
    const BIGNUM *b, BN_CTX *);
518
519
#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
520
#ifdef B_ENDIAN
521
#error "Can not enable ec_nistp_64_gcc_128 on big-endian systems"
522
#endif
523
524
/* method functions in ecp_nistp224.c */
525
int ossl_ec_GFp_nistp224_group_init(EC_GROUP *group);
526
int ossl_ec_GFp_nistp224_group_set_curve(EC_GROUP *group, const BIGNUM *p,
527
    const BIGNUM *a, const BIGNUM *n,
528
    BN_CTX *);
529
int ossl_ec_GFp_nistp224_point_get_affine_coordinates(const EC_GROUP *group,
530
    const EC_POINT *point,
531
    BIGNUM *x, BIGNUM *y,
532
    BN_CTX *ctx);
533
int ossl_ec_GFp_nistp224_mul(const EC_GROUP *group, EC_POINT *r,
534
    const BIGNUM *scalar, size_t num,
535
    const EC_POINT *points[], const BIGNUM *scalars[],
536
    BN_CTX *);
537
int ossl_ec_GFp_nistp224_points_mul(const EC_GROUP *group, EC_POINT *r,
538
    const BIGNUM *scalar, size_t num,
539
    const EC_POINT *points[],
540
    const BIGNUM *scalars[], BN_CTX *ctx);
541
int ossl_ec_GFp_nistp224_precompute_mult(EC_GROUP *group, BN_CTX *ctx);
542
int ossl_ec_GFp_nistp224_have_precompute_mult(const EC_GROUP *group);
543
544
/* method functions in ecp_nistp256.c */
545
int ossl_ec_GFp_nistp256_group_init(EC_GROUP *group);
546
int ossl_ec_GFp_nistp256_group_set_curve(EC_GROUP *group, const BIGNUM *p,
547
    const BIGNUM *a, const BIGNUM *n,
548
    BN_CTX *);
549
int ossl_ec_GFp_nistp256_point_get_affine_coordinates(const EC_GROUP *group,
550
    const EC_POINT *point,
551
    BIGNUM *x, BIGNUM *y,
552
    BN_CTX *ctx);
553
int ossl_ec_GFp_nistp256_mul(const EC_GROUP *group, EC_POINT *r,
554
    const BIGNUM *scalar, size_t num,
555
    const EC_POINT *points[], const BIGNUM *scalars[],
556
    BN_CTX *);
557
int ossl_ec_GFp_nistp256_points_mul(const EC_GROUP *group, EC_POINT *r,
558
    const BIGNUM *scalar, size_t num,
559
    const EC_POINT *points[],
560
    const BIGNUM *scalars[], BN_CTX *ctx);
561
int ossl_ec_GFp_nistp256_precompute_mult(EC_GROUP *group, BN_CTX *ctx);
562
int ossl_ec_GFp_nistp256_have_precompute_mult(const EC_GROUP *group);
563
564
/* method functions in ecp_nistp384.c */
565
int ossl_ec_GFp_nistp384_group_init(EC_GROUP *group);
566
int ossl_ec_GFp_nistp384_group_set_curve(EC_GROUP *group, const BIGNUM *p,
567
    const BIGNUM *a, const BIGNUM *n,
568
    BN_CTX *);
569
int ossl_ec_GFp_nistp384_point_get_affine_coordinates(const EC_GROUP *group,
570
    const EC_POINT *point,
571
    BIGNUM *x, BIGNUM *y,
572
    BN_CTX *ctx);
573
int ossl_ec_GFp_nistp384_mul(const EC_GROUP *group, EC_POINT *r,
574
    const BIGNUM *scalar, size_t num,
575
    const EC_POINT *points[], const BIGNUM *scalars[],
576
    BN_CTX *);
577
int ossl_ec_GFp_nistp384_points_mul(const EC_GROUP *group, EC_POINT *r,
578
    const BIGNUM *scalar, size_t num,
579
    const EC_POINT *points[],
580
    const BIGNUM *scalars[], BN_CTX *ctx);
581
int ossl_ec_GFp_nistp384_precompute_mult(EC_GROUP *group, BN_CTX *ctx);
582
int ossl_ec_GFp_nistp384_have_precompute_mult(const EC_GROUP *group);
583
const EC_METHOD *ossl_ec_GFp_nistp384_method(void);
584
585
/* method functions in ecp_nistp521.c */
586
int ossl_ec_GFp_nistp521_group_init(EC_GROUP *group);
587
int ossl_ec_GFp_nistp521_group_set_curve(EC_GROUP *group, const BIGNUM *p,
588
    const BIGNUM *a, const BIGNUM *n,
589
    BN_CTX *);
590
int ossl_ec_GFp_nistp521_point_get_affine_coordinates(const EC_GROUP *group,
591
    const EC_POINT *point,
592
    BIGNUM *x, BIGNUM *y,
593
    BN_CTX *ctx);
594
int ossl_ec_GFp_nistp521_mul(const EC_GROUP *group, EC_POINT *r,
595
    const BIGNUM *scalar, size_t num,
596
    const EC_POINT *points[], const BIGNUM *scalars[],
597
    BN_CTX *);
598
int ossl_ec_GFp_nistp521_points_mul(const EC_GROUP *group, EC_POINT *r,
599
    const BIGNUM *scalar, size_t num,
600
    const EC_POINT *points[],
601
    const BIGNUM *scalars[], BN_CTX *ctx);
602
int ossl_ec_GFp_nistp521_precompute_mult(EC_GROUP *group, BN_CTX *ctx);
603
int ossl_ec_GFp_nistp521_have_precompute_mult(const EC_GROUP *group);
604
605
/* utility functions in ecp_nistputil.c */
606
void ossl_ec_GFp_nistp_points_make_affine_internal(size_t num, void *point_array,
607
    size_t felem_size,
608
    void *tmp_felems,
609
    void (*felem_one)(void *out),
610
    int (*felem_is_zero)(const void *in),
611
    void (*felem_assign)(void *out, const void *in),
612
    void (*felem_square)(void *out, const void *in),
613
    void (*felem_mul)(void *out,
614
        const void *in1,
615
        const void *in2),
616
    void (*felem_inv)(void *out, const void *in),
617
    void (*felem_contract)(void *out, const void *in));
618
void ossl_ec_GFp_nistp_recode_scalar_bits(unsigned char *sign,
619
    unsigned char *digit,
620
    unsigned char in);
621
#endif
622
int ossl_ec_group_simple_order_bits(const EC_GROUP *group);
623
624
/**
625
 *  Creates a new EC_GROUP object
626
 *  \param   libctx The associated library context or NULL for the default
627
 *                  library context
628
 *  \param   propq  Any property query string
629
 *  \param   meth   EC_METHOD to use
630
 *  \return  newly created EC_GROUP object or NULL in case of an error.
631
 */
632
EC_GROUP *ossl_ec_group_new_ex(OSSL_LIB_CTX *libctx, const char *propq,
633
    const EC_METHOD *meth);
634
635
#ifdef ECP_NISTZ256_ASM
636
/** Returns GFp methods using montgomery multiplication, with x86-64 optimized
637
 * P256. See http://eprint.iacr.org/2013/816.
638
 *  \return  EC_METHOD object
639
 */
640
const EC_METHOD *EC_GFp_nistz256_method(void);
641
#endif
642
#ifdef S390X_EC_ASM
643
const EC_METHOD *EC_GFp_s390x_nistp256_method(void);
644
const EC_METHOD *EC_GFp_s390x_nistp384_method(void);
645
const EC_METHOD *EC_GFp_s390x_nistp521_method(void);
646
#endif
647
648
size_t ossl_ec_key_simple_priv2oct(const EC_KEY *eckey,
649
    unsigned char *buf, size_t len);
650
int ossl_ec_key_simple_oct2priv(EC_KEY *eckey, const unsigned char *buf,
651
    size_t len);
652
int ossl_ec_key_simple_generate_key(EC_KEY *eckey);
653
int ossl_ec_key_simple_generate_public_key(EC_KEY *eckey);
654
int ossl_ec_key_simple_check_key(const EC_KEY *eckey);
655
656
#ifdef ECP_SM2P256_ASM
657
/* Returns optimized methods for SM2 */
658
const EC_METHOD *EC_GFp_sm2p256_method(void);
659
#endif
660
661
int ossl_ec_curve_nid_from_params(const EC_GROUP *group, BN_CTX *ctx);
662
663
/* EC_METHOD definitions */
664
665
struct ec_key_method_st {
666
    const char *name;
667
    int32_t flags;
668
    int (*init)(EC_KEY *key);
669
    void (*finish)(EC_KEY *key);
670
    int (*copy)(EC_KEY *dest, const EC_KEY *src);
671
    int (*set_group)(EC_KEY *key, const EC_GROUP *grp);
672
    int (*set_private)(EC_KEY *key, const BIGNUM *priv_key);
673
    int (*set_public)(EC_KEY *key, const EC_POINT *pub_key);
674
    int (*keygen)(EC_KEY *key);
675
    int (*compute_key)(unsigned char **pout, size_t *poutlen,
676
        const EC_POINT *pub_key, const EC_KEY *ecdh);
677
    int (*sign)(int type, const unsigned char *dgst, int dlen, unsigned char *sig, unsigned int *siglen, const BIGNUM *kinv,
678
        const BIGNUM *r, EC_KEY *eckey);
679
    int (*sign_setup)(EC_KEY *eckey, BN_CTX *ctx_in, BIGNUM **kinvp,
680
        BIGNUM **rp);
681
    ECDSA_SIG *(*sign_sig)(const unsigned char *dgst, int dgst_len,
682
        const BIGNUM *in_kinv, const BIGNUM *in_r,
683
        EC_KEY *eckey);
684
685
    int (*verify)(int type, const unsigned char *dgst, int dgst_len,
686
        const unsigned char *sigbuf, int sig_len, EC_KEY *eckey);
687
    int (*verify_sig)(const unsigned char *dgst, int dgst_len,
688
        const ECDSA_SIG *sig, EC_KEY *eckey);
689
};
690
691
0
#define EC_KEY_METHOD_DYNAMIC 1
692
693
EC_KEY *ossl_ec_key_new_method_int(OSSL_LIB_CTX *libctx, const char *propq);
694
695
int ossl_ec_key_gen(EC_KEY *eckey);
696
int ossl_ecdh_compute_key(unsigned char **pout, size_t *poutlen,
697
    const EC_POINT *pub_key, const EC_KEY *ecdh);
698
int ossl_ecdh_simple_compute_key(unsigned char **pout, size_t *poutlen,
699
    const EC_POINT *pub_key, const EC_KEY *ecdh);
700
701
struct ECDSA_SIG_st {
702
    BIGNUM *r;
703
    BIGNUM *s;
704
};
705
706
int ossl_ecdsa_sign_setup(EC_KEY *eckey, BN_CTX *ctx_in, BIGNUM **kinvp,
707
    BIGNUM **rp);
708
int ossl_ecdsa_sign(int type, const unsigned char *dgst, int dlen,
709
    unsigned char *sig, unsigned int *siglen,
710
    const BIGNUM *kinv, const BIGNUM *r, EC_KEY *eckey);
711
ECDSA_SIG *ossl_ecdsa_sign_sig(const unsigned char *dgst, int dgst_len,
712
    const BIGNUM *in_kinv, const BIGNUM *in_r,
713
    EC_KEY *eckey);
714
int ossl_ecdsa_verify(int type, const unsigned char *dgst, int dgst_len,
715
    const unsigned char *sigbuf, int sig_len, EC_KEY *eckey);
716
int ossl_ecdsa_verify_sig(const unsigned char *dgst, int dgst_len,
717
    const ECDSA_SIG *sig, EC_KEY *eckey);
718
int ossl_ecdsa_simple_sign_setup(EC_KEY *eckey, BN_CTX *ctx_in, BIGNUM **kinvp,
719
    BIGNUM **rp);
720
ECDSA_SIG *ossl_ecdsa_simple_sign_sig(const unsigned char *dgst, int dgst_len,
721
    const BIGNUM *in_kinv, const BIGNUM *in_r,
722
    EC_KEY *eckey);
723
int ossl_ecdsa_simple_verify_sig(const unsigned char *dgst, int dgst_len,
724
    const ECDSA_SIG *sig, EC_KEY *eckey);
725
726
/*-
727
 * This functions computes a single point multiplication over the EC group,
728
 * using, at a high level, a Montgomery ladder with conditional swaps, with
729
 * various timing attack defenses.
730
 *
731
 * It performs either a fixed point multiplication
732
 *          (scalar * generator)
733
 * when point is NULL, or a variable point multiplication
734
 *          (scalar * point)
735
 * when point is not NULL.
736
 *
737
 * `scalar` cannot be NULL and should be in the range [0,n) otherwise all
738
 * constant time bets are off (where n is the cardinality of the EC group).
739
 *
740
 * This function expects `group->order` and `group->cardinality` to be well
741
 * defined and non-zero: it fails with an error code otherwise.
742
 *
743
 * NB: This says nothing about the constant-timeness of the ladder step
744
 * implementation (i.e., the default implementation is based on EC_POINT_add and
745
 * EC_POINT_dbl, which of course are not constant time themselves) or the
746
 * underlying multiprecision arithmetic.
747
 *
748
 * The product is stored in `r`.
749
 *
750
 * This is an internal function: callers are in charge of ensuring that the
751
 * input parameters `group`, `r`, `scalar` and `ctx` are not NULL.
752
 *
753
 * Returns 1 on success, 0 otherwise.
754
 */
755
int ossl_ec_scalar_mul_ladder(const EC_GROUP *group, EC_POINT *r,
756
    const BIGNUM *scalar, const EC_POINT *point,
757
    BN_CTX *ctx);
758
759
int ossl_ec_point_blind_coordinates(const EC_GROUP *group, EC_POINT *p,
760
    BN_CTX *ctx);
761
762
static ossl_inline int ec_point_ladder_pre(const EC_GROUP *group,
763
    EC_POINT *r, EC_POINT *s,
764
    EC_POINT *p, BN_CTX *ctx)
765
0
{
766
0
    if (group->meth->ladder_pre != NULL)
767
0
        return group->meth->ladder_pre(group, r, s, p, ctx);
768
769
0
    if (!EC_POINT_copy(s, p)
770
0
        || !EC_POINT_dbl(group, r, s, ctx))
771
0
        return 0;
772
773
0
    return 1;
774
0
}
Unexecuted instantiation: curve25519.c:ec_point_ladder_pre
Unexecuted instantiation: ec_ameth.c:ec_point_ladder_pre
Unexecuted instantiation: ec_asn1.c:ec_point_ladder_pre
Unexecuted instantiation: ec_backend.c:ec_point_ladder_pre
Unexecuted instantiation: ec_check.c:ec_point_ladder_pre
Unexecuted instantiation: ec_curve.c:ec_point_ladder_pre
Unexecuted instantiation: ec_cvt.c:ec_point_ladder_pre
Unexecuted instantiation: ec_key.c:ec_point_ladder_pre
Unexecuted instantiation: ec_kmeth.c:ec_point_ladder_pre
Unexecuted instantiation: ec_lib.c:ec_point_ladder_pre
Unexecuted instantiation: ec_mult.c:ec_point_ladder_pre
Unexecuted instantiation: ec_oct.c:ec_point_ladder_pre
Unexecuted instantiation: ecdh_kdf.c:ec_point_ladder_pre
Unexecuted instantiation: ecdh_ossl.c:ec_point_ladder_pre
Unexecuted instantiation: ecdsa_ossl.c:ec_point_ladder_pre
Unexecuted instantiation: ecdsa_sign.c:ec_point_ladder_pre
Unexecuted instantiation: ecdsa_vrf.c:ec_point_ladder_pre
Unexecuted instantiation: ecp_mont.c:ec_point_ladder_pre
Unexecuted instantiation: ecp_nist.c:ec_point_ladder_pre
Unexecuted instantiation: ecp_oct.c:ec_point_ladder_pre
Unexecuted instantiation: ecp_smpl.c:ec_point_ladder_pre
Unexecuted instantiation: ecx_meth.c:ec_point_ladder_pre
Unexecuted instantiation: ec2_oct.c:ec_point_ladder_pre
Unexecuted instantiation: ec2_smpl.c:ec_point_ladder_pre
775
776
static ossl_inline int ec_point_ladder_step(const EC_GROUP *group,
777
    EC_POINT *r, EC_POINT *s,
778
    EC_POINT *p, BN_CTX *ctx)
779
0
{
780
0
    if (group->meth->ladder_step != NULL)
781
0
        return group->meth->ladder_step(group, r, s, p, ctx);
782
783
0
    if (!EC_POINT_add(group, s, r, s, ctx)
784
0
        || !EC_POINT_dbl(group, r, r, ctx))
785
0
        return 0;
786
787
0
    return 1;
788
0
}
Unexecuted instantiation: curve25519.c:ec_point_ladder_step
Unexecuted instantiation: ec_ameth.c:ec_point_ladder_step
Unexecuted instantiation: ec_asn1.c:ec_point_ladder_step
Unexecuted instantiation: ec_backend.c:ec_point_ladder_step
Unexecuted instantiation: ec_check.c:ec_point_ladder_step
Unexecuted instantiation: ec_curve.c:ec_point_ladder_step
Unexecuted instantiation: ec_cvt.c:ec_point_ladder_step
Unexecuted instantiation: ec_key.c:ec_point_ladder_step
Unexecuted instantiation: ec_kmeth.c:ec_point_ladder_step
Unexecuted instantiation: ec_lib.c:ec_point_ladder_step
Unexecuted instantiation: ec_mult.c:ec_point_ladder_step
Unexecuted instantiation: ec_oct.c:ec_point_ladder_step
Unexecuted instantiation: ecdh_kdf.c:ec_point_ladder_step
Unexecuted instantiation: ecdh_ossl.c:ec_point_ladder_step
Unexecuted instantiation: ecdsa_ossl.c:ec_point_ladder_step
Unexecuted instantiation: ecdsa_sign.c:ec_point_ladder_step
Unexecuted instantiation: ecdsa_vrf.c:ec_point_ladder_step
Unexecuted instantiation: ecp_mont.c:ec_point_ladder_step
Unexecuted instantiation: ecp_nist.c:ec_point_ladder_step
Unexecuted instantiation: ecp_oct.c:ec_point_ladder_step
Unexecuted instantiation: ecp_smpl.c:ec_point_ladder_step
Unexecuted instantiation: ecx_meth.c:ec_point_ladder_step
Unexecuted instantiation: ec2_oct.c:ec_point_ladder_step
Unexecuted instantiation: ec2_smpl.c:ec_point_ladder_step
789
790
static ossl_inline int ec_point_ladder_post(const EC_GROUP *group,
791
    EC_POINT *r, EC_POINT *s,
792
    EC_POINT *p, BN_CTX *ctx)
793
0
{
794
0
    if (group->meth->ladder_post != NULL)
795
0
        return group->meth->ladder_post(group, r, s, p, ctx);
796
797
0
    return 1;
798
0
}
Unexecuted instantiation: curve25519.c:ec_point_ladder_post
Unexecuted instantiation: ec_ameth.c:ec_point_ladder_post
Unexecuted instantiation: ec_asn1.c:ec_point_ladder_post
Unexecuted instantiation: ec_backend.c:ec_point_ladder_post
Unexecuted instantiation: ec_check.c:ec_point_ladder_post
Unexecuted instantiation: ec_curve.c:ec_point_ladder_post
Unexecuted instantiation: ec_cvt.c:ec_point_ladder_post
Unexecuted instantiation: ec_key.c:ec_point_ladder_post
Unexecuted instantiation: ec_kmeth.c:ec_point_ladder_post
Unexecuted instantiation: ec_lib.c:ec_point_ladder_post
Unexecuted instantiation: ec_mult.c:ec_point_ladder_post
Unexecuted instantiation: ec_oct.c:ec_point_ladder_post
Unexecuted instantiation: ecdh_kdf.c:ec_point_ladder_post
Unexecuted instantiation: ecdh_ossl.c:ec_point_ladder_post
Unexecuted instantiation: ecdsa_ossl.c:ec_point_ladder_post
Unexecuted instantiation: ecdsa_sign.c:ec_point_ladder_post
Unexecuted instantiation: ecdsa_vrf.c:ec_point_ladder_post
Unexecuted instantiation: ecp_mont.c:ec_point_ladder_post
Unexecuted instantiation: ecp_nist.c:ec_point_ladder_post
Unexecuted instantiation: ecp_oct.c:ec_point_ladder_post
Unexecuted instantiation: ecp_smpl.c:ec_point_ladder_post
Unexecuted instantiation: ecx_meth.c:ec_point_ladder_post
Unexecuted instantiation: ec2_oct.c:ec_point_ladder_post
Unexecuted instantiation: ec2_smpl.c:ec_point_ladder_post
799
800
#endif /* !defined(OSSL_LIBCRYPTO_EC_EC_LOCAL_H) */