Searched defs:blob (Results 1 - 24 of 24) sorted by relevance

/system/update_engine/payload_generator/
H A Dblob_file_writer.cc23 off_t BlobFileWriter::StoreBlob(const brillo::Blob& blob) { argument
25 if (!utils::PWriteAll(blob_fd_, blob.data(), blob.size(), *blob_file_size_))
29 *blob_file_size_ += blob.size();
H A Dannotated_operation.cc39 bool AnnotatedOperation::SetOperationBlob(const brillo::Blob& blob, argument
41 if (blob.empty()) {
46 off_t data_offset = blob_file->StoreBlob(blob);
49 op.set_data_length(blob.size());
H A Dblock_mapping.cc34 size_t HashValue(const brillo::Blob& blob) { argument
36 return hash_fn(string(blob.begin(), blob.end()));
48 brillo::Blob blob(block_size_);
50 if (!utils::PReadAll(fd, blob.data(), block_size_, byte_offset, &bytes_read))
54 return AddBlock(fd, byte_offset, blob);
120 brillo::Blob blob(block_size);
122 if (!utils::PReadAll(fd, blob.data(), block_size, byte_offset, &bytes_read))
126 *equals = blob == other_block;
135 block_data = std::move(blob);
[all...]
H A Dab_generator.cc174 // If this is a REPLACE, attempt to reuse portions of the existing blob.
247 // Set the data length to zero so we know to add the blob later.
285 brillo::Blob blob; local
288 diff_utils::GenerateBestFullOperation(data, version, &blob, &op_type));
290 // If the operation doesn't point to a data blob or points to a data blob of
292 if (aop->op.type() != op_type || aop->op.data_length() != blob.size()) {
294 aop->SetOperationBlob(blob, blob_file);
/system/keymaster/include/keymaster/
H A Dkeymaster_tags.h230 const keymaster_blob_t& blob) {
231 return keymaster_param_blob(tag, blob.data, blob.data_length);
242 const keymaster_blob_t& blob) {
243 return keymaster_param_blob(tag, blob.data, blob.data_length);
229 Authorization(TypedTag<KM_BYTES, Tag> tag, const keymaster_blob_t& blob) argument
241 Authorization(TypedTag<KM_BIGNUM, Tag> tag, const keymaster_blob_t& blob) argument
H A Dandroid_keymaster_utils.h236 explicit KeymasterKeyBlob(const keymaster_key_blob_t& blob) { argument
238 key_material = dup_buffer(blob.key_material, blob.key_material_size);
240 key_material_size = blob.key_material_size;
243 KeymasterKeyBlob(const KeymasterKeyBlob& blob) { argument
245 key_material = dup_buffer(blob.key_material, blob.key_material_size);
247 key_material_size = blob.key_material_size;
250 void operator=(const KeymasterKeyBlob& blob) { argument
252 key_material = dup_buffer(blob
[all...]
H A Dauthorization_set.h406 * Append the tag and blob to the set. Copies the blob contents into internal storage; does not
407 * take ownership of the blob's data.
410 bool push_back(TypedTag<KM_BYTES, Tag> tag, const keymaster_blob_t& blob) { argument
411 return push_back(tag, blob.data, blob.data_length);
H A Dandroid_keymaster_messages.h297 void SetKeyMaterial(const keymaster_key_blob_t& blob) { argument
298 SetKeyMaterial(blob.key_material, blob.key_material_size);
328 void SetKeyMaterial(const keymaster_key_blob_t& blob) { argument
329 SetKeyMaterial(blob.key_material, blob.key_material_size);
451 void SetKeyMaterial(const keymaster_key_blob_t& blob) { argument
452 SetKeyMaterial(blob.key_material, blob.key_material_size);
473 void SetKeyMaterial(const keymaster_key_blob_t& blob) { argument
494 SetKeyMaterial(const keymaster_key_blob_t& blob) argument
513 SetKeyMaterial(const keymaster_key_blob_t& blob) argument
533 SetKeyMaterial(const keymaster_key_blob_t& blob) argument
597 SetKeyMaterial(const keymaster_key_blob_t& blob) argument
632 SetKeyMaterial(const keymaster_key_blob_t& blob) argument
[all...]
/system/keymaster/
H A Dkeymaster1_engine.h55 keymaster_error_t DeleteKey(const KeymasterKeyBlob& blob) const;
59 KeyData(const KeymasterKeyBlob& blob, const AuthorizationSet& params) argument
60 : op_handle(0), begin_params(params), key_material(blob), error(KM_ERROR_OK),
71 RSA* BuildRsaKey(const KeymasterKeyBlob& blob, const AuthorizationSet& additional_params,
73 EC_KEY* BuildEcKey(const KeymasterKeyBlob& blob, const AuthorizationSet& additional_params,
82 EVP_PKEY* GetKeymaster1PublicKey(const KeymasterKeyBlob& blob,
H A Dopenssl_utils.cpp65 void convert_bn_to_blob(BIGNUM* bn, keymaster_blob_t* blob) { argument
66 blob->data_length = BN_num_bytes(bn);
67 blob->data = new uint8_t[blob->data_length];
68 BN_bn2bin(bn, const_cast<uint8_t*>(blob->data));
H A Dasymmetric_key.cpp203 static keymaster_error_t get_certificate_blob(X509* certificate, keymaster_blob_t* blob) { argument
215 blob->data_length = len;
216 blob->data = data;
H A Dkey_blob_test.cpp103 // key_data shouldn't be anywhere in the blob, ciphertext should.
306 keymaster_key_blob_t blob = {buf.get() + i, kBufSize - i}; local
307 KeymasterKeyBlob key_blob(blob);
309 // Integrity-assured blob.
314 // Auth-encrypted OCB blob.
324 << "Somehow sucessfully parsed a blob with seed " << now << " at offset " << i;
330 keymaster_key_blob_t blob = {buf, 0}; local
331 KeymasterKeyBlob key_blob(blob);
346 keymaster_key_blob_t blob = {buf, 0}; local
347 blob
[all...]
H A Dkeymaster0_engine.cpp150 bool Keymaster0Engine::DeleteKey(const KeymasterKeyBlob& blob) const {
153 return (keymaster0_device_->delete_keypair(keymaster0_device_, blob.key_material,
154 blob.key_material_size) == 0);
176 inline keymaster_key_blob_t* duplicate_blob(const keymaster_key_blob_t& blob) { argument
177 return duplicate_blob(blob.key_material, blob.key_material_size);
180 RSA* Keymaster0Engine::BlobToRsaKey(const KeymasterKeyBlob& blob) const {
181 // Create new RSA key (with engine methods) and insert blob
186 keymaster_key_blob_t* blob_copy = duplicate_blob(blob);
191 unique_ptr<EVP_PKEY, EVP_PKEY_Delete> pkey(GetKeymaster0PublicKey(blob));
243 keymaster_key_blob_t* blob = reinterpret_cast<keymaster_key_blob_t*>(*from_d); local
255 keymaster_key_blob_t* blob = reinterpret_cast<keymaster_key_blob_t*>(ptr); local
278 Keymaster0Sign(const void* signing_params, const keymaster_key_blob_t& blob, const uint8_t* data, const size_t data_length, unique_ptr<uint8_t[], Malloc_Delete>* signature, size_t* signature_length) const argument
[all...]
H A Dkeymaster1_engine.cpp86 keymaster_key_blob_t blob; local
88 &blob, &characteristics);
91 unique_ptr<uint8_t, Malloc_Delete> blob_deleter(const_cast<uint8_t*>(blob.key_material));
92 key_blob->key_material = dup_buffer(blob.key_material, blob.key_material_size);
93 key_blob->key_material_size = blob.key_material_size;
110 keymaster_key_blob_t blob; local
113 &blob, &characteristics);
116 unique_ptr<uint8_t, Malloc_Delete> blob_deleter(const_cast<uint8_t*>(blob.key_material));
117 output_key_blob->key_material = dup_buffer(blob
136 BuildRsaKey(const KeymasterKeyBlob& blob, const AuthorizationSet& additional_params, keymaster_error_t* error) const argument
178 BuildEcKey(const KeymasterKeyBlob& blob, const AuthorizationSet& additional_params, keymaster_error_t* error) const argument
362 GetKeymaster1PublicKey(const KeymasterKeyBlob& blob, const AuthorizationSet& additional_params, keymaster_error_t* error) const argument
[all...]
H A Dkeymaster_enforcement_test.cpp864 keymaster_key_blob_t blob = {reinterpret_cast<const uint8_t*>("foobar"), 6}; local
867 EXPECT_TRUE(KeymasterEnforcement::CreateKeyId(blob, &key_id));
H A Dandroid_keymaster_test_utils.h99 std::string(reinterpret_cast<const char*>(set[pos].blob.data),
100 set[pos].blob.data_length) == val;
107 std::string(reinterpret_cast<const char*>(set[pos].blob.data),
108 set[pos].blob.data_length) == val;
349 static void munge_blob(uint8_t* blob, size_t blob_length) { argument
350 if (blob && blob_length > 0 && *blob == 'P')
351 *blob = 'Q'; // Mind your Ps and Qs!
354 // Copy and un-modfy the blob. The caller must clean up the return value.
355 static uint8_t* unmunge_blob(const uint8_t* blob, size_ argument
[all...]
H A Dsoft_keymaster_context.cpp452 KeymasterKeyBlob* blob,
465 return SerializeIntegrityAssuredBlob(key_material, hidden, *hw_enforced, *sw_enforced, blob);
481 // 1. Software key blob. Version info, if present, is in sw_enforced. If not present, we
484 // 2. Keymaster0 hardware key blob. Version info, if present, is in sw_enforced. If not
487 // 3. Keymaster1 hardware key blob. Version info is not present and we shouldn't have been
528 static keymaster_error_t ParseOcbAuthEncryptedBlob(const KeymasterKeyBlob& blob, argument
535 keymaster_error_t error = DeserializeAuthEncryptedBlob(blob, &encrypted_key_material,
552 const KeymasterKeyBlob& blob, KeymasterKeyBlob* key_material, AuthorizationSet* hw_enforced,
556 const uint8_t* p = blob.key_material;
557 const uint8_t* end = blob
449 CreateKeyBlob(const AuthorizationSet& key_description, const keymaster_key_origin_t origin, const KeymasterKeyBlob& key_material, KeymasterKeyBlob* blob, AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const argument
551 ParseOldSoftkeymasterBlob( const KeymasterKeyBlob& blob, KeymasterKeyBlob* key_material, AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const argument
623 ParseKeyBlob(const KeymasterKeyBlob& blob, const AuthorizationSet& additional_params, KeymasterKeyBlob* key_material, AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const argument
862 ParseKeymaster1HwBlob( const KeymasterKeyBlob& blob, const AuthorizationSet& additional_params, KeymasterKeyBlob* key_material, AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const argument
894 ParseKeymaster0HwBlob(const KeymasterKeyBlob& blob, KeymasterKeyBlob* key_material, AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const argument
[all...]
H A Dandroid_keymaster_test.cpp3329 // Load and use an old-style Keymaster1 software key blob. These blobs contain OCB-encrypted
3331 string km1_sw = read_file("km1_sw_rsa_512.blob");
3346 // Load and use an old-style Keymaster1 software key blob, without the version byte. These
3348 string km1_sw = read_file("km1_sw_rsa_512_unversioned.blob");
3363 // Load and use an old-style Keymaster1 software key blob. These blobs contain OCB-encrypted
3365 string km1_sw = read_file("km1_sw_ecdsa_256.blob");
3384 // Load and use an old softkeymaster blob. These blobs contain PKCS#8 key data.
3385 string km0_sw = read_file("km0_sw_rsa_512.blob");
3400 // Load and use an old softkeymaster blob. These blobs contain PKCS#8 key data.
3401 string km0_sw = read_file("km0_sw_rsa_512.blob");
3493 parse_cert_blob(const keymaster_blob_t& blob) argument
[all...]
/system/security/keystore/
H A Dblob.h29 /* Here is the file format. There are two parts in blob.value, the secret and
31 * can be found in blob.length. The description is stored after the secret in
32 * plaintext, and its size is specified in blob.info. The total size of the two
34 * the second is the blob's type, and the third byte is flags. Fields other
35 * than blob.info, blob.length, and blob.value are modified by encryptBlob()
52 struct __attribute__((packed)) blob { struct
82 Blob(blob b);
109 struct blob mBlo
[all...]
H A Dkeystore.cpp166 Blob blob; local
167 ResponseCode rc = get(filename, &blob, ::TYPE_ANY, userId);
169 /* get can fail if the blob is encrypted and the state is
175 shouldDelete = !(rc == ::NO_ERROR && !blob.isEncrypted());
246 * it must be read it again since the blob is encrypted each time
310 keymaster_key_blob_t blob = {keyBlob.getValue(), local
312 if (mDevice->delete_key(mDevice, &blob)) {
320 keymaster_key_blob_t blob; local
321 blob.key_material = keyBlob.getValue();
322 blob
463 keymaster_key_blob_t blob = {nullptr, 0}; local
600 upgradeBlob(const char* filename, Blob* blob, const uint8_t oldVersion, const BlobType type, uid_t uid) argument
643 importBlobAsKey(Blob* blob, const char* filename, uid_t uid) argument
[all...]
H A DIKeystoreService.cpp219 static bool readKeymasterBlob(const Parcel& in, keymaster_blob_t* blob) { argument
229 blob->data = reinterpret_cast<const uint8_t*>(malloc(length));
230 if (!blob->data)
237 blob->data_length = static_cast<size_t>(length);
238 memcpy(const_cast<uint8_t*>(blob->data), buf, length);
318 out->writeInt32(param.blob.data_length);
319 void* buf = out->writeInplace(param.blob.data_length);
321 memcpy(buf, param.blob.data, param.blob.data_length);
323 ALOGE("Failed to writeInplace keymaster blob para
[all...]
H A Dkey_store_service.cpp618 keymaster_key_blob_t blob; local
653 device->generate_key(device, &inParams, &blob, outCharacteristics ? &out : nullptr);
669 rc = fallback->generate_key(fallback, &inParams, &blob,
686 Blob keyBlob(blob.key_material, blob.key_material_size, NULL, 0, ::TYPE_KEYMASTER_10);
690 free(const_cast<uint8_t*>(blob.key_material));
776 keymaster_key_blob_t blob; local
802 rc = device->import_key(device, &inParams, format, &input, &blob,
808 rc = fallback->import_key(fallback, &inParams, format, &input, &blob,
823 Blob keyBlob(blob
1631 upgradeKeyBlob(const String16& name, uid_t uid, const AuthorizationSet& params, Blob* blob) argument
[all...]
/system/tpm/attestation/server/
H A Dpkcs11_key_store_test.cc316 std::string blob; local
317 EXPECT_FALSE(key_store.Read(kDefaultUser, "test", &blob));
318 EXPECT_FALSE(key_store.Write(kDefaultUser, "test", blob));
319 EXPECT_FALSE(key_store.Read("", "test", &blob));
320 EXPECT_FALSE(key_store.Write("", "test", blob));
327 std::string blob; local
328 EXPECT_FALSE(key_store.Read(kDefaultUser, "test", &blob));
330 EXPECT_TRUE(key_store.Read(kDefaultUser, "test", &blob));
331 EXPECT_EQ("test_data", blob);
333 EXPECT_FALSE(key_store.Read(kDefaultUser, "test2", &blob));
352 std::string blob; local
380 std::string blob; local
392 std::string blob; local
402 std::string blob; local
412 std::string blob; local
433 std::string blob; local
458 std::string blob; local
569 std::string blob; local
[all...]
/system/bt/service/
H A Dgatt_server_old.cpp86 std::vector<uint8_t> blob; member in struct:bluetooth::gatt::Characteristic
88 // Support synchronized blob updates by latching under mutex.
168 // Latch next_blob to blob on a 'fresh' read.
171 std::swap(ch.blob, ch.next_blob);
176 std::min(ch.blob.size(), ch.blob_section * kMaxGattAttributeSize);
177 const size_t blob_remaining = ch.blob.size() - blob_offset_octets;
191 std::copy(ch.blob.begin() + blob_offset_octets + attribute_offset_octets,
192 ch.blob.begin() + blob_offset_octets + attribute_size,
219 ch.blob.resize(attribute_offset + length);
221 std::copy(value, value + length, ch.blob
[all...]

Completed in 568 milliseconds