/system/keymaster/km_openssl/ |
D | ecies_kem.cpp | 77 return Encrypt(peer_public_value.peek_read(), peer_public_value.available_read(), in Encrypt() 106 z.Reinitialize(output_encrypted_key->peek_read(), output_encrypted_key->available_read()); in Encrypt() 109 Buffer actual_secret(z.available_read() + shared_secret.available_read()); in Encrypt() 110 actual_secret.write(z.peek_read(), z.available_read()); in Encrypt() 111 actual_secret.write(shared_secret.peek_read(), shared_secret.available_read()); in Encrypt() 113 if (!kdf_->Init(actual_secret.peek_read(), actual_secret.available_read(), nullptr /* salt */, in Encrypt() 130 return Decrypt(private_key, encrypted_key.peek_read(), encrypted_key.available_read(), in Decrypt() 161 z.Reinitialize(public_value.peek_read(), public_value.available_read()); in Decrypt() 164 Buffer actual_secret(z.available_read() + shared_secret.available_read()); in Decrypt() 165 actual_secret.write(z.peek_read(), z.available_read()); in Decrypt() [all …]
|
D | ecdsa_operation.cpp | 101 if (!data_.write(input.peek_read(), min(data_.available_write(), input.available_read()))) in StoreData() 104 *input_consumed = input.available_read(); in StoreData() 132 if (EVP_DigestSignUpdate(&digest_ctx_, input.peek_read(), input.available_read()) != 1) in Update() 134 *input_consumed = input.available_read(); in Update() 154 if (!ECDSA_sign(0 /* type -- ignored */, data_.peek_read(), data_.available_read(), in Finish() 208 data_.available_read())) { in Finish() 218 if ((data_.available_read() + input.available_read()) > MAX_ED25519_MSG_SIZE) { in StoreAllData() 221 if (!data_.reserve(input.available_read())) { in StoreAllData() 224 if (!data_.write(input.peek_read(), input.available_read())) { in StoreAllData() 228 *input_consumed = input.available_read(); in StoreAllData() [all …]
|
D | rsa_operation.cpp | 200 if (!data_.write(input.peek_read(), input.available_read())) { in StoreData() 202 input.available_read() + data_.available_read(), EVP_PKEY_size(rsa_key_)); in StoreData() 206 *input_consumed = input.available_read(); in StoreData() 299 if (EVP_DigestSignUpdate(&digest_ctx_, input.peek_read(), input.available_read()) != 1) in Update() 301 *input_consumed = input.available_read(); in Update() 320 assert(padded_len > src.available_read()); in zero_pad_left() 325 size_t padding_len = padded_len - src.available_read(); in zero_pad_left() 327 if (!src.read(dest->get() + padding_len, src.available_read())) return KM_ERROR_UNKNOWN_ERROR; in zero_pad_left() 344 if (data_.available_read() > key_len) { in SignUndigested() 346 } else if (data_.available_read() < key_len) { in SignUndigested() [all …]
|
D | hmac.cpp | 35 return Init(key.peek_read(), key.available_read()); in Init() 50 return Sign(data.peek_read(), data.available_read(), out_digest, digest_len); in Sign() 70 return Verify(data.peek_read(), data.available_read(), digest.peek_read(), in Verify() 71 digest.available_read()); in Verify()
|
D | block_cipher_operation.cpp | 177 if (!InternalUpdate(input.peek_read(), input.available_read(), output, &error)) return error; in Update() 178 *input_consumed = input.available_read(); in Update() 322 if (input.available_read()) { in HandleAad() 388 if (input.available_read() || !additional_params.empty()) { in UpdateForFinish() 392 if (input_consumed != input.available_read()) { in UpdateForFinish() 427 if (!output->reserve(input.available_read() + block_size_bytes() + tag_length_)) { in Finish() 476 *input_consumed = input.available_read(); in Update() 484 if (!InternalUpdate(input.peek_read(), input.available_read(), output, &error)) return error; in Update() 490 if (input.available_read() <= tag_buf_unused()) { in ProcessAllButTagLengthBytes() 491 BufferCandidateTagData(input.peek_read(), input.available_read()); in ProcessAllButTagLengthBytes() [all …]
|
D | hmac_operation.cpp | 159 if (!HMAC_Update(&ctx_, input.peek_read(), input.available_read())) in Update() 161 *input_consumed = input.available_read(); in Update() 186 size_t siglen = signature.available_read(); in Finish()
|
D | ecdh_operation.cpp | 52 EVP_PKEY* pkeyRaw = d2i_PUBKEY(nullptr, &encodedPublicKey, input.available_read()); in Finish() 95 EVP_PKEY* pkeyRaw = d2i_PUBKEY(nullptr, &encodedPublicKey, input.available_read()); in Finish()
|
D | nist_curve_key_exchange.cpp | 93 return CalculateSharedKey(peer_public_value.peek_read(), peer_public_value.available_read(), in CalculateSharedKey()
|
D | attestation_record.cpp | 935 cppbor::Bstr(std::pair(unique_id.begin(), unique_id.available_read()))); in build_eat_record() 980 hmac.Sign(input.peek_read(), input.available_read(), unique_id->peek_write(), in generate_unique_id() 1100 unique_id.available_read())) in build_attestation_record()
|
/system/keymaster/tests/ |
D | ecies_kem_test.cpp | 59 ASSERT_EQ(kKeyLen, output_clear_key.available_read()); in TEST() 60 ASSERT_EQ(peer_public_value.available_read(), output_encrypted_key.available_read()); in TEST() 65 ASSERT_EQ(kKeyLen, decrypted_clear_key.available_read()); in TEST() 67 output_clear_key.available_read())); in TEST()
|
D | nist_curve_key_exchange_test.cpp | 58 EXPECT_EQ(alice_shared.available_read(), bob_shared.available_read()); in TEST() 60 alice_shared.available_read())); in TEST() 204 EXPECT_EQ(shared_secret.size(), computed_shared_secret.available_read()); in TEST()
|
D | android_keymaster_messages_test.cpp | 405 EXPECT_EQ(3U, deserialized->input.available_read()); in TEST() 435 EXPECT_EQ(3U, deserialized->output.available_read()); in TEST() 481 EXPECT_EQ(3U, deserialized->signature.available_read()); in TEST() 507 EXPECT_EQ(msg.output.available_read(), deserialized->output.available_read()); in TEST() 509 msg.output.available_read())); in TEST() 784 EXPECT_EQ(3U, deserialized->random_data.available_read()); in TEST() 936 EXPECT_EQ(id.available_read(), len) << "On " << value; in check_id()
|
/system/keymaster/android_keymaster/ |
D | serializable.cpp | 79 memcpy(new_buffer, buffer_.get() + read_position_, available_read()); in reserve() 117 size_t Buffer::available_read() const { in available_read() function in keymaster::Buffer 135 if (available_read() < read_length) return false; in read() 160 return sizeof(uint32_t) + available_read(); in SerializedSize() 164 return append_size_and_data_to_buf(buf, end, peek_read(), available_read()); in Serialize()
|
D | operation.cpp | 151 if (!input_params.empty() || input.available_read()) { in UpdateForFinish() 158 assert(input_consumed == input.available_read()); in UpdateForFinish() 160 assert(output.available_read() == 0); in UpdateForFinish()
|
D | android_keymaster.cpp | 315 request.random_data.available_read()); in AddRngEntropy() 658 size_t input_num_bytes = request.input.available_read(); in UpdateOperation() 659 if (input_num_bytes + confirmation_verifier_buffer->available_read() > in UpdateOperation() 702 size_t input_num_bytes = request.input.available_read(); in FinishOperation() 703 if (input_num_bytes + confirmation_verifier_buffer->available_read() > in FinishOperation() 761 confirmation_verifier_buffer->available_read(), confirmation_token_blob.data); in FinishOperation()
|
/system/keymaster/legacy_support/ |
D | keymaster_passthrough_operation.cpp | 30 keymaster_blob_t in{input.peek_read(), input.available_read()}; in Finish() 67 keymaster_blob_t sig{signature.peek_read(), signature.available_read()}; in Finish() 99 keymaster_blob_t sig{signature.peek_read(), signature.available_read()}; in Finish() 100 keymaster_blob_t in{input.peek_read(), input.available_read()}; in Finish()
|
D | keymaster_passthrough_operation.h | 60 keymaster_blob_t in{input.peek_read(), input.available_read()}; in Update()
|
/system/keymaster/include/keymaster/km_openssl/ |
D | hkdf.h | 36 return Init(secret.peek_read(), secret.available_read(), salt.peek_read(), in Init() 37 salt.available_read()); in Init()
|
/system/keymaster/key_blob_utils/ |
D | auth_encrypted_key_blob.cpp | 109 if (!prk.advance_write(out_len) || !prk.available_read() || !info->available_read()) { in DeriveAesGcmKeyEncryptionKey() 116 prk.peek_read(), prk.available_read(), // in DeriveAesGcmKeyEncryptionKey() 117 info->peek_read(), info->available_read())) { in DeriveAesGcmKeyEncryptionKey() 281 if (retval.encrypted_key.nonce.available_read() != OCB_NONCE_LENGTH || in DeserializeAuthEncryptedBlob() 282 retval.encrypted_key.tag.available_read() != OCB_TAG_LENGTH) { in DeserializeAuthEncryptedBlob() 291 if (retval.encrypted_key.nonce.available_read() != kAesGcmNonceLength || in DeserializeAuthEncryptedBlob() 292 retval.encrypted_key.tag.available_read() != kAesGcmTagLength) { in DeserializeAuthEncryptedBlob()
|
D | ocb_utils.cpp | 119 if (nonce.available_read() != OCB_NONCE_LENGTH) return KM_ERROR_INVALID_ARGUMENT; in OcbEncryptKey() 151 if (nonce.available_read() != OCB_NONCE_LENGTH || tag.available_read() != OCB_TAG_LENGTH) in OcbDecryptKey()
|
/system/keymaster/include/keymaster/ |
D | serializable.h | 282 return Reinitialize(buffer.peek_read(), buffer.available_read()); in Reinitialize() 286 const uint8_t* end() const { return peek_read() + available_read(); } in end() 291 size_t available_read() const;
|
/system/core/trusty/keymaster/set_attestation_ids/ |
D | set_attestation_ids.cpp | 41 return std::string(reinterpret_cast<const char*>(buf.peek_read()), buf.available_read()); in buf2string()
|
/system/keymaster/ng/include/ |
D | KeyMintUtils.h | 98 vector<uint8_t> result(buf.peek_read(), buf.peek_read() + buf.available_read()); in kmBuffer2vector()
|
/system/keymaster/contexts/ |
D | soft_keymaster_device.cpp | 1238 output->data_length = response.output.available_read(); in update() 1243 } else if (response.output.available_read() > 0) { in update() 1310 output->data_length = response.output.available_read(); in finish() 1315 } else if (response.output.available_read() > 0) { in finish() 1458 output->data_length = response.output.available_read(); in finish() 1463 } else if (response.output.available_read() > 0) { in finish()
|
D | pure_soft_keymaster_context.cpp | 532 KeymasterKeyBlob key_material = {output.peek_read(), output.available_read()}; in UnwrapKey() 615 *wrapped_key_material = {plaintext.peek_read(), plaintext.available_read()}; in UnwrapKey()
|