/system/keymaster/ |
D | google_softkeymaster.h | 29 root_of_trust.blob.data = reinterpret_cast<const uint8_t*>("SW"); in GoogleSoftKeymaster() 30 root_of_trust.blob.data_length = 2; in GoogleSoftKeymaster() 39 keymaster_key_blob_t blob; in MasterKey() local 40 blob.key_material = master_key_; in MasterKey() 41 blob.key_material_size = 16; in MasterKey() 42 return blob; in MasterKey()
|
D | google_keymaster_test_utils.cpp | 80 if ((a.blob.data == NULL || b.blob.data == NULL) && a.blob.data != b.blob.data) in operator ==() 82 return a.blob.data_length == b.blob.data_length && in operator ==() 83 (memcmp(a.blob.data, b.blob.data, a.blob.data_length) == 0); in operator ==()
|
D | openssl_utils.h | 41 inline void convert_bn_to_blob(BIGNUM* bn, keymaster_blob_t* blob) { in convert_bn_to_blob() argument 42 blob->data_length = BN_num_bytes(bn); in convert_bn_to_blob() 43 blob->data = new uint8_t[blob->data_length]; in convert_bn_to_blob() 44 BN_bn2bin(bn, const_cast<uint8_t*>(blob->data)); in convert_bn_to_blob()
|
D | authorization_set.cpp | 76 elems_[i].blob.data = new_data + (elems_[i].blob.data - indirect_data_); in reserve_indirect() 164 size_t min_len = lhs->blob.data_length; in param_comparator() 165 if (rhs->blob.data_length < min_len) in param_comparator() 166 min_len = rhs->blob.data_length; in param_comparator() 168 if (lhs->blob.data_length == rhs->blob.data_length && min_len > 0) in param_comparator() 169 return memcmp(lhs->blob.data, rhs->blob.data, min_len); in param_comparator() 170 int cmp_result = memcmp(lhs->blob.data, rhs->blob.data, min_len); in param_comparator() 175 return comparator(lhs->blob.data_length, rhs->blob.data_length); in param_comparator() 208 if (indirect_data_capacity_ - indirect_data_size_ < elem.blob.data_length) in push_back() 209 if (!reserve_indirect(2 * (indirect_data_capacity_ + elem.blob.data_length))) in push_back() [all …]
|
D | key.cpp | 32 Key::Key(const KeyBlob& blob, const Logger& logger) : logger_(logger) { in Key() argument 33 authorizations_.push_back(blob.unenforced()); in Key() 34 authorizations_.push_back(blob.enforced()); in Key() 38 Key* Key::CreateKey(const KeyBlob& blob, const Logger& logger, keymaster_error_t* error) { in CreateKey() argument 39 switch (blob.algorithm()) { in CreateKey() 41 return new RsaKey(blob, logger, error); in CreateKey() 43 return new DsaKey(blob, logger, error); in CreateKey() 45 return new EcdsaKey(blob, logger, error); in CreateKey()
|
D | asymmetric_key.cpp | 38 keymaster_error_t AsymmetricKey::LoadKey(const KeyBlob& blob) { in LoadKey() argument 44 const uint8_t* key_material = blob.key_material(); in LoadKey() 45 if (d2i_PrivateKey(evp_key_type(), &tmp_pkey, &key_material, blob.key_material_length()) == in LoadKey() 221 RsaKey::RsaKey(const KeyBlob& blob, const Logger& logger, keymaster_error_t* error) in RsaKey() argument 222 : AsymmetricKey(blob, logger) { in RsaKey() 224 *error = LoadKey(blob); in RsaKey() 256 keymaster_blob_t* blob) { in GetDsaParamData() argument 257 if (!auths.GetTagValue(tag, blob)) in GetDsaParamData() 258 blob->data = NULL; in GetDsaParamData() 264 keymaster_blob_t blob; in SetDsaParamData() local [all …]
|
D | google_keymaster.cpp | 180 UniquePtr<KeyBlob> blob( in GetKeyCharacteristics() local 182 if (blob.get() == NULL) in GetKeyCharacteristics() 185 response->enforced.Reinitialize(blob->enforced()); in GetKeyCharacteristics() 186 response->unenforced.Reinitialize(blob->unenforced()); in GetKeyCharacteristics() 324 UniquePtr<KeyBlob> blob( in SerializeKey() local 326 if (blob.get() == NULL) in SerializeKey() 328 if (blob->error() != KM_ERROR_OK) in SerializeKey() 329 return blob->error(); in SerializeKey() 331 size_t size = blob->SerializedSize(); in SerializeKey() 336 blob->Serialize(blob_bytes.get(), blob_bytes.get() + size); in SerializeKey() [all …]
|
D | asymmetric_key.h | 32 AsymmetricKey(const KeyBlob& blob, const Logger& logger) : Key(blob, logger) {} in AsymmetricKey() argument 33 keymaster_error_t LoadKey(const KeyBlob& blob); 66 RsaKey(const KeyBlob& blob, const Logger& logger, keymaster_error_t* error); 92 DsaKey(const KeyBlob& blob, const Logger& logger, keymaster_error_t* error); 120 EcdsaKey(const KeyBlob& blob, const Logger& logger, keymaster_error_t* error);
|
D | key.h | 31 static Key* CreateKey(const KeyBlob& blob, const Logger& logger, keymaster_error_t* error); 56 Key(const KeyBlob& blob, const Logger& logger);
|
D | google_keymaster_test_utils.h | 85 std::string(reinterpret_cast<const char*>(set[pos].blob.data), in contains() 86 set[pos].blob.data_length) == val; in contains()
|
D | authorization_set_test.cpp | 174 EXPECT_EQ(6U, deserialized[pos].blob.data_length); in TEST() 175 EXPECT_EQ(0, memcmp(deserialized[pos].blob.data, "my_app", 6)); in TEST() 211 EXPECT_EQ(6U, deserialized[pos].blob.data_length); in TEST() 212 EXPECT_EQ(0, memcmp(deserialized[pos].blob.data, "my_app", 6)); in TEST()
|
/system/keymaster/include/keymaster/ |
D | google_keymaster_messages.h | 140 void SetKeyMaterial(const keymaster_key_blob_t& blob) { in SetKeyMaterial() 141 SetKeyMaterial(blob.key_material, blob.key_material_size); in SetKeyMaterial() 166 void SetKeyMaterial(const keymaster_key_blob_t& blob) { in SetKeyMaterial() 167 SetKeyMaterial(blob.key_material, blob.key_material_size); in SetKeyMaterial() 250 void SetKeyMaterial(const keymaster_key_blob_t& blob) { in SetKeyMaterial() 251 SetKeyMaterial(blob.key_material, blob.key_material_size); in SetKeyMaterial() 268 void SetKeyMaterial(const keymaster_key_blob_t& blob) { in SetKeyMaterial() 269 SetKeyMaterial(blob.key_material, blob.key_material_size); in SetKeyMaterial()
|
D | keymaster_tags.h | 237 const keymaster_blob_t& blob) { 238 return keymaster_param_blob(tag, blob.data, blob.data_length); 249 const keymaster_blob_t& blob) { 250 return keymaster_param_blob(tag, blob.data, blob.data_length);
|
D | keymaster_defs.h | 277 keymaster_blob_t blob; /* KM_BIGNUM and KM_BYTES*/ member 436 param.blob.data = bytes; in keymaster_param_blob() 437 param.blob.data_length = bytes_len; in keymaster_param_blob() 464 free((void*)param->blob.data); in keymaster_free_param_values()
|
D | google_keymaster.h | 112 KeyBlob* blob); 113 keymaster_error_t UnwrapKey(const KeyBlob* blob, uint8_t* key, size_t key_length);
|
/system/security/keystore/ |
D | keystore.cpp | 464 struct __attribute__((packed)) blob { struct 514 Blob(blob b) { in Blob() 702 struct blob mBlob; 807 blob rawBlob; in readMasterKey() 1402 bool upgradeBlob(const char* filename, Blob* blob, const uint8_t oldVersion, in upgradeBlob() argument 1411 blob->setType(type); in upgradeBlob() 1413 importBlobAsKey(blob, filename, uid); in upgradeBlob() 1423 blob->setEncrypted(true); in upgradeBlob() 1434 blob->setVersion(version); in upgradeBlob() 1446 ResponseCode importBlobAsKey(Blob* blob, const char* filename, uid_t uid) { in importBlobAsKey() argument [all …]
|