| 1 |
/* |
| 2 |
* Copyright 2006-2025 The OpenSSL Project Authors. All Rights Reserved. |
| 3 |
* |
| 4 |
* Licensed under the Apache License 2.0 (the "License"). You may not use |
| 5 |
* this file except in compliance with the License. You can obtain a copy |
| 6 |
* in the file LICENSE in the source distribution or at |
| 7 |
* https://www.openssl.org/source/license.html |
| 8 |
*/ |
| 9 |
|
| 10 |
/* |
| 11 |
* ECDH and ECDSA low level APIs are deprecated for public use, but still ok |
| 12 |
* for internal use. |
| 13 |
*/ |
| 14 |
#include "internal/deprecated.h" |
| 15 |
|
| 16 |
#include <stdio.h> |
| 17 |
#include "internal/cryptlib.h" |
| 18 |
#include <openssl/asn1t.h> |
| 19 |
#include <openssl/x509.h> |
| 20 |
#include <openssl/ec.h> |
| 21 |
#include "ec_local.h" |
| 22 |
#include <openssl/evp.h> |
| 23 |
#include "crypto/evp.h" |
| 24 |
|
| 25 |
/* EC pkey context structure */ |
| 26 |
|
| 27 |
typedef struct { |
| 28 |
/* Key and paramgen group */ |
| 29 |
EC_GROUP *gen_group; |
| 30 |
/* message digest */ |
| 31 |
const EVP_MD *md; |
| 32 |
/* Duplicate key if custom cofactor needed */ |
| 33 |
EC_KEY *co_key; |
| 34 |
/* Cofactor mode */ |
| 35 |
signed char cofactor_mode; |
| 36 |
/* KDF (if any) to use for ECDH */ |
| 37 |
char kdf_type; |
| 38 |
/* Message digest to use for key derivation */ |
| 39 |
const EVP_MD *kdf_md; |
| 40 |
/* User key material */ |
| 41 |
unsigned char *kdf_ukm; |
| 42 |
size_t kdf_ukmlen; |
| 43 |
/* KDF output length */ |
| 44 |
size_t kdf_outlen; |
| 45 |
} EC_PKEY_CTX; |
| 46 |
|
| 47 |
static int pkey_ec_init(EVP_PKEY_CTX *ctx) |
| 48 |
{ |
| 49 |
EC_PKEY_CTX *dctx; |
| 50 |
|
| 51 |
if ((dctx = OPENSSL_zalloc(sizeof(*dctx))) == NULL) |
| 52 |
return 0; |
| 53 |
|
| 54 |
dctx->cofactor_mode = -1; |
| 55 |
dctx->kdf_type = EVP_PKEY_ECDH_KDF_NONE; |
| 56 |
ctx->data = dctx; |
| 57 |
return 1; |
| 58 |
} |
| 59 |
|
| 60 |
static int pkey_ec_copy(EVP_PKEY_CTX *dst, const EVP_PKEY_CTX *src) |
| 61 |
{ |
| 62 |
EC_PKEY_CTX *dctx, *sctx; |
| 63 |
if (!pkey_ec_init(dst)) |
| 64 |
return 0; |
| 65 |
sctx = src->data; |
| 66 |
dctx = dst->data; |
| 67 |
if (sctx->gen_group) { |
| 68 |
dctx->gen_group = EC_GROUP_dup(sctx->gen_group); |
| 69 |
if (!dctx->gen_group) |
| 70 |
return 0; |
| 71 |
} |
| 72 |
dctx->md = sctx->md; |
| 73 |
|
| 74 |
if (sctx->co_key) { |
| 75 |
dctx->co_key = EC_KEY_dup(sctx->co_key); |
| 76 |
if (!dctx->co_key) |
| 77 |
return 0; |
| 78 |
} |
| 79 |
dctx->kdf_type = sctx->kdf_type; |
| 80 |
dctx->kdf_md = sctx->kdf_md; |
| 81 |
dctx->kdf_outlen = sctx->kdf_outlen; |
| 82 |
if (sctx->kdf_ukm) { |
| 83 |
dctx->kdf_ukm = OPENSSL_memdup(sctx->kdf_ukm, sctx->kdf_ukmlen); |
| 84 |
if (!dctx->kdf_ukm) |
| 85 |
return 0; |
| 86 |
} else |
| 87 |
dctx->kdf_ukm = NULL; |
| 88 |
dctx->kdf_ukmlen = sctx->kdf_ukmlen; |
| 89 |
return 1; |
| 90 |
} |
| 91 |
|
| 92 |
static void pkey_ec_cleanup(EVP_PKEY_CTX *ctx) |
| 93 |
{ |
| 94 |
EC_PKEY_CTX *dctx = ctx->data; |
| 95 |
if (dctx != NULL) { |
| 96 |
EC_GROUP_free(dctx->gen_group); |
| 97 |
EC_KEY_free(dctx->co_key); |
| 98 |
OPENSSL_free(dctx->kdf_ukm); |
| 99 |
OPENSSL_free(dctx); |
| 100 |
ctx->data = NULL; |
| 101 |
} |
| 102 |
} |
| 103 |
|
| 104 |
static int pkey_ec_sign(EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen, |
| 105 |
const unsigned char *tbs, size_t tbslen) |
| 106 |
{ |
| 107 |
int ret, type; |
| 108 |
unsigned int sltmp; |
| 109 |
EC_PKEY_CTX *dctx = ctx->data; |
| 110 |
/* |
| 111 |
* Discard const. Its marked as const because this may be a cached copy of |
| 112 |
* the "real" key. These calls don't make any modifications that need to |
| 113 |
* be reflected back in the "original" key. |
| 114 |
*/ |
| 115 |
EC_KEY *ec = (EC_KEY *)EVP_PKEY_get0_EC_KEY(ctx->pkey); |
| 116 |
const int sig_sz = ECDSA_size(ec); |
| 117 |
|
| 118 |
/* ensure cast to size_t is safe */ |
| 119 |
if (!ossl_assert(sig_sz > 0)) |
| 120 |
return 0; |
| 121 |
|
| 122 |
if (sig == NULL) { |
| 123 |
*siglen = (size_t)sig_sz; |
| 124 |
return 1; |
| 125 |
} |
| 126 |
|
| 127 |
if (*siglen < (size_t)sig_sz) { |
| 128 |
ERR_raise(ERR_LIB_EC, EC_R_BUFFER_TOO_SMALL); |
| 129 |
return 0; |
| 130 |
} |
| 131 |
|
| 132 |
type = (dctx->md != NULL) ? EVP_MD_get_type(dctx->md) : NID_sha1; |
| 133 |
|
| 134 |
ret = ECDSA_sign(type, tbs, (int)tbslen, sig, &sltmp, ec); |
| 135 |
|
| 136 |
if (ret <= 0) |
| 137 |
return ret; |
| 138 |
*siglen = (size_t)sltmp; |
| 139 |
return 1; |
| 140 |
} |
| 141 |
|
| 142 |
static int pkey_ec_verify(EVP_PKEY_CTX *ctx, |
| 143 |
const unsigned char *sig, size_t siglen, |
| 144 |
const unsigned char *tbs, size_t tbslen) |
| 145 |
{ |
| 146 |
int ret, type; |
| 147 |
EC_PKEY_CTX *dctx = ctx->data; |
| 148 |
/* |
| 149 |
* Discard const. Its marked as const because this may be a cached copy of |
| 150 |
* the "real" key. These calls don't make any modifications that need to |
| 151 |
* be reflected back in the "original" key. |
| 152 |
*/ |
| 153 |
EC_KEY *ec = (EC_KEY *)EVP_PKEY_get0_EC_KEY(ctx->pkey); |
| 154 |
|
| 155 |
if (dctx->md) |
| 156 |
type = EVP_MD_get_type(dctx->md); |
| 157 |
else |
| 158 |
type = NID_sha1; |
| 159 |
|
| 160 |
ret = ECDSA_verify(type, tbs, (int)tbslen, sig, (int)siglen, ec); |
| 161 |
|
| 162 |
return ret; |
| 163 |
} |
| 164 |
|
| 165 |
#ifndef OPENSSL_NO_EC |
| 166 |
static int pkey_ec_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen) |
| 167 |
{ |
| 168 |
int ret; |
| 169 |
size_t outlen; |
| 170 |
const EC_POINT *pubkey = NULL; |
| 171 |
EC_KEY *eckey; |
| 172 |
const EC_KEY *eckeypub; |
| 173 |
EC_PKEY_CTX *dctx = ctx->data; |
| 174 |
|
| 175 |
if (ctx->pkey == NULL || ctx->peerkey == NULL) { |
| 176 |
ERR_raise(ERR_LIB_EC, EC_R_KEYS_NOT_SET); |
| 177 |
return 0; |
| 178 |
} |
| 179 |
eckeypub = EVP_PKEY_get0_EC_KEY(ctx->peerkey); |
| 180 |
if (eckeypub == NULL) { |
| 181 |
ERR_raise(ERR_LIB_EC, EC_R_KEYS_NOT_SET); |
| 182 |
return 0; |
| 183 |
} |
| 184 |
|
| 185 |
eckey = dctx->co_key ? dctx->co_key |
| 186 |
: (EC_KEY *)EVP_PKEY_get0_EC_KEY(ctx->pkey); |
| 187 |
|
| 188 |
if (!key) { |
| 189 |
const EC_GROUP *group; |
| 190 |
group = EC_KEY_get0_group(eckey); |
| 191 |
|
| 192 |
if (group == NULL) |
| 193 |
return 0; |
| 194 |
*keylen = (EC_GROUP_get_degree(group) + 7) / 8; |
| 195 |
return 1; |
| 196 |
} |
| 197 |
pubkey = EC_KEY_get0_public_key(eckeypub); |
| 198 |
|
| 199 |
/* |
| 200 |
* NB: unlike PKCS#3 DH, if *outlen is less than maximum size this is not |
| 201 |
* an error, the result is truncated. |
| 202 |
*/ |
| 203 |
|
| 204 |
outlen = *keylen; |
| 205 |
|
| 206 |
ret = ECDH_compute_key(key, outlen, pubkey, eckey, 0); |
| 207 |
if (ret <= 0) |
| 208 |
return 0; |
| 209 |
*keylen = ret; |
| 210 |
return 1; |
| 211 |
} |
| 212 |
|
| 213 |
static int pkey_ec_kdf_derive(EVP_PKEY_CTX *ctx, |
| 214 |
unsigned char *key, size_t *keylen) |
| 215 |
{ |
| 216 |
EC_PKEY_CTX *dctx = ctx->data; |
| 217 |
unsigned char *ktmp = NULL; |
| 218 |
size_t ktmplen; |
| 219 |
int rv = 0; |
| 220 |
if (dctx->kdf_type == EVP_PKEY_ECDH_KDF_NONE) |
| 221 |
return pkey_ec_derive(ctx, key, keylen); |
| 222 |
if (!key) { |
| 223 |
*keylen = dctx->kdf_outlen; |
| 224 |
return 1; |
| 225 |
} |
| 226 |
if (*keylen != dctx->kdf_outlen) |
| 227 |
return 0; |
| 228 |
if (!pkey_ec_derive(ctx, NULL, &ktmplen)) |
| 229 |
return 0; |
| 230 |
if ((ktmp = OPENSSL_malloc(ktmplen)) == NULL) |
| 231 |
return 0; |
| 232 |
if (!pkey_ec_derive(ctx, ktmp, &ktmplen)) |
| 233 |
goto err; |
| 234 |
/* Do KDF stuff */ |
| 235 |
if (!ossl_ecdh_kdf_X9_63(key, *keylen, ktmp, ktmplen, |
| 236 |
dctx->kdf_ukm, dctx->kdf_ukmlen, dctx->kdf_md, |
| 237 |
ctx->libctx, ctx->propquery)) |
| 238 |
goto err; |
| 239 |
rv = 1; |
| 240 |
|
| 241 |
err: |
| 242 |
OPENSSL_clear_free(ktmp, ktmplen); |
| 243 |
return rv; |
| 244 |
} |
| 245 |
#endif |
| 246 |
|
| 247 |
static int pkey_ec_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2) |
| 248 |
{ |
| 249 |
EC_PKEY_CTX *dctx = ctx->data; |
| 250 |
EC_GROUP *group; |
| 251 |
switch (type) { |
| 252 |
case EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID: |
| 253 |
group = EC_GROUP_new_by_curve_name(p1); |
| 254 |
if (group == NULL) { |
| 255 |
ERR_raise(ERR_LIB_EC, EC_R_INVALID_CURVE); |
| 256 |
return 0; |
| 257 |
} |
| 258 |
EC_GROUP_free(dctx->gen_group); |
| 259 |
dctx->gen_group = group; |
| 260 |
return 1; |
| 261 |
|
| 262 |
case EVP_PKEY_CTRL_EC_PARAM_ENC: |
| 263 |
if (!dctx->gen_group) { |
| 264 |
ERR_raise(ERR_LIB_EC, EC_R_NO_PARAMETERS_SET); |
| 265 |
return 0; |
| 266 |
} |
| 267 |
EC_GROUP_set_asn1_flag(dctx->gen_group, p1); |
| 268 |
return 1; |
| 269 |
|
| 270 |
#ifndef OPENSSL_NO_EC |
| 271 |
case EVP_PKEY_CTRL_EC_ECDH_COFACTOR: |
| 272 |
if (p1 == -2) { |
| 273 |
if (dctx->cofactor_mode != -1) |
| 274 |
return dctx->cofactor_mode; |
| 275 |
else { |
| 276 |
const EC_KEY *ec_key = EVP_PKEY_get0_EC_KEY(ctx->pkey); |
| 277 |
return EC_KEY_get_flags(ec_key) & EC_FLAG_COFACTOR_ECDH ? 1 : 0; |
| 278 |
} |
| 279 |
} else if (p1 < -1 || p1 > 1) |
| 280 |
return -2; |
| 281 |
dctx->cofactor_mode = p1; |
| 282 |
if (p1 != -1) { |
| 283 |
EC_KEY *ec_key = (EC_KEY *)EVP_PKEY_get0_EC_KEY(ctx->pkey); |
| 284 |
|
| 285 |
/* |
| 286 |
* We discarded the "const" above. This will only work if the key is |
| 287 |
* a "real" legacy key, and not a cached copy of a provided key |
| 288 |
*/ |
| 289 |
if (evp_pkey_is_provided(ctx->pkey)) { |
| 290 |
ERR_raise(ERR_LIB_EC, ERR_R_UNSUPPORTED); |
| 291 |
return 0; |
| 292 |
} |
| 293 |
if (!ec_key->group) |
| 294 |
return -2; |
| 295 |
/* If cofactor is 1 cofactor mode does nothing */ |
| 296 |
if (BN_is_one(ec_key->group->cofactor)) |
| 297 |
return 1; |
| 298 |
if (!dctx->co_key) { |
| 299 |
dctx->co_key = EC_KEY_dup(ec_key); |
| 300 |
if (!dctx->co_key) |
| 301 |
return 0; |
| 302 |
} |
| 303 |
if (p1) |
| 304 |
EC_KEY_set_flags(dctx->co_key, EC_FLAG_COFACTOR_ECDH); |
| 305 |
else |
| 306 |
EC_KEY_clear_flags(dctx->co_key, EC_FLAG_COFACTOR_ECDH); |
| 307 |
} else { |
| 308 |
EC_KEY_free(dctx->co_key); |
| 309 |
dctx->co_key = NULL; |
| 310 |
} |
| 311 |
return 1; |
| 312 |
#endif |
| 313 |
|
| 314 |
case EVP_PKEY_CTRL_EC_KDF_TYPE: |
| 315 |
if (p1 == -2) |
| 316 |
return dctx->kdf_type; |
| 317 |
if (p1 != EVP_PKEY_ECDH_KDF_NONE && p1 != EVP_PKEY_ECDH_KDF_X9_63) |
| 318 |
return -2; |
| 319 |
dctx->kdf_type = p1; |
| 320 |
return 1; |
| 321 |
|
| 322 |
case EVP_PKEY_CTRL_EC_KDF_MD: |
| 323 |
dctx->kdf_md = p2; |
| 324 |
return 1; |
| 325 |
|
| 326 |
case EVP_PKEY_CTRL_GET_EC_KDF_MD: |
| 327 |
*(const EVP_MD **)p2 = dctx->kdf_md; |
| 328 |
return 1; |
| 329 |
|
| 330 |
case EVP_PKEY_CTRL_EC_KDF_OUTLEN: |
| 331 |
if (p1 <= 0) |
| 332 |
return -2; |
| 333 |
dctx->kdf_outlen = (size_t)p1; |
| 334 |
return 1; |
| 335 |
|
| 336 |
case EVP_PKEY_CTRL_GET_EC_KDF_OUTLEN: |
| 337 |
*(int *)p2 = (int)dctx->kdf_outlen; |
| 338 |
return 1; |
| 339 |
|
| 340 |
case EVP_PKEY_CTRL_EC_KDF_UKM: |
| 341 |
OPENSSL_free(dctx->kdf_ukm); |
| 342 |
dctx->kdf_ukm = p2; |
| 343 |
if (p2) |
| 344 |
dctx->kdf_ukmlen = p1; |
| 345 |
else |
| 346 |
dctx->kdf_ukmlen = 0; |
| 347 |
return 1; |
| 348 |
|
| 349 |
case EVP_PKEY_CTRL_GET_EC_KDF_UKM: |
| 350 |
*(unsigned char **)p2 = dctx->kdf_ukm; |
| 351 |
return (int)dctx->kdf_ukmlen; |
| 352 |
|
| 353 |
case EVP_PKEY_CTRL_MD: |
| 354 |
if (EVP_MD_get_type((const EVP_MD *)p2) != NID_sha1 && EVP_MD_get_type((const EVP_MD *)p2) != NID_ecdsa_with_SHA1 && EVP_MD_get_type((const EVP_MD *)p2) != NID_sha224 && EVP_MD_get_type((const EVP_MD *)p2) != NID_sha256 && EVP_MD_get_type((const EVP_MD *)p2) != NID_sha384 && EVP_MD_get_type((const EVP_MD *)p2) != NID_sha512 && EVP_MD_get_type((const EVP_MD *)p2) != NID_sha3_224 && EVP_MD_get_type((const EVP_MD *)p2) != NID_sha3_256 && EVP_MD_get_type((const EVP_MD *)p2) != NID_sha3_384 && EVP_MD_get_type((const EVP_MD *)p2) != NID_sha3_512 && EVP_MD_get_type((const EVP_MD *)p2) != NID_sm3) { |
| 355 |
ERR_raise(ERR_LIB_EC, EC_R_INVALID_DIGEST_TYPE); |
| 356 |
return 0; |
| 357 |
} |
| 358 |
dctx->md = p2; |
| 359 |
return 1; |
| 360 |
|
| 361 |
case EVP_PKEY_CTRL_GET_MD: |
| 362 |
*(const EVP_MD **)p2 = dctx->md; |
| 363 |
return 1; |
| 364 |
|
| 365 |
case EVP_PKEY_CTRL_PEER_KEY: |
| 366 |
/* Default behaviour is OK */ |
| 367 |
case EVP_PKEY_CTRL_DIGESTINIT: |
| 368 |
case EVP_PKEY_CTRL_PKCS7_SIGN: |
| 369 |
case EVP_PKEY_CTRL_CMS_SIGN: |
| 370 |
return 1; |
| 371 |
|
| 372 |
default: |
| 373 |
return -2; |
| 374 |
} |
| 375 |
} |
| 376 |
|
| 377 |
static int pkey_ec_ctrl_str(EVP_PKEY_CTX *ctx, |
| 378 |
const char *type, const char *value) |
| 379 |
{ |
| 380 |
if (strcmp(type, "ec_paramgen_curve") == 0) { |
| 381 |
int nid; |
| 382 |
nid = EC_curve_nist2nid(value); |
| 383 |
if (nid == NID_undef) |
| 384 |
nid = OBJ_sn2nid(value); |
| 385 |
if (nid == NID_undef) |
| 386 |
nid = OBJ_ln2nid(value); |
| 387 |
if (nid == NID_undef) { |
| 388 |
ERR_raise(ERR_LIB_EC, EC_R_INVALID_CURVE); |
| 389 |
return 0; |
| 390 |
} |
| 391 |
return EVP_PKEY_CTX_set_ec_paramgen_curve_nid(ctx, nid); |
| 392 |
} else if (strcmp(type, "ec_param_enc") == 0) { |
| 393 |
int param_enc; |
| 394 |
if (strcmp(value, "explicit") == 0) |
| 395 |
param_enc = 0; |
| 396 |
else if (strcmp(value, "named_curve") == 0) |
| 397 |
param_enc = OPENSSL_EC_NAMED_CURVE; |
| 398 |
else |
| 399 |
return -2; |
| 400 |
return EVP_PKEY_CTX_set_ec_param_enc(ctx, param_enc); |
| 401 |
} else if (strcmp(type, "ecdh_kdf_md") == 0) { |
| 402 |
const EVP_MD *md; |
| 403 |
if ((md = EVP_get_digestbyname(value)) == NULL) { |
| 404 |
ERR_raise(ERR_LIB_EC, EC_R_INVALID_DIGEST); |
| 405 |
return 0; |
| 406 |
} |
| 407 |
return EVP_PKEY_CTX_set_ecdh_kdf_md(ctx, md); |
| 408 |
} else if (strcmp(type, "ecdh_cofactor_mode") == 0) { |
| 409 |
int co_mode; |
| 410 |
co_mode = atoi(value); |
| 411 |
return EVP_PKEY_CTX_set_ecdh_cofactor_mode(ctx, co_mode); |
| 412 |
} |
| 413 |
|
| 414 |
return -2; |
| 415 |
} |
| 416 |
|
| 417 |
static int pkey_ec_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) |
| 418 |
{ |
| 419 |
EC_KEY *ec = NULL; |
| 420 |
EC_PKEY_CTX *dctx = ctx->data; |
| 421 |
int ret; |
| 422 |
|
| 423 |
if (dctx->gen_group == NULL) { |
| 424 |
ERR_raise(ERR_LIB_EC, EC_R_NO_PARAMETERS_SET); |
| 425 |
return 0; |
| 426 |
} |
| 427 |
ec = EC_KEY_new(); |
| 428 |
if (ec == NULL) |
| 429 |
return 0; |
| 430 |
if (!(ret = EC_KEY_set_group(ec, dctx->gen_group)) |
| 431 |
|| !ossl_assert(ret = EVP_PKEY_assign_EC_KEY(pkey, ec))) |
| 432 |
EC_KEY_free(ec); |
| 433 |
return ret; |
| 434 |
} |
| 435 |
|
| 436 |
static int pkey_ec_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) |
| 437 |
{ |
| 438 |
EC_KEY *ec = NULL; |
| 439 |
EC_PKEY_CTX *dctx = ctx->data; |
| 440 |
int ret; |
| 441 |
|
| 442 |
if (ctx->pkey == NULL && dctx->gen_group == NULL) { |
| 443 |
ERR_raise(ERR_LIB_EC, EC_R_NO_PARAMETERS_SET); |
| 444 |
return 0; |
| 445 |
} |
| 446 |
ec = EC_KEY_new(); |
| 447 |
if (ec == NULL) |
| 448 |
return 0; |
| 449 |
if (!ossl_assert(EVP_PKEY_assign_EC_KEY(pkey, ec))) { |
| 450 |
EC_KEY_free(ec); |
| 451 |
return 0; |
| 452 |
} |
| 453 |
/* Note: if error is returned, we count on caller to free pkey->pkey.ec */ |
| 454 |
if (ctx->pkey != NULL) |
| 455 |
ret = EVP_PKEY_copy_parameters(pkey, ctx->pkey); |
| 456 |
else |
| 457 |
ret = EC_KEY_set_group(ec, dctx->gen_group); |
| 458 |
|
| 459 |
return ret ? EC_KEY_generate_key(ec) : 0; |
| 460 |
} |
| 461 |
|
| 462 |
static const EVP_PKEY_METHOD ec_pkey_meth = { |
| 463 |
EVP_PKEY_EC, |
| 464 |
0, |
| 465 |
pkey_ec_init, |
| 466 |
pkey_ec_copy, |
| 467 |
pkey_ec_cleanup, |
| 468 |
|
| 469 |
0, |
| 470 |
pkey_ec_paramgen, |
| 471 |
|
| 472 |
0, |
| 473 |
pkey_ec_keygen, |
| 474 |
|
| 475 |
0, |
| 476 |
pkey_ec_sign, |
| 477 |
|
| 478 |
0, |
| 479 |
pkey_ec_verify, |
| 480 |
|
| 481 |
0, 0, |
| 482 |
|
| 483 |
0, 0, 0, 0, |
| 484 |
|
| 485 |
0, |
| 486 |
0, |
| 487 |
|
| 488 |
0, |
| 489 |
0, |
| 490 |
|
| 491 |
0, |
| 492 |
#ifndef OPENSSL_NO_EC |
| 493 |
pkey_ec_kdf_derive, |
| 494 |
#else |
| 495 |
0, |
| 496 |
#endif |
| 497 |
pkey_ec_ctrl, |
| 498 |
pkey_ec_ctrl_str |
| 499 |
}; |
| 500 |
|
| 501 |
const EVP_PKEY_METHOD *ossl_ec_pkey_method(void) |
| 502 |
{ |
| 503 |
return &ec_pkey_meth; |
| 504 |
} |