/system/keymaster/ |
D | google_keymaster_messages.cpp | 63 delete[] key_blob.key_material; in ~GenerateKeyResponse() 67 return sizeof(uint32_t) /* key size */ + key_blob.key_material_size + in NonErrorSerializedSize() 72 buf = append_size_and_data_to_buf(buf, end, key_blob.key_material, key_blob.key_material_size); in NonErrorSerialize() 78 delete[] key_blob.key_material; in NonErrorDeserialize() 79 key_blob.key_material = NULL; in NonErrorDeserialize() 81 if (!copy_size_and_data_from_buf(buf_ptr, end, &key_blob.key_material_size, in NonErrorDeserialize() 85 key_blob.key_material = deserialized_key_material.release(); in NonErrorDeserialize() 90 delete[] key_blob.key_material; in ~GetKeyCharacteristicsRequest() 94 delete[] key_blob.key_material; in SetKeyMaterial() 95 key_blob.key_material = dup_buffer(key_material, length); in SetKeyMaterial() [all …]
|
D | google_keymaster_messages_test.cpp | 125 rsp.key_blob.key_material = dup_array(TEST_DATA); in TEST() 126 rsp.key_blob.key_material_size = array_length(TEST_DATA); in TEST() 138 rsp.key_blob.key_material = dup_array(TEST_DATA); in TEST() 139 rsp.key_blob.key_material_size = array_length(TEST_DATA); in TEST() 146 EXPECT_EQ(0U, deserialized->key_blob.key_material_size); in TEST() 156 EXPECT_EQ(3U, deserialized->key_blob.key_material_size); in TEST() 157 EXPECT_EQ(0, memcmp(deserialized->key_blob.key_material, "foo", 3)); in TEST() 179 EXPECT_EQ(3U, deserialized->key_blob.key_material_size); in TEST() 180 EXPECT_EQ(0, memcmp(deserialized->key_blob.key_material, "foo", 3)); in TEST() 269 EXPECT_EQ(msg.key_blob.key_material_size, deserialized->key_blob.key_material_size); in TEST() [all …]
|
D | google_keymaster_test.cpp | 367 req.SetKeyMaterial(gen_rsp.key_blob); in TEST_F() 406 SignMessage(generate_response_.key_blob, message, size); in SignMessage() 409 void SignMessage(const keymaster_key_blob_t& key_blob, const void* message, size_t size) { in SignMessage() argument 412 begin_request.SetKeyMaterial(key_blob); in SignMessage() 438 const keymaster_key_blob_t& key_blob() { return generate_response_.key_blob; } in key_blob() function in keymaster::test::SigningOperationsTest 441 uint8_t* tmp = const_cast<uint8_t*>(generate_response_.key_blob.key_material); in corrupt_key_blob() 442 ++tmp[generate_response_.key_blob.key_material_size / 2]; in corrupt_key_blob() 443 return generate_response_.key_blob; in corrupt_key_blob() 463 begin_request.SetKeyMaterial(key_blob()); in TEST_F() 495 begin_request.SetKeyMaterial(key_blob()); in TEST_F() [all …]
|
D | Android.mk | 34 key_blob.cpp \ 54 key_blob.cpp \
|
D | Makefile | 40 key_blob.cpp \ 109 key_blob.o \ 132 key_blob.o \
|
D | google_keymaster.cpp | 170 response->error = SerializeKey(key.get(), origin(), &response->key_blob, &response->enforced, in GenerateKey() 181 LoadKeyBlob(request.key_blob, request.additional_params, &(response->error))); in GetKeyCharacteristics() 196 UniquePtr<Key> key(LoadKey(request.key_blob, request.additional_params, &response->error)); in BeginOperation() 273 LoadKey(request.key_blob, request.additional_params, &response->error)); in ExportKey() 295 response->error = SerializeKey(key.get(), KM_ORIGIN_IMPORTED, &response->key_blob, in ImportKey()
|
D | key_blob.cpp | 103 KeyBlob::KeyBlob(const uint8_t* key_blob, size_t blob_size) in KeyBlob() argument 111 if (!Deserialize(&key_blob, key_blob + blob_size)) in KeyBlob()
|
/system/security/keystore/ |
D | keyblob_utils.cpp | 45 uint8_t* add_softkey_header(uint8_t* key_blob, size_t key_blob_length) { in add_softkey_header() argument 50 memcpy(key_blob, SOFT_KEY_MAGIC, sizeof(SOFT_KEY_MAGIC)); in add_softkey_header() 52 return key_blob + sizeof(SOFT_KEY_MAGIC); in add_softkey_header() 55 bool is_softkey(const uint8_t* key_blob, const size_t key_blob_length) { in is_softkey() argument 60 return !memcmp(key_blob, SOFT_KEY_MAGIC, sizeof(SOFT_KEY_MAGIC)); in is_softkey()
|
/system/keymaster/include/keymaster/ |
D | google_keymaster_messages.h | 121 key_blob.key_material = NULL; in GenerateKeyResponse() 122 key_blob.key_material_size = 0; in GenerateKeyResponse() 130 keymaster_key_blob_t key_blob; member 136 GetKeyCharacteristicsRequest() { key_blob.key_material = NULL; } in GetKeyCharacteristicsRequest() 148 keymaster_key_blob_t key_blob; member 162 BeginOperationRequest() { key_blob.key_material = NULL; } in BeginOperationRequest() 163 ~BeginOperationRequest() { delete[] key_blob.key_material; } in ~BeginOperationRequest() 175 keymaster_key_blob_t key_blob; member 246 ImportKeyResponse() { key_blob.key_material = NULL; } in ImportKeyResponse() 247 ~ImportKeyResponse() { delete[] key_blob.key_material; } in ~ImportKeyResponse() [all …]
|
D | key_blob.h | 80 KeyBlob(const uint8_t* key_blob, size_t blob_size);
|
/system/security/keystore/include/keystore/ |
D | keystore.h | 67 uint8_t* add_softkey_header(uint8_t* key_blob, size_t key_blob_length); 72 bool is_softkey(const uint8_t* key_blob, const size_t key_blob_length);
|
/system/security/softkeymaster/include/keymaster/ |
D | softkeymaster.h | 26 const size_t key_length, uint8_t** key_blob, size_t* key_blob_length); 28 int openssl_get_keypair_public(const struct keymaster_device* dev, const uint8_t* key_blob,
|
/system/security/softkeymaster/ |
D | keymaster_openssl.cpp | 420 uint8_t** key_blob, in openssl_import_keypair() argument 425 } else if (key_blob == NULL || key_blob_length == NULL) { in openssl_import_keypair() 444 if (wrap_key(pkey.get(), EVP_PKEY_type(pkey->type), key_blob, key_blob_length)) { in openssl_import_keypair() 452 const struct keymaster_device*, const uint8_t* key_blob, const size_t key_blob_length, in openssl_get_keypair_public() argument 460 Unique_EVP_PKEY pkey(unwrap_key(key_blob, key_blob_length)); in openssl_get_keypair_public()
|