ec_key.c
Go to the documentation of this file.
1 /* Originally written by Bodo Moeller for the OpenSSL project.
2  * ====================================================================
3  * Copyright (c) 1998-2005 The OpenSSL Project. All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * 1. Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * 2. Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in
14  * the documentation and/or other materials provided with the
15  * distribution.
16  *
17  * 3. All advertising materials mentioning features or use of this
18  * software must display the following acknowledgment:
19  * "This product includes software developed by the OpenSSL Project
20  * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
21  *
22  * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
23  * endorse or promote products derived from this software without
24  * prior written permission. For written permission, please contact
25  * openssl-core@openssl.org.
26  *
27  * 5. Products derived from this software may not be called "OpenSSL"
28  * nor may "OpenSSL" appear in their names without prior written
29  * permission of the OpenSSL Project.
30  *
31  * 6. Redistributions of any form whatsoever must retain the following
32  * acknowledgment:
33  * "This product includes software developed by the OpenSSL Project
34  * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
35  *
36  * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
37  * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
38  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
39  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
40  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
41  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
42  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
43  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
44  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
45  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
46  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
47  * OF THE POSSIBILITY OF SUCH DAMAGE.
48  * ====================================================================
49  *
50  * This product includes cryptographic software written by Eric Young
51  * (eay@cryptsoft.com). This product includes software written by Tim
52  * Hudson (tjh@cryptsoft.com).
53  *
54  */
55 /* ====================================================================
56  * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
57  *
58  * Portions of the attached software ("Contribution") are developed by
59  * SUN MICROSYSTEMS, INC., and are contributed to the OpenSSL project.
60  *
61  * The Contribution is licensed pursuant to the OpenSSL open source
62  * license provided above.
63  *
64  * The elliptic curve binary polynomial software is originally written by
65  * Sheueling Chang Shantz and Douglas Stebila of Sun Microsystems
66  * Laboratories. */
67 
68 #include <openssl/ec_key.h>
69 
70 #include <string.h>
71 
72 #include <openssl/ec.h>
73 #include <openssl/ecdsa.h>
74 #include <openssl/engine.h>
75 #include <openssl/err.h>
76 #include <openssl/ex_data.h>
77 #include <openssl/mem.h>
78 #include <openssl/thread.h>
79 
80 #include "internal.h"
81 #include "../delocate.h"
82 #include "../../internal.h"
83 
84 
85 DEFINE_STATIC_EX_DATA_CLASS(g_ec_ex_data_class)
86 
89  if (wrapped == NULL) {
91  return NULL;
92  }
93 
95  wrapped->bignum.d = wrapped->scalar.words;
96  wrapped->bignum.width = group->order.width;
97  wrapped->bignum.dmax = group->order.width;
98  wrapped->bignum.flags = BN_FLG_STATIC_DATA;
99  return wrapped;
100 }
101 
104 }
105 
106 EC_KEY *EC_KEY_new(void) { return EC_KEY_new_method(NULL); }
107 
108 EC_KEY *EC_KEY_new_method(const ENGINE *engine) {
109  EC_KEY *ret = OPENSSL_malloc(sizeof(EC_KEY));
110  if (ret == NULL) {
112  return NULL;
113  }
114 
115  OPENSSL_memset(ret, 0, sizeof(EC_KEY));
116 
117  if (engine) {
118  ret->ecdsa_meth = ENGINE_get_ECDSA_method(engine);
119  }
120  if (ret->ecdsa_meth) {
121  METHOD_ref(ret->ecdsa_meth);
122  }
123 
124  ret->conv_form = POINT_CONVERSION_UNCOMPRESSED;
125  ret->references = 1;
126 
127  CRYPTO_new_ex_data(&ret->ex_data);
128 
129  if (ret->ecdsa_meth && ret->ecdsa_meth->init && !ret->ecdsa_meth->init(ret)) {
130  CRYPTO_free_ex_data(g_ec_ex_data_class_bss_get(), ret, &ret->ex_data);
131  if (ret->ecdsa_meth) {
132  METHOD_unref(ret->ecdsa_meth);
133  }
134  OPENSSL_free(ret);
135  return NULL;
136  }
137 
138  return ret;
139 }
140 
142  EC_KEY *ret = EC_KEY_new();
143  if (ret == NULL) {
145  return NULL;
146  }
148  if (ret->group == NULL) {
149  EC_KEY_free(ret);
150  return NULL;
151  }
152  return ret;
153 }
154 
156  if (r == NULL) {
157  return;
158  }
159 
160  if (!CRYPTO_refcount_dec_and_test_zero(&r->references)) {
161  return;
162  }
163 
164  if (r->ecdsa_meth) {
165  if (r->ecdsa_meth->finish) {
166  r->ecdsa_meth->finish(r);
167  }
168  METHOD_unref(r->ecdsa_meth);
169  }
170 
171  EC_GROUP_free(r->group);
172  EC_POINT_free(r->pub_key);
173  ec_wrapped_scalar_free(r->priv_key);
174 
175  CRYPTO_free_ex_data(g_ec_ex_data_class_bss_get(), r, &r->ex_data);
176 
177  OPENSSL_free(r);
178 }
179 
180 EC_KEY *EC_KEY_dup(const EC_KEY *src) {
181  if (src == NULL) {
183  return NULL;
184  }
185 
186  EC_KEY *ret = EC_KEY_new();
187  if (ret == NULL) {
188  return NULL;
189  }
190 
191  if ((src->group != NULL &&
192  !EC_KEY_set_group(ret, src->group)) ||
193  (src->pub_key != NULL &&
194  !EC_KEY_set_public_key(ret, src->pub_key)) ||
195  (src->priv_key != NULL &&
197  EC_KEY_free(ret);
198  return NULL;
199  }
200 
201  ret->enc_flag = src->enc_flag;
202  ret->conv_form = src->conv_form;
203  return ret;
204 }
205 
207  CRYPTO_refcount_inc(&r->references);
208  return 1;
209 }
210 
212  return key->ecdsa_meth && (key->ecdsa_meth->flags & ECDSA_FLAG_OPAQUE);
213 }
214 
215 const EC_GROUP *EC_KEY_get0_group(const EC_KEY *key) { return key->group; }
216 
218  // If |key| already has a group, it is an error to switch to another one.
219  if (key->group != NULL) {
220  if (EC_GROUP_cmp(key->group, group, NULL) != 0) {
222  return 0;
223  }
224  return 1;
225  }
226 
227  assert(key->priv_key == NULL);
228  assert(key->pub_key == NULL);
229 
230  EC_GROUP_free(key->group);
231  key->group = EC_GROUP_dup(group);
232  return key->group != NULL;
233 }
234 
236  return key->priv_key != NULL ? &key->priv_key->bignum : NULL;
237 }
238 
239 int EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *priv_key) {
240  if (key->group == NULL) {
242  return 0;
243  }
244 
246  if (scalar == NULL) {
247  return 0;
248  }
249  if (!ec_bignum_to_scalar(key->group, &scalar->scalar, priv_key)) {
252  return 0;
253  }
254  ec_wrapped_scalar_free(key->priv_key);
255  key->priv_key = scalar;
256  return 1;
257 }
258 
260  return key->pub_key;
261 }
262 
263 int EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub_key) {
264  if (key->group == NULL) {
266  return 0;
267  }
268 
269  if (pub_key != NULL && EC_GROUP_cmp(key->group, pub_key->group, NULL) != 0) {
271  return 0;
272  }
273 
274  EC_POINT_free(key->pub_key);
275  key->pub_key = EC_POINT_dup(pub_key, key->group);
276  return (key->pub_key == NULL) ? 0 : 1;
277 }
278 
279 unsigned int EC_KEY_get_enc_flags(const EC_KEY *key) { return key->enc_flag; }
280 
281 void EC_KEY_set_enc_flags(EC_KEY *key, unsigned int flags) {
282  key->enc_flag = flags;
283 }
284 
286  return key->conv_form;
287 }
288 
290  key->conv_form = cform;
291 }
292 
293 int EC_KEY_check_key(const EC_KEY *eckey) {
294  if (!eckey || !eckey->group || !eckey->pub_key) {
296  return 0;
297  }
298 
299  if (EC_POINT_is_at_infinity(eckey->group, eckey->pub_key)) {
301  return 0;
302  }
303 
304  // Test whether the public key is on the elliptic curve.
305  if (!EC_POINT_is_on_curve(eckey->group, eckey->pub_key, NULL)) {
307  return 0;
308  }
309 
310  // Check the public and private keys match.
311  if (eckey->priv_key != NULL) {
313  if (!ec_point_mul_scalar_base(eckey->group, &point,
314  &eckey->priv_key->scalar)) {
316  return 0;
317  }
318  if (!ec_GFp_simple_points_equal(eckey->group, &point,
319  &eckey->pub_key->raw)) {
321  return 0;
322  }
323  }
324 
325  return 1;
326 }
327 
329  if (EC_KEY_is_opaque(key)) {
330  // Opaque keys can't be checked.
332  return 0;
333  }
334 
335  if (!EC_KEY_check_key(key)) {
336  return 0;
337  }
338 
339  if (key->priv_key) {
340  uint8_t data[16] = {0};
341  ECDSA_SIG *sig = ECDSA_do_sign(data, sizeof(data), key);
342 #if defined(BORINGSSL_FIPS_BREAK_ECDSA_PWCT)
343  data[0] = ~data[0];
344 #endif
345  int ok = sig != NULL &&
346  ECDSA_do_verify(data, sizeof(data), sig, key);
347  ECDSA_SIG_free(sig);
348  if (!ok) {
350  return 0;
351  }
352  }
353 
354  return 1;
355 }
356 
358  const BIGNUM *y) {
359  EC_POINT *point = NULL;
360  int ok = 0;
361 
362  if (!key || !key->group || !x || !y) {
364  return 0;
365  }
366 
367  point = EC_POINT_new(key->group);
368  if (point == NULL ||
369  !EC_POINT_set_affine_coordinates_GFp(key->group, point, x, y, NULL) ||
371  !EC_KEY_check_key(key)) {
372  goto err;
373  }
374 
375  ok = 1;
376 
377 err:
379  return ok;
380 }
381 
383  unsigned char **out_buf, BN_CTX *ctx) {
384  if (key == NULL || key->pub_key == NULL || key->group == NULL) {
385  return 0;
386  }
387 
388  const size_t len =
389  EC_POINT_point2oct(key->group, key->pub_key, form, NULL, 0, ctx);
390  if (len == 0) {
391  return 0;
392  }
393 
395  if (buf == NULL) {
396  return 0;
397  }
398 
399  if (EC_POINT_point2oct(key->group, key->pub_key, form, buf, len, ctx) !=
400  len) {
401  OPENSSL_free(buf);
402  return 0;
403  }
404 
405  *out_buf = buf;
406  return len;
407 }
408 
410  if (key == NULL || key->group == NULL) {
412  return 0;
413  }
414 
415  // Check that the group order is FIPS compliant (FIPS 186-4 B.4.2).
416  if (BN_num_bits(EC_GROUP_get0_order(key->group)) < 160) {
418  return 0;
419  }
420 
421  static const uint8_t kDefaultAdditionalData[32] = {0};
422  EC_WRAPPED_SCALAR *priv_key = ec_wrapped_scalar_new(key->group);
423  EC_POINT *pub_key = EC_POINT_new(key->group);
424  if (priv_key == NULL || pub_key == NULL ||
425  // Generate the private key by testing candidates (FIPS 186-4 B.4.2).
426  !ec_random_nonzero_scalar(key->group, &priv_key->scalar,
428  !ec_point_mul_scalar_base(key->group, &pub_key->raw, &priv_key->scalar)) {
429  EC_POINT_free(pub_key);
430  ec_wrapped_scalar_free(priv_key);
431  return 0;
432  }
433 
434  ec_wrapped_scalar_free(key->priv_key);
435  key->priv_key = priv_key;
436  EC_POINT_free(key->pub_key);
437  key->pub_key = pub_key;
438  return 1;
439 }
440 
442  if (EC_KEY_generate_key(eckey) && EC_KEY_check_fips(eckey)) {
443  return 1;
444  }
445 
446  EC_POINT_free(eckey->pub_key);
448  eckey->pub_key = NULL;
449  eckey->priv_key = NULL;
450  return 0;
451 }
452 
453 int EC_KEY_get_ex_new_index(long argl, void *argp, CRYPTO_EX_unused *unused,
454  CRYPTO_EX_dup *dup_unused,
455  CRYPTO_EX_free *free_func) {
456  int index;
457  if (!CRYPTO_get_ex_new_index(g_ec_ex_data_class_bss_get(), &index, argl, argp,
458  free_func)) {
459  return -1;
460  }
461  return index;
462 }
463 
464 int EC_KEY_set_ex_data(EC_KEY *d, int idx, void *arg) {
465  return CRYPTO_set_ex_data(&d->ex_data, idx, arg);
466 }
467 
468 void *EC_KEY_get_ex_data(const EC_KEY *d, int idx) {
469  return CRYPTO_get_ex_data(&d->ex_data, idx);
470 }
471 
EC_GROUP_get0_order
#define EC_GROUP_get0_order
Definition: boringssl_prefix_symbols.h:1323
ec_wrapped_scalar_new
static EC_WRAPPED_SCALAR * ec_wrapped_scalar_new(const EC_GROUP *group)
Definition: ec_key.c:87
EC_KEY_set_ex_data
int EC_KEY_set_ex_data(EC_KEY *d, int idx, void *arg)
Definition: ec_key.c:464
flag
uint32_t flag
Definition: ssl_versions.cc:162
EC_POINT_new
#define EC_POINT_new
Definition: boringssl_prefix_symbols.h:1384
ec_bignum_to_scalar
#define ec_bignum_to_scalar
Definition: boringssl_prefix_symbols.h:3093
ec_point_mul_scalar_base
#define ec_point_mul_scalar_base
Definition: boringssl_prefix_symbols.h:3116
test_server.argp
argp
Definition: test_server.py:33
EC_R_PUBLIC_KEY_VALIDATION_FAILED
#define EC_R_PUBLIC_KEY_VALIDATION_FAILED
Definition: ec.h:439
EC_KEY_up_ref
int EC_KEY_up_ref(EC_KEY *r)
Definition: ec_key.c:206
ctx
Definition: benchmark-async.c:30
const
#define const
Definition: bloaty/third_party/zlib/zconf.h:230
EC_POINT_point2oct
#define EC_POINT_point2oct
Definition: boringssl_prefix_symbols.h:1387
BN_FLG_STATIC_DATA
#define BN_FLG_STATIC_DATA
Definition: bn.h:997
CRYPTO_EX_dup
int CRYPTO_EX_dup(CRYPTO_EX_DATA *to, const CRYPTO_EX_DATA *from, void **from_d, int index, long argl, void *argp)
Definition: ex_data.h:184
EC_WRAPPED_SCALAR
Definition: third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/internal.h:718
DEFINE_STATIC_EX_DATA_CLASS
#define DEFINE_STATIC_EX_DATA_CLASS(name)
Definition: delocate.h:46
EC_POINT_dup
#define EC_POINT_dup
Definition: boringssl_prefix_symbols.h:1376
ecdsa.h
METHOD_ref
#define METHOD_ref
Definition: boringssl_prefix_symbols.h:1816
EC_KEY_check_fips
int EC_KEY_check_fips(const EC_KEY *key)
Definition: ec_key.c:328
scalar
Definition: spake25519.c:317
y
const double y
Definition: bloaty/third_party/googletest/googlemock/test/gmock-matchers_test.cc:3611
OPENSSL_PUT_ERROR
#define OPENSSL_PUT_ERROR(library, reason)
Definition: err.h:423
EC_R_INVALID_PRIVATE_KEY
#define EC_R_INVALID_PRIVATE_KEY
Definition: ec.h:420
string.h
buf
voidpf void * buf
Definition: bloaty/third_party/zlib/contrib/minizip/ioapi.h:136
EC_KEY_new_by_curve_name
EC_KEY * EC_KEY_new_by_curve_name(int nid)
Definition: ec_key.c:141
error_ref_leak.err
err
Definition: error_ref_leak.py:35
EC_KEY_get_ex_new_index
int EC_KEY_get_ex_new_index(long argl, void *argp, CRYPTO_EX_unused *unused, CRYPTO_EX_dup *dup_unused, CRYPTO_EX_free *free_func)
Definition: ec_key.c:453
EC_GROUP_new_by_curve_name
#define EC_GROUP_new_by_curve_name
Definition: boringssl_prefix_symbols.h:1331
EC_KEY_generate_key
int EC_KEY_generate_key(EC_KEY *key)
Definition: ec_key.c:409
bignum_ctx
Definition: ctx.c:91
ECDSA_do_sign
#define ECDSA_do_sign
Definition: boringssl_prefix_symbols.h:1309
ERR_R_EC_LIB
#define ERR_R_EC_LIB
Definition: err.h:343
uint8_t
unsigned char uint8_t
Definition: stdint-msvc2008.h:78
EC_R_WRONG_ORDER
#define EC_R_WRONG_ORDER
Definition: ec.h:432
OPENSSL_memset
static void * OPENSSL_memset(void *dst, int c, size_t n)
Definition: third_party/boringssl-with-bazel/src/crypto/internal.h:835
EC_RAW_POINT
Definition: third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/internal.h:260
EC_R_POINT_IS_NOT_ON_CURVE
#define EC_R_POINT_IS_NOT_ON_CURVE
Definition: ec.h:427
ec_GFp_simple_points_equal
#define ec_GFp_simple_points_equal
Definition: boringssl_prefix_symbols.h:3087
EC_KEY_check_key
int EC_KEY_check_key(const EC_KEY *eckey)
Definition: ec_key.c:293
EC_R_GROUP_MISMATCH
#define EC_R_GROUP_MISMATCH
Definition: ec.h:437
EC_KEY_set_public_key_affine_coordinates
int EC_KEY_set_public_key_affine_coordinates(EC_KEY *key, const BIGNUM *x, const BIGNUM *y)
Definition: ec_key.c:357
CRYPTO_free_ex_data
#define CRYPTO_free_ex_data
Definition: boringssl_prefix_symbols.h:1151
OPENSSL_malloc
#define OPENSSL_malloc
Definition: boringssl_prefix_symbols.h:1885
EC_GROUP_free
#define EC_GROUP_free
Definition: boringssl_prefix_symbols.h:1321
ECDSA_SIG_free
#define ECDSA_SIG_free
Definition: boringssl_prefix_symbols.h:1298
EC_R_MISSING_PARAMETERS
#define EC_R_MISSING_PARAMETERS
Definition: ec.h:421
EC_POINT_set_affine_coordinates_GFp
#define EC_POINT_set_affine_coordinates_GFp
Definition: boringssl_prefix_symbols.h:1389
ERR_R_PASSED_NULL_PARAMETER
#define ERR_R_PASSED_NULL_PARAMETER
Definition: err.h:373
EC_GROUP_cmp
#define EC_GROUP_cmp
Definition: boringssl_prefix_symbols.h:1319
ec_key_st::priv_key
EC_WRAPPED_SCALAR * priv_key
Definition: third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/internal.h:730
EC_WRAPPED_SCALAR::scalar
EC_SCALAR scalar
Definition: third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/internal.h:720
EC_KEY_set_group
int EC_KEY_set_group(EC_KEY *key, const EC_GROUP *group)
Definition: ec_key.c:217
EC_KEY_get0_group
const EC_GROUP * EC_KEY_get0_group(const EC_KEY *key)
Definition: ec_key.c:215
EC_POINT_is_on_curve
#define EC_POINT_is_on_curve
Definition: boringssl_prefix_symbols.h:1382
err.h
EC_KEY_generate_key_fips
int EC_KEY_generate_key_fips(EC_KEY *eckey)
Definition: ec_key.c:441
EC_POINT_free
#define EC_POINT_free
Definition: boringssl_prefix_symbols.h:1377
ec_point_st::group
EC_GROUP * group
Definition: third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/internal.h:618
arg
Definition: cmdline.cc:40
CRYPTO_EX_unused
int CRYPTO_EX_unused
Definition: ex_data.h:192
CRYPTO_new_ex_data
#define CRYPTO_new_ex_data
Definition: boringssl_prefix_symbols.h:1179
kDefaultAdditionalData
static const uint8_t kDefaultAdditionalData[32]
Definition: pmbtoken.c:58
ec_key.h
x
int x
Definition: bloaty/third_party/googletest/googlemock/test/gmock-matchers_test.cc:3610
data
char data[kBufferLength]
Definition: abseil-cpp/absl/strings/internal/str_format/float_conversion.cc:1006
EC_GROUP_dup
#define EC_GROUP_dup
Definition: boringssl_prefix_symbols.h:1320
ECDSA_FLAG_OPAQUE
#define ECDSA_FLAG_OPAQUE
Definition: ec_key.h:267
ECDSA_do_verify
#define ECDSA_do_verify
Definition: boringssl_prefix_symbols.h:1310
d
static const fe d
Definition: curve25519_tables.h:19
ec_random_nonzero_scalar
#define ec_random_nonzero_scalar
Definition: boringssl_prefix_symbols.h:3125
CRYPTO_EX_free
void CRYPTO_EX_free(void *parent, void *ptr, CRYPTO_EX_DATA *ad, int index, long argl, void *argp)
Definition: ex_data.h:174
EC_KEY_set_asn1_flag
void EC_KEY_set_asn1_flag(EC_KEY *key, int flag)
Definition: ec_key.c:472
setup.idx
idx
Definition: third_party/bloaty/third_party/capstone/bindings/python/setup.py:197
EC_KEY_set_conv_form
void EC_KEY_set_conv_form(EC_KEY *key, point_conversion_form_t cform)
Definition: ec_key.c:289
EC_KEY_get0_public_key
const EC_POINT * EC_KEY_get0_public_key(const EC_KEY *key)
Definition: ec_key.c:259
EC_KEY_set_enc_flags
void EC_KEY_set_enc_flags(EC_KEY *key, unsigned int flags)
Definition: ec_key.c:281
nid
int nid
Definition: cipher_extra.c:71
ec_key_st::enc_flag
unsigned int enc_flag
Definition: third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/internal.h:732
ec_key_st
Definition: third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/internal.h:723
BN_num_bits
#define BN_num_bits
Definition: boringssl_prefix_symbols.h:974
point
Definition: bloaty/third_party/zlib/examples/zran.c:67
ec_key_st::pub_key
EC_POINT * pub_key
Definition: third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/internal.h:729
CRYPTO_get_ex_data
#define CRYPTO_get_ex_data
Definition: boringssl_prefix_symbols.h:1164
EC_KEY_get_enc_flags
unsigned int EC_KEY_get_enc_flags(const EC_KEY *key)
Definition: ec_key.c:279
EC_R_INVALID_GROUP_ORDER
#define EC_R_INVALID_GROUP_ORDER
Definition: ec.h:419
internal.h
CRYPTO_get_ex_new_index
#define CRYPTO_get_ex_new_index
Definition: boringssl_prefix_symbols.h:1165
key
const char * key
Definition: hpack_parser_table.cc:164
upload.group
group
Definition: bloaty/third_party/googletest/googlemock/scripts/upload.py:397
wrapped
grpc_call * wrapped
Definition: src/php/ext/grpc/call.h:32
absl::flags_internal
Definition: abseil-cpp/absl/flags/commandlineflag.h:40
point_conversion_form_t
point_conversion_form_t
Definition: ec.h:83
POINT_CONVERSION_UNCOMPRESSED
@ POINT_CONVERSION_UNCOMPRESSED
Definition: ec.h:91
bignum_st
Definition: bn.h:957
ec_point_st
Definition: third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/internal.h:615
index
int index
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/protobuf.h:1184
ret
UniquePtr< SSL_SESSION > ret
Definition: ssl_x509.cc:1029
ec_group_st
Definition: third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/internal.h:573
fix_build_deps.r
r
Definition: fix_build_deps.py:491
ec_key_st::group
EC_GROUP * group
Definition: third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/internal.h:724
EC_KEY_get_ex_data
void * EC_KEY_get_ex_data(const EC_KEY *d, int idx)
Definition: ec_key.c:468
ENGINE_get_ECDSA_method
#define ENGINE_get_ECDSA_method
Definition: boringssl_prefix_symbols.h:1403
ok
bool ok
Definition: async_end2end_test.cc:197
ec_key_st::conv_form
point_conversion_form_t conv_form
Definition: third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/internal.h:733
ec_point_st::raw
EC_RAW_POINT raw
Definition: third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/internal.h:623
EC_KEY_key2buf
size_t EC_KEY_key2buf(const EC_KEY *key, point_conversion_form_t form, unsigned char **out_buf, BN_CTX *ctx)
Definition: ec_key.c:382
engine.h
EC_KEY_set_private_key
int EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *priv_key)
Definition: ec_key.c:239
engine_st
Definition: engine.c:29
CRYPTO_refcount_inc
#define CRYPTO_refcount_inc
Definition: boringssl_prefix_symbols.h:1191
ec_wrapped_scalar_free
static void ec_wrapped_scalar_free(EC_WRAPPED_SCALAR *scalar)
Definition: ec_key.c:102
EC_KEY_get0_private_key
const BIGNUM * EC_KEY_get0_private_key(const EC_KEY *key)
Definition: ec_key.c:235
EC_R_POINT_AT_INFINITY
#define EC_R_POINT_AT_INFINITY
Definition: ec.h:426
EC_KEY_is_opaque
int EC_KEY_is_opaque(const EC_KEY *key)
Definition: ec_key.c:211
flags
uint32_t flags
Definition: retry_filter.cc:632
mem.h
EC_KEY_new
EC_KEY * EC_KEY_new(void)
Definition: ec_key.c:106
ex_data.h
len
int len
Definition: abseil-cpp/absl/base/internal/low_level_alloc_test.cc:46
EC_KEY_set_public_key
int EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub_key)
Definition: ec_key.c:263
EC_POINT_is_at_infinity
#define EC_POINT_is_at_infinity
Definition: boringssl_prefix_symbols.h:1381
CRYPTO_set_ex_data
#define CRYPTO_set_ex_data
Definition: boringssl_prefix_symbols.h:1196
thread.h
EC_KEY_get_conv_form
point_conversion_form_t EC_KEY_get_conv_form(const EC_KEY *key)
Definition: ec_key.c:285
EC_KEY_dup
EC_KEY * EC_KEY_dup(const EC_KEY *src)
Definition: ec_key.c:180
ec.h
OPENSSL_free
#define OPENSSL_free
Definition: boringssl_prefix_symbols.h:1869
ecdsa_sig_st
Definition: ecdsa.h:105
EC_KEY_new_method
EC_KEY * EC_KEY_new_method(const ENGINE *engine)
Definition: ec_key.c:108
METHOD_unref
#define METHOD_unref
Definition: boringssl_prefix_symbols.h:1817
ERR_R_MALLOC_FAILURE
#define ERR_R_MALLOC_FAILURE
Definition: err.h:371
EC_KEY_free
void EC_KEY_free(EC_KEY *r)
Definition: ec_key.c:155
CRYPTO_refcount_dec_and_test_zero
#define CRYPTO_refcount_dec_and_test_zero
Definition: boringssl_prefix_symbols.h:1190


grpc
Author(s):
autogenerated on Fri May 16 2025 02:58:18