Home
last modified time | relevance | path

Searched refs:eckey (Results 1 – 11 of 11) sorted by relevance

/external/boringssl/src/crypto/ec/
Dec_key.c297 int EC_KEY_check_key(const EC_KEY *eckey) { in EC_KEY_check_key() argument
302 if (!eckey || !eckey->group || !eckey->pub_key) { in EC_KEY_check_key()
307 if (EC_POINT_is_at_infinity(eckey->group, eckey->pub_key)) { in EC_KEY_check_key()
319 if (!EC_POINT_is_on_curve(eckey->group, eckey->pub_key, ctx)) { in EC_KEY_check_key()
325 if (eckey->group->meth->check_pub_key_order != NULL && in EC_KEY_check_key()
326 !eckey->group->meth->check_pub_key_order(eckey->group, eckey->pub_key, in EC_KEY_check_key()
334 if (eckey->priv_key) { in EC_KEY_check_key()
336 if (BN_cmp(eckey->priv_key, EC_GROUP_get0_order(eckey->group)) >= 0) { in EC_KEY_check_key()
340 point = EC_POINT_new(eckey->group); in EC_KEY_check_key()
342 !EC_POINT_mul(eckey->group, point, eckey->priv_key, NULL, NULL, ctx)) { in EC_KEY_check_key()
[all …]
/external/boringssl/src/crypto/ecdsa/
Decdsa.c67 unsigned int *sig_len, EC_KEY *eckey) { in ECDSA_sign() argument
68 if (eckey->ecdsa_meth && eckey->ecdsa_meth->sign) { in ECDSA_sign()
69 return eckey->ecdsa_meth->sign(digest, digest_len, sig, sig_len, eckey); in ECDSA_sign()
73 eckey); in ECDSA_sign()
77 const uint8_t *sig, size_t sig_len, EC_KEY *eckey) { in ECDSA_verify() argument
82 if (eckey->ecdsa_meth && eckey->ecdsa_meth->verify) { in ECDSA_verify()
83 return eckey->ecdsa_meth->verify(digest, digest_len, sig, sig_len, eckey); in ECDSA_verify()
101 ret = ECDSA_do_verify(digest, digest_len, s, eckey); in ECDSA_verify()
143 const ECDSA_SIG *sig, EC_KEY *eckey) { in ECDSA_do_verify() argument
151 if (eckey->ecdsa_meth && eckey->ecdsa_meth->verify) { in ECDSA_do_verify()
[all …]
Decdsa_test.cc75 EC_KEY *eckey, int expected_result) { in VerifyECDSASig() argument
86 actual_result = ECDSA_verify(0, digest, digest_len, der, der_len, eckey); in VerifyECDSASig()
91 actual_result = ECDSA_do_verify(digest, digest_len, ecdsa_sig, eckey); in VerifyECDSASig()
105 EC_KEY *eckey, const BIGNUM *order) { in TestTamperedSig() argument
132 !VerifyECDSASig(api, digest, digest_len, ecdsa_sig, eckey, 0)) { in TestTamperedSig()
140 !VerifyECDSASig(api, digest, digest_len, ecdsa_sig, eckey, 1)) { in TestTamperedSig()
187 ScopedEC_KEY eckey(EC_KEY_new()); in TestBuiltin() local
188 if (!eckey || !EC_KEY_set_group(eckey.get(), group.get()) || in TestBuiltin()
189 !EC_KEY_generate_key(eckey.get())) { in TestBuiltin()
205 if (!EC_KEY_check_key(eckey.get())) { in TestBuiltin()
[all …]
/external/boringssl/src/crypto/evp/
Dp_ec_asn1.c131 EC_KEY *eckey = NULL; in eckey_type2param() local
138 eckey = d2i_ECParameters(NULL, &pm, pmlen); in eckey_type2param()
139 if (eckey == NULL) { in eckey_type2param()
148 eckey = EC_KEY_new_by_curve_name(OBJ_obj2nid(poid)); in eckey_type2param()
149 if (eckey == NULL) { in eckey_type2param()
157 return eckey; in eckey_type2param()
160 if (eckey) { in eckey_type2param()
161 EC_KEY_free(eckey); in eckey_type2param()
170 EC_KEY *eckey = NULL; in eckey_pub_decode() local
178 eckey = eckey_type2param(ptype, pval); in eckey_pub_decode()
[all …]
Dp_ec.c156 EC_KEY *eckey; in pkey_ec_derive() local
163 eckey = ctx->pkey->pkey.ec; in pkey_ec_derive()
167 group = EC_KEY_get0_group(eckey); in pkey_ec_derive()
178 ret = ECDH_compute_key(key, outlen, pubkey, eckey, 0); in pkey_ec_derive()
/external/boringssl/src/crypto/pem/
Dpem_all.c123 static EC_KEY *pkey_get_eckey(EVP_PKEY *key, EC_KEY **eckey);
227 static EC_KEY *pkey_get_eckey(EVP_PKEY *key, EC_KEY **eckey) in IMPLEMENT_PEM_rw_const()
234 if(eckey) in IMPLEMENT_PEM_rw_const()
236 EC_KEY_free(*eckey); in IMPLEMENT_PEM_rw_const()
237 *eckey = dtmp; in IMPLEMENT_PEM_rw_const()
257 EC_KEY *PEM_read_ECPrivateKey(FILE *fp, EC_KEY **eckey, pem_password_cb *cb, in IMPLEMENT_PEM_write_cb()
262 return pkey_get_eckey(pktmp, eckey); /* will free pktmp */ in IMPLEMENT_PEM_write_cb()
/external/boringssl/src/crypto/x509/
Dx_all.c313 EC_KEY *d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **eckey) in d2i_EC_PUBKEY_fp() argument
315 return ASN1_d2i_fp_of(EC_KEY,EC_KEY_new,d2i_EC_PUBKEY,fp,eckey); in d2i_EC_PUBKEY_fp()
318 int i2d_EC_PUBKEY_fp(FILE *fp, EC_KEY *eckey) in i2d_EC_PUBKEY_fp() argument
320 return ASN1_i2d_fp_of_const(EC_KEY,i2d_EC_PUBKEY,fp,eckey); in i2d_EC_PUBKEY_fp()
323 EC_KEY *d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey) in d2i_ECPrivateKey_fp() argument
325 return ASN1_d2i_fp_of(EC_KEY,EC_KEY_new,d2i_ECPrivateKey,fp,eckey); in d2i_ECPrivateKey_fp()
328 int i2d_ECPrivateKey_fp(FILE *fp, EC_KEY *eckey) in i2d_ECPrivateKey_fp() argument
330 return ASN1_i2d_fp_of_const(EC_KEY,i2d_ECPrivateKey,fp,eckey); in i2d_ECPrivateKey_fp()
333 EC_KEY *d2i_EC_PUBKEY_bio(BIO *bp, EC_KEY **eckey) in d2i_EC_PUBKEY_bio() argument
335 return ASN1_d2i_bio_of(EC_KEY,EC_KEY_new,d2i_EC_PUBKEY,bp,eckey); in d2i_EC_PUBKEY_bio()
[all …]
/external/boringssl/src/include/openssl/
Decdsa.h131 OPENSSL_EXPORT int ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx, BIGNUM **kinv,
139 EC_KEY *eckey);
146 const BIGNUM *rp, EC_KEY *eckey);
Dec_key.h260 unsigned int *sig_len, EC_KEY *eckey);
264 size_t sig_len, EC_KEY *eckey);
Dx509.h658 OPENSSL_EXPORT EC_KEY *d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **eckey);
659 OPENSSL_EXPORT int i2d_EC_PUBKEY_fp(FILE *fp, EC_KEY *eckey);
660 OPENSSL_EXPORT EC_KEY *d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey);
661 OPENSSL_EXPORT int i2d_ECPrivateKey_fp(FILE *fp, EC_KEY *eckey);
692 OPENSSL_EXPORT EC_KEY *d2i_EC_PUBKEY_bio(BIO *bp, EC_KEY **eckey);
693 OPENSSL_EXPORT int i2d_EC_PUBKEY_bio(BIO *bp, EC_KEY *eckey);
694 OPENSSL_EXPORT EC_KEY *d2i_ECPrivateKey_bio(BIO *bp, EC_KEY **eckey);
695 OPENSSL_EXPORT int i2d_ECPrivateKey_bio(BIO *bp, EC_KEY *eckey);
/external/conscrypt/src/main/native/
Dorg_conscrypt_NativeCrypto.cpp1779 const BIGNUM* /* rp */, EC_KEY* eckey) { argument
1782 reinterpret_cast<jobject>(ECDSA_get_ex_data(eckey, EcdsaGetExDataIndex()));
1804 size_t max_expected_size = static_cast<size_t>(ECDSA_size(eckey));
2700 Unique_EC_KEY eckey(EC_KEY_new()); local
2701 if (eckey.get() == nullptr) {
2706 if (EC_KEY_set_group(eckey.get(), group) != 1) {
2714 if (EC_KEY_set_public_key(eckey.get(), pubkey) != 1) {
2723 if (EC_KEY_set_private_key(eckey.get(), key.get()) != 1) {
2737 EC_KEY_set_public_key(eckey.get(), calcPubkey.get());
2741 if (!EC_KEY_check_key(eckey.get())) {
[all …]