Home
last modified time | relevance | path

Searched refs:ec_key (Results 1 – 15 of 15) sorted by relevance

/system/keymaster/
Dec_key_factory.cpp94 UniquePtr<EC_KEY, EC_KEY_Delete> ec_key(EC_KEY_new()); in GenerateKey() local
96 if (ec_key.get() == NULL || pkey.get() == NULL) in GenerateKey()
110 if (EC_KEY_set_group(ec_key.get(), group.get()) != 1 || in GenerateKey()
111 EC_KEY_generate_key(ec_key.get()) != 1 || EC_KEY_check_key(ec_key.get()) < 0) { in GenerateKey()
115 if (EVP_PKEY_set1_EC_KEY(pkey.get(), ec_key.get()) != 1) in GenerateKey()
161 UniquePtr<EC_KEY, EC_KEY_Delete> ec_key(EVP_PKEY_get1_EC_KEY(pkey.get())); in UpdateImportKeyDescription() local
162 if (!ec_key.get()) in UpdateImportKeyDescription()
168 error = ec_get_group_size(EC_KEY_get0_group(ec_key.get()), &extracted_key_size_bits); in UpdateImportKeyDescription()
Dkeymaster0_engine.cpp207 unique_ptr<EC_KEY, EC_KEY_Delete> ec_key(EC_KEY_new_method(engine_)); in BlobToEcKey() local
208 if (!ec_key) in BlobToEcKey()
212 if (!blob_copy->key_material || !EC_KEY_set_ex_data(ec_key.get(), ec_key_index_, blob_copy)) in BlobToEcKey()
224 if (!EC_KEY_set_group(ec_key.get(), EC_KEY_get0_group(public_ec_key.get())) || in BlobToEcKey()
225 !EC_KEY_set_public_key(ec_key.get(), EC_KEY_get0_public_key(public_ec_key.get()))) in BlobToEcKey()
228 return ec_key.release(); in BlobToEcKey()
235 const keymaster_key_blob_t* Keymaster0Engine::EcKeyToBlob(const EC_KEY* ec_key) const { in EcKeyToBlob()
236 return reinterpret_cast<keymaster_key_blob_t*>(EC_KEY_get_ex_data(ec_key, ec_key_index_)); in EcKeyToBlob()
272 unsigned int* sig_len, EC_KEY* ec_key) { in ecdsa_sign() argument
273 ALOGV("ecdsa_sign(%p, %u, %p)", digest, (unsigned)digest_len, ec_key); in ecdsa_sign()
[all …]
Dkeymaster1_engine.cpp182 unique_ptr<EC_KEY, EC_KEY_Delete> ec_key(EC_KEY_new_method(engine_.get())); in BuildEcKey() local
183 if (!ec_key) { in BuildEcKey()
189 if (!EC_KEY_set_ex_data(ec_key.get(), ec_key_index_, key_data)) { in BuildEcKey()
209 if (!EC_KEY_set_group(ec_key.get(), EC_KEY_get0_group(public_ec_key.get())) || in BuildEcKey()
210 !EC_KEY_set_public_key(ec_key.get(), EC_KEY_get0_public_key(public_ec_key.get()))) { in BuildEcKey()
216 return ec_key.release(); in BuildEcKey()
227 unique_ptr<EC_KEY, EC_KEY_Delete> ec_key(EVP_PKEY_get1_EC_KEY(key)); in GetData() local
228 return GetData(ec_key.get()); in GetData()
242 Keymaster1Engine::KeyData* Keymaster1Engine::GetData(const EC_KEY* ec_key) const { in GetData()
243 if (!ec_key) in GetData()
[all …]
Dec_key.h41 EcKey(EC_KEY* ec_key, const AuthorizationSet& hw_enforced, const AuthorizationSet& sw_enforced, in EcKey() argument
43 : AsymmetricKey(hw_enforced, sw_enforced, error), ec_key_(ec_key) {} in EcKey()
Dnist_curve_key_exchange_test.cpp190 UniquePtr<EC_KEY, EC_KEY_Delete> ec_key( in TEST() local
192 ASSERT_TRUE(ec_key.get() && EC_KEY_check_key(ec_key.get())); in TEST()
195 NistCurveKeyExchange* key_exchange = new NistCurveKeyExchange(ec_key.release(), &error); in TEST()
Dec_keymaster0_key.h63 EcKeymaster0Key(EC_KEY* ec_key, const AuthorizationSet& hw_enforced, in EcKeymaster0Key() argument
65 : EcKey(ec_key, hw_enforced, sw_enforced, error) {} in EcKeymaster0Key()
Dec_keymaster0_key.cpp111 unique_ptr<EC_KEY, EC_KEY_Delete> ec_key(engine_->BlobToEcKey(key_material)); in LoadKey() local
112 if (!ec_key) in LoadKey()
117 EcKeymaster0Key(ec_key.release(), hw_enforced, sw_enforced, &error)); in LoadKey()
Dkeymaster0_engine.h76 unsigned int* sig_len, EC_KEY* ec_key);
89 EC_KEY* ec_key) const;
Dopenssl_utils.cpp131 size_t ec_group_size_bits(EC_KEY* ec_key) { in ec_group_size_bits() argument
132 const EC_GROUP* group = EC_KEY_get0_group(ec_key); in ec_group_size_bits()
Dopenssl_utils.h96 size_t ec_group_size_bits(EC_KEY* ec_key);
Dkeymaster1_engine.h108 unsigned int* sig_len, EC_KEY* ec_key);
DMakefile79 ec_key.cpp \
326 ec_key.o \
Dsoft_keymaster_context.cpp949 UniquePtr<EC_KEY, EC_KEY_Delete> ec_key(EVP_PKEY_get1_EC_KEY(pubkey)); in FakeKeyAuthorizations() local
950 if (!ec_key.get()) in FakeKeyAuthorizations()
954 ec_get_group_size(EC_KEY_get0_group(ec_key.get()), &key_size_bits); in FakeKeyAuthorizations()
DAndroid.mk60 ec_key.cpp \
/system/security/keystore-engine/
Dandroid_engine.cpp227 const char* ecdsa_get_key_id(const EC_KEY* ec_key) { in ecdsa_get_key_id() argument
229 EC_KEY_get_ex_data(ec_key, g_keystore_engine->ec_key_ex_index())); in ecdsa_get_key_id()
236 unsigned int* sig_len, EC_KEY* ec_key) { in ecdsa_sign() argument
237 ALOGV("ecdsa_sign(%p, %u, %p)", digest, (unsigned) digest_len, ec_key); in ecdsa_sign()
239 const char *key_id = ecdsa_get_key_id(ec_key); in ecdsa_sign()
254 size_t ecdsa_size = ECDSA_size(ec_key); in ecdsa_sign()
280 ec_key); in ecdsa_sign()