diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2015-10-27 18:29:41 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2015-12-09 22:09:18 +0000 |
commit | c0efda00e985b63717ff2087e3f2206fbabe764f (patch) | |
tree | ca6cacc2d4251617dbb4d61bc311046c02736ef7 /crypto | |
parent | 6a47db450201dd7f6418be8177a6cfe5ffde3499 (diff) |
extend EC_KEY_METHOD for signing support
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/ec/ec_lcl.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/crypto/ec/ec_lcl.h b/crypto/ec/ec_lcl.h index 38b8c80f6b..b18e8821df 100644 --- a/crypto/ec/ec_lcl.h +++ b/crypto/ec/ec_lcl.h @@ -571,6 +571,14 @@ struct ec_key_method_st { EC_KEY *ecdh, void *(*KDF) (const void *in, size_t inlen, void *out, size_t *outlen)); + + int (*sign_setup)(EC_KEY *eckey, BN_CTX *ctx_in, BIGNUM **kinvp, + BIGNUM **rp); + ECDSA_SIG *(*sign_sig)(const unsigned char *dgst, int dgst_len, + const BIGNUM *in_kinv, const BIGNUM *in_r, + EC_KEY *eckey); + int (*verify_sig)(const unsigned char *dgst, int dgst_len, + const ECDSA_SIG *sig, EC_KEY *eckey); } /* EC_KEY_METHOD */ ; #define EC_KEY_METHOD_DYNAMIC 1 @@ -585,3 +593,11 @@ struct ECDSA_SIG_st { BIGNUM *r; BIGNUM *s; }; + +int ossl_ecdsa_sign_setup(EC_KEY *eckey, BN_CTX *ctx_in, BIGNUM **kinvp, + BIGNUM **rp); +ECDSA_SIG *ossl_ecdsa_sign_sig(const unsigned char *dgst, int dgst_len, + const BIGNUM *in_kinv, const BIGNUM *in_r, + EC_KEY *eckey); +int ossl_ecdsa_verify_sig(const unsigned char *dgst, int dgst_len, + const ECDSA_SIG *sig, EC_KEY *eckey); |