Home
last modified time | relevance | path

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

/system/keymaster/legacy_support/
Dkeymaster0_engine.cpp189 unique_ptr<EC_KEY, EC_KEY_Delete> ec_key(EC_KEY_new_method(engine_)); in BlobToEcKey() local
190 if (!ec_key) in BlobToEcKey()
194 if (!blob_copy->key_material || !EC_KEY_set_ex_data(ec_key.get(), ec_key_index_, blob_copy)) in BlobToEcKey()
206 if (!EC_KEY_set_group(ec_key.get(), EC_KEY_get0_group(public_ec_key.get())) || in BlobToEcKey()
207 !EC_KEY_set_public_key(ec_key.get(), EC_KEY_get0_public_key(public_ec_key.get()))) in BlobToEcKey()
210 return ec_key.release(); in BlobToEcKey()
217 const keymaster_key_blob_t* Keymaster0Engine::EcKeyToBlob(const EC_KEY* ec_key) const { in EcKeyToBlob()
218 return reinterpret_cast<keymaster_key_blob_t*>(EC_KEY_get_ex_data(ec_key, ec_key_index_)); in EcKeyToBlob()
254 unsigned int* sig_len, EC_KEY* ec_key) { in ecdsa_sign() argument
255 ALOGV("ecdsa_sign(%p, %u, %p)", digest, (unsigned)digest_len, ec_key); in ecdsa_sign()
[all …]
Dkeymaster1_engine.cpp179 unique_ptr<EC_KEY, EC_KEY_Delete> ec_key(EC_KEY_new_method(engine_.get())); in BuildEcKey() local
180 if (!ec_key) { in BuildEcKey()
186 if (!EC_KEY_set_ex_data(ec_key.get(), ec_key_index_, key_data)) { in BuildEcKey()
204 if (!EC_KEY_set_group(ec_key.get(), EC_KEY_get0_group(public_ec_key.get())) || in BuildEcKey()
205 !EC_KEY_set_public_key(ec_key.get(), EC_KEY_get0_public_key(public_ec_key.get()))) { in BuildEcKey()
211 return ec_key.release(); in BuildEcKey()
222 unique_ptr<EC_KEY, EC_KEY_Delete> ec_key(EVP_PKEY_get1_EC_KEY(key)); in GetData() local
223 return GetData(ec_key.get()); in GetData()
237 Keymaster1Engine::KeyData* Keymaster1Engine::GetData(const EC_KEY* ec_key) const { in GetData()
238 if (!ec_key) in GetData()
[all …]
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()
116 EcKeymaster0Key(ec_key.release(), move(hw_enforced), move(sw_enforced), this)); in LoadKey()
/system/keymaster/km_openssl/
Dec_key_factory.cpp94 UniquePtr<EC_KEY, EC_KEY_Delete> ec_key(EC_KEY_new()); in GenerateKey() local
96 if (ec_key.get() == nullptr || pkey.get() == nullptr) 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()
Dopenssl_utils.cpp126 size_t ec_group_size_bits(EC_KEY* ec_key) { in ec_group_size_bits() argument
127 const EC_GROUP* group = EC_KEY_get0_group(ec_key); in ec_group_size_bits()
/system/security/keystore-engine/
Dandroid_engine.cpp139 const char* ecdsa_get_key_id(const EC_KEY* ec_key);
145 unsigned int* sig_len, EC_KEY* ec_key) { in ecdsa_sign() argument
146 ALOGV("ecdsa_sign(%p, %u, %p)", digest, (unsigned) digest_len, ec_key); in ecdsa_sign()
150 const char *key_id = ecdsa_get_key_id(ec_key); in ecdsa_sign()
156 size_t ecdsa_size = ECDSA_size(ec_key); in ecdsa_sign()
178 ec_key); in ecdsa_sign()
249 const char* ecdsa_get_key_id(const EC_KEY* ec_key) { in ecdsa_get_key_id() argument
251 EC_KEY_get_ex_data(ec_key, g_keystore_engine->ec_key_ex_index())); in ecdsa_get_key_id()
/system/keymaster/include/keymaster/km_openssl/
Dec_key.h42 EcKey(EC_KEY* ec_key, AuthorizationSet&& hw_enforced, AuthorizationSet&& sw_enforced, in EcKey() argument
44 : AsymmetricKey(move(hw_enforced), move(sw_enforced), key_factory), ec_key_(ec_key) {} in EcKey()
Dopenssl_utils.h97 size_t ec_group_size_bits(EC_KEY* ec_key);
/system/keymaster/include/keymaster/legacy_support/
Dec_keymaster0_key.h62 EcKeymaster0Key(EC_KEY* ec_key, AuthorizationSet&& hw_enforced, in EcKeymaster0Key() argument
64 : EcKey(ec_key, move(hw_enforced), move(sw_enforced), key_factory) {} in EcKeymaster0Key()
Dkeymaster0_engine.h77 unsigned int* sig_len, EC_KEY* ec_key);
90 EC_KEY* ec_key) const;
Dkeymaster1_engine.h108 unsigned int* sig_len, EC_KEY* ec_key);
/system/keymaster/tests/
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()
/system/keymaster/key_blob_utils/
Dsoftware_keyblobs.cpp145 UniquePtr<EC_KEY, EC_KEY_Delete> ec_key(EVP_PKEY_get1_EC_KEY(pubkey)); in FakeKeyAuthorizations() local
146 if (!ec_key.get()) in FakeKeyAuthorizations()
150 ec_get_group_size(EC_KEY_get0_group(ec_key.get()), &key_size_bits); in FakeKeyAuthorizations()
/system/core/trusty/keymaster/legacy/
DMakefile69 $(KM)/ec_key.cpp \
165 $(KM)/ec_key.o \
/system/keymaster/
DMakefile82 km_openssl/ec_key.cpp \
367 km_openssl/ec_key.o \
DAndroid.bp89 "km_openssl/ec_key.cpp",