Lines Matching refs:eckey
33 static int ecdsa_sign_setup(EC_KEY *eckey, BN_CTX *ctx_in,
39 int ossl_ecdsa_sign_setup(EC_KEY *eckey, BN_CTX *ctx_in, BIGNUM **kinvp, in ossl_ecdsa_sign_setup() argument
42 if (eckey->group->meth->ecdsa_sign_setup == NULL) { in ossl_ecdsa_sign_setup()
47 return eckey->group->meth->ecdsa_sign_setup(eckey, ctx_in, kinvp, rp); in ossl_ecdsa_sign_setup()
52 EC_KEY *eckey) in ossl_ecdsa_sign_sig() argument
54 if (eckey->group->meth->ecdsa_sign_sig == NULL) { in ossl_ecdsa_sign_sig()
59 return eckey->group->meth->ecdsa_sign_sig(dgst, dgst_len, in ossl_ecdsa_sign_sig()
60 in_kinv, in_r, eckey); in ossl_ecdsa_sign_sig()
64 const ECDSA_SIG *sig, EC_KEY *eckey) in ossl_ecdsa_verify_sig() argument
66 if (eckey->group->meth->ecdsa_verify_sig == NULL) { in ossl_ecdsa_verify_sig()
71 return eckey->group->meth->ecdsa_verify_sig(dgst, dgst_len, sig, eckey); in ossl_ecdsa_verify_sig()
76 const BIGNUM *kinv, const BIGNUM *r, EC_KEY *eckey) in ossl_ecdsa_sign() argument
81 *siglen = ECDSA_size(eckey); in ossl_ecdsa_sign()
85 s = ECDSA_do_sign_ex(dgst, dlen, kinv, r, eckey); in ossl_ecdsa_sign()
97 EC_KEY *eckey, unsigned int nonce_type, in ossl_ecdsa_deterministic_sign() argument
115 if (!ecdsa_sign_setup(eckey, NULL, &kinv, &r, dgst, dlen, in ossl_ecdsa_deterministic_sign()
119 s = ECDSA_do_sign_ex(dgst, dlen, kinv, r, eckey); in ossl_ecdsa_deterministic_sign()
132 static int ecdsa_sign_setup(EC_KEY *eckey, BN_CTX *ctx_in, in ecdsa_sign_setup() argument
147 if (eckey == NULL || (group = EC_KEY_get0_group(eckey)) == NULL) { in ecdsa_sign_setup()
151 if ((priv_key = EC_KEY_get0_private_key(eckey)) == NULL) { in ecdsa_sign_setup()
156 if (!EC_KEY_can_sign(eckey)) { in ecdsa_sign_setup()
162 if ((ctx = BN_CTX_new_ex(eckey->libctx)) == NULL) { in ecdsa_sign_setup()
263 int ossl_ecdsa_simple_sign_setup(EC_KEY *eckey, BN_CTX *ctx_in, BIGNUM **kinvp, in ossl_ecdsa_simple_sign_setup() argument
266 return ecdsa_sign_setup(eckey, ctx_in, kinvp, rp, NULL, 0, in ossl_ecdsa_simple_sign_setup()
272 EC_KEY *eckey) in ossl_ecdsa_simple_sign_sig() argument
283 group = EC_KEY_get0_group(eckey); in ossl_ecdsa_simple_sign_sig()
284 priv_key = EC_KEY_get0_private_key(eckey); in ossl_ecdsa_simple_sign_sig()
295 if (!EC_KEY_can_sign(eckey)) { in ossl_ecdsa_simple_sign_sig()
313 if ((ctx = BN_CTX_new_ex(eckey->libctx)) == NULL in ossl_ecdsa_simple_sign_sig()
341 if (!ecdsa_sign_setup(eckey, ctx, &kinv, &ret->r, dgst, dgst_len, in ossl_ecdsa_simple_sign_sig()
420 const unsigned char *sigbuf, int sig_len, EC_KEY *eckey) in ossl_ecdsa_verify() argument
437 ret = ECDSA_do_verify(dgst, dgst_len, s, eckey); in ossl_ecdsa_verify()
445 const ECDSA_SIG *sig, EC_KEY *eckey) in ossl_ecdsa_simple_verify_sig() argument
456 if (eckey == NULL || (group = EC_KEY_get0_group(eckey)) == NULL || in ossl_ecdsa_simple_verify_sig()
457 (pub_key = EC_KEY_get0_public_key(eckey)) == NULL || sig == NULL) { in ossl_ecdsa_simple_verify_sig()
462 if (!EC_KEY_can_sign(eckey)) { in ossl_ecdsa_simple_verify_sig()
467 ctx = BN_CTX_new_ex(eckey->libctx); in ossl_ecdsa_simple_verify_sig()