diff options
Diffstat (limited to 'src/lib/libcrypto/ec/ec_lcl.h')
-rw-r--r-- | src/lib/libcrypto/ec/ec_lcl.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/lib/libcrypto/ec/ec_lcl.h b/src/lib/libcrypto/ec/ec_lcl.h index cff0892e89..8948e51d69 100644 --- a/src/lib/libcrypto/ec/ec_lcl.h +++ b/src/lib/libcrypto/ec/ec_lcl.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ec_lcl.h,v 1.12 2019/01/19 01:07:00 tb Exp $ */ | 1 | /* $OpenBSD: ec_lcl.h,v 1.13 2019/01/19 01:12:48 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Originally written by Bodo Moeller for the OpenSSL project. | 3 | * Originally written by Bodo Moeller for the OpenSSL project. |
4 | */ | 4 | */ |
@@ -457,6 +457,9 @@ struct ec_key_method_st { | |||
457 | int (*set_group)(EC_KEY *key, const EC_GROUP *grp); | 457 | int (*set_group)(EC_KEY *key, const EC_GROUP *grp); |
458 | int (*set_private)(EC_KEY *key, const BIGNUM *priv_key); | 458 | int (*set_private)(EC_KEY *key, const BIGNUM *priv_key); |
459 | int (*set_public)(EC_KEY *key, const EC_POINT *pub_key); | 459 | int (*set_public)(EC_KEY *key, const EC_POINT *pub_key); |
460 | int (*keygen)(EC_KEY *key); | ||
461 | int (*compute_key)(void *out, size_t outlen, const EC_POINT *pub_key, EC_KEY *ecdh, | ||
462 | void *(*KDF) (const void *in, size_t inlen, void *out, size_t *outlen)); | ||
460 | int (*sign)(int type, const unsigned char *dgst, int dlen, unsigned char | 463 | int (*sign)(int type, const unsigned char *dgst, int dlen, unsigned char |
461 | *sig, unsigned int *siglen, const BIGNUM *kinv, | 464 | *sig, unsigned int *siglen, const BIGNUM *kinv, |
462 | const BIGNUM *r, EC_KEY *eckey); | 465 | const BIGNUM *r, EC_KEY *eckey); |
@@ -465,10 +468,22 @@ struct ec_key_method_st { | |||
465 | ECDSA_SIG *(*sign_sig)(const unsigned char *dgst, int dgst_len, | 468 | ECDSA_SIG *(*sign_sig)(const unsigned char *dgst, int dgst_len, |
466 | const BIGNUM *in_kinv, const BIGNUM *in_r, | 469 | const BIGNUM *in_kinv, const BIGNUM *in_r, |
467 | EC_KEY *eckey); | 470 | EC_KEY *eckey); |
471 | int (*verify)(int type, const unsigned char *dgst, int dgst_len, | ||
472 | const unsigned char *sigbuf, int sig_len, EC_KEY *eckey); | ||
473 | int (*verify_sig)(const unsigned char *dgst, int dgst_len, | ||
474 | const ECDSA_SIG *sig, EC_KEY *eckey); | ||
468 | } /* EC_KEY_METHOD */; | 475 | } /* EC_KEY_METHOD */; |
469 | 476 | ||
470 | #define EC_KEY_METHOD_DYNAMIC 1 | 477 | #define EC_KEY_METHOD_DYNAMIC 1 |
471 | 478 | ||
479 | int ossl_ec_key_gen(EC_KEY *eckey); | ||
480 | int ossl_ecdh_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, EC_KEY *ecdh, | ||
481 | void *(*KDF) (const void *in, size_t inlen, void *out, size_t *outlen)); | ||
482 | int ossl_ecdsa_verify(int type, const unsigned char *dgst, int dgst_len, | ||
483 | const unsigned char *sigbuf, int sig_len, EC_KEY *eckey); | ||
484 | int ossl_ecdsa_verify_sig(const unsigned char *dgst, int dgst_len, | ||
485 | const ECDSA_SIG *sig, EC_KEY *eckey); | ||
486 | |||
472 | /* method functions in ecp_nistp521.c */ | 487 | /* method functions in ecp_nistp521.c */ |
473 | int ec_GFp_nistp521_group_init(EC_GROUP *group); | 488 | int ec_GFp_nistp521_group_init(EC_GROUP *group); |
474 | int ec_GFp_nistp521_group_set_curve(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *n, BN_CTX *); | 489 | int ec_GFp_nistp521_group_set_curve(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, const BIGNUM *n, BN_CTX *); |