Home
last modified time | relevance | path

Searched refs:key_id (Results 1 – 13 of 13) sorted by relevance

/system/security/keystore-engine/
Dandroid_engine.cpp61 char *key_id = reinterpret_cast<char *>(*from_d); in key_id_dup() local
62 if (key_id != nullptr) { in key_id_dup()
63 *from_d = strdup(key_id); in key_id_dup()
75 char *key_id = reinterpret_cast<char *>(ptr); in key_id_free() local
76 free(key_id); in key_id_free()
96 const char *key_id = rsa_get_key_id(rsa); in rsa_private_transform() local
97 if (key_id == nullptr) { in rsa_private_transform()
104 int32_t ret = g_keystore_backend->sign(key_id, in, len, &reply, &reply_len); in rsa_private_transform()
150 const char *key_id = ecdsa_get_key_id(ec_key); in ecdsa_sign() local
151 if (key_id == nullptr) { in ecdsa_sign()
[all …]
Dkeystore_backend_hidl.cpp34 const char *key_id, const uint8_t* in, size_t len, uint8_t** reply, in sign() argument
36 if (key_id == nullptr || in == nullptr || reply == nullptr || reply_len == nullptr) { in sign()
57 key_id, std::vector<uint8_t>(in, in + len), cb); in sign()
65 const char *key_id, uint8_t** pubkey, size_t* pubkey_len) { in get_pubkey() argument
66 if (key_id == nullptr || pubkey == nullptr || pubkey_len == nullptr) { in get_pubkey()
86 Return<void> ret = service->getPublicKey(key_id, cb); in get_pubkey()
Dkeystore_backend.h31 virtual int32_t sign(const char *key_id, const uint8_t* in, size_t len,
33 virtual int32_t get_pubkey(const char *key_id, uint8_t** pubkey,
Dkeystore_backend_binder.h32 int32_t sign(const char *key_id, const uint8_t* in, size_t len,
34 int32_t get_pubkey(const char *key_id, uint8_t** pubkey,
Dkeystore_backend_hidl.h32 int32_t sign(const char *key_id, const uint8_t* in, size_t len,
34 int32_t get_pubkey(const char *key_id, uint8_t** pubkey,
Dkeystore_backend_binder.cpp96 int32_t KeystoreBackendBinder::sign(const char* key_id, const uint8_t* in, size_t len, in sign() argument
107 String16 key_name16(key_id); in sign()
245 int32_t KeystoreBackendBinder::get_pubkey(const char* key_id, uint8_t** pubkey, in get_pubkey() argument
260 promise, String16(key_id), static_cast<int32_t>(KeyFormat::X509), in get_pubkey()
/system/keymaster/tests/
Dkeymaster_enforcement_test.cpp91 static const km_id_t key_id = 0xa; member in keymaster::test::KeymasterBaseTest
104 kmen.AuthorizeOperation(KM_PURPOSE_SIGN, key_id, AuthProxy(single_auth_set, empty)); in TEST_F()
117 kmen.AuthorizeOperation(KM_PURPOSE_SIGN, key_id, AuthProxy(auth_set, empty))); in TEST_F()
121 kmen.AuthorizeOperation(KM_PURPOSE_VERIFY, key_id, AuthProxy(auth_set, empty))); in TEST_F()
132 kmen.AuthorizeOperation(KM_PURPOSE_SIGN, key_id, AuthProxy(auth_set, empty)); in TEST_F()
145 kmen.AuthorizeOperation(KM_PURPOSE_SIGN, key_id, AuthProxy(auth_set, empty))); in TEST_F()
149 kmen.AuthorizeOperation(KM_PURPOSE_VERIFY, key_id, AuthProxy(auth_set, empty))); in TEST_F()
161 kmen.AuthorizeOperation(KM_PURPOSE_VERIFY, key_id, AuthProxy(auth_set, empty)); in TEST_F()
174 kmen.AuthorizeOperation(KM_PURPOSE_SIGN, key_id, AuthProxy(auth_set, empty)); in TEST_F()
188 kmen.AuthorizeOperation(KM_PURPOSE_VERIFY, key_id, AuthProxy(auth_set, empty)); in TEST_F()
[all …]
/system/core/libkeyutils/mini_keyctl/
Dmini_keyctl_utils.cpp65 std::string key_id = "0x" + tokens[0]; in GetKeyringId() local
74 if (!android::base::ParseInt(key_id.c_str(), &keyring_id)) { in GetKeyringId()
75 LOG(ERROR) << "Unexpected key format in /proc/keys: " << key_id; in GetKeyringId()
/system/bt/stack/crypto_toolbox/
Dcrypto_toolbox.cc56 uint8_t* key_id, const Octet16& n1, in calculate_mac_key_or_ltk() argument
70 it = std::copy(key_id, key_id + 4, it); in calculate_mac_key_or_ltk()
89 uint8_t key_id[4] = {0x65, 0x6c, 0x74, 0x62}; /* 0x62746c65 */ in f5() local
92 *mac_key = calculate_mac_key_or_ltk(t, 0, key_id, n1, n2, a1, a2, length); in f5()
94 *ltk = calculate_mac_key_or_ltk(t, 1, key_id, n1, n2, a1, a2, length); in f5()
/system/keymaster/include/keymaster/
Doperation.h104 void set_key_id(uint64_t key_id) { key_id_ = key_id; } in set_key_id() argument
105 uint64_t key_id() const { return key_id_; } in key_id() function
/system/bt/gd/crypto_toolbox/
Dcrypto_toolbox.cc56 uint8_t* key_id, in calculate_mac_key_or_ltk() argument
72 it = std::copy(key_id, key_id + 4, it); in calculate_mac_key_or_ltk()
88 uint8_t key_id[4] = {0x65, 0x6c, 0x74, 0x62}; /* 0x62746c65 */ in f5() local
91 *mac_key = calculate_mac_key_or_ltk(t, 0, key_id, n1, n2, a1, a2, length); in f5()
93 *ltk = calculate_mac_key_or_ltk(t, 1, key_id, n1, n2, a1, a2, length); in f5()
/system/vold/
DKeyUtil.cpp167 key_serial_t key_id = in installKeyLegacy() local
169 if (key_id == -1) { in installKeyLegacy()
173 LOG(DEBUG) << "Added key " << key_id << " (" << ref << ") to keyring " << device_keyring in installKeyLegacy()
194 key_serial_t key_id = add_key("fscrypt-provisioning", ref.c_str(), (void*)&provisioning_key, in installProvisioningKey() local
196 if (key_id == -1) { in installProvisioningKey()
431 arg.key_id = key_serial; in reloadKeyFromSessionKeyring()
/system/keymaster/android_keymaster/
Dandroid_keymaster.cpp287 km_id_t key_id; in BeginOperation() local
289 if (!context_->enforcement_policy()->CreateKeyId(request.key_blob, &key_id)) return; in BeginOperation()
290 operation->set_key_id(key_id); in BeginOperation()
292 request.purpose, key_id, operation->authorizations(), request.additional_params, in BeginOperation()
318 operation->purpose(), operation->key_id(), operation->authorizations(), in UpdateOperation()
347 operation->purpose(), operation->key_id(), operation->authorizations(), in FinishOperation()