Home
last modified time | relevance | path

Searched refs:available_read (Results 1 – 25 of 28) sorted by relevance

12

/system/keymaster/km_openssl/
Decies_kem.cpp77 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 …]
Drsa_operation.cpp164 if (!data_.write(input.peek_read(), input.available_read())) { in StoreData()
166 input.available_read() + data_.available_read(), EVP_PKEY_size(rsa_key_)); in StoreData()
170 *input_consumed = input.available_read(); in StoreData()
287 if (EVP_DigestSignUpdate(&digest_ctx_, input.peek_read(), input.available_read()) != 1) in Update()
289 *input_consumed = input.available_read(); in Update()
309 assert(padded_len > src.available_read()); in zero_pad_left()
315 size_t padding_len = padded_len - src.available_read(); in zero_pad_left()
317 if (!src.read(dest->get() + padding_len, src.available_read())) in zero_pad_left()
337 if (data_.available_read() > key_len) { in SignUndigested()
339 } else if (data_.available_read() < key_len) { in SignUndigested()
[all …]
Decdsa_operation.cpp96 if (!data_.write(input.peek_read(), min(data_.available_write(), input.available_read()))) in StoreData()
99 *input_consumed = input.available_read(); in StoreData()
130 if (EVP_DigestSignUpdate(&digest_ctx_, input.peek_read(), input.available_read()) != 1) in Update()
132 *input_consumed = input.available_read(); in Update()
155 if (!ECDSA_sign(0 /* type -- ignored */, data_.peek_read(), data_.available_read(), in Finish()
199 if (EVP_DigestVerifyUpdate(&digest_ctx_, input.peek_read(), input.available_read()) != 1) in Update()
201 *input_consumed = input.available_read(); in Update()
219 ECDSA_verify(0 /* type -- ignored */, data_.peek_read(), data_.available_read(), in Finish()
220 signature.peek_read(), signature.available_read(), ecdsa.get()); in Finish()
226 signature.available_read())) in Finish()
Dhmac.cpp35 return Init(key.peek_read(), key.available_read()); in Init()
51 return Sign(data.peek_read(), data.available_read(), out_digest, digest_len); in Sign()
73 return Verify(data.peek_read(), data.available_read(), digest.peek_read(), in Verify()
74 digest.available_read()); in Verify()
Dblock_cipher_operation.cpp174 if (!InternalUpdate(input.peek_read(), input.available_read(), output, &error)) return error; in Update()
175 *input_consumed = input.available_read(); in Update()
316 if (input.available_read()) { in HandleAad()
382 if (input.available_read() || !additional_params.empty()) { in UpdateForFinish()
386 if (input_consumed != input.available_read()) { in UpdateForFinish()
421 if (!output->reserve(input.available_read() + block_size_bytes() + tag_length_)) { in Finish()
470 *input_consumed = input.available_read(); in Update()
478 if (!InternalUpdate(input.peek_read(), input.available_read(), output, &error)) return error; in Update()
484 if (input.available_read() <= tag_buf_unused()) { in ProcessAllButTagLengthBytes()
485 BufferCandidateTagData(input.peek_read(), input.available_read()); in ProcessAllButTagLengthBytes()
[all …]
Dhmac_operation.cpp154 if (!HMAC_Update(&ctx_, input.peek_read(), input.available_read())) in Update()
156 *input_consumed = input.available_read(); in Update()
181 size_t siglen = signature.available_read(); in Finish()
Dnist_curve_key_exchange.cpp93 return CalculateSharedKey(peer_public_value.peek_read(), peer_public_value.available_read(), in CalculateSharedKey()
/system/keymaster/tests/
Decies_kem_test.cpp61 ASSERT_EQ(kKeyLen, output_clear_key.available_read()); in TEST()
62 ASSERT_EQ(peer_public_value.available_read(), output_encrypted_key.available_read()); in TEST()
67 ASSERT_EQ(kKeyLen, decrypted_clear_key.available_read()); in TEST()
69 output_clear_key.available_read())); in TEST()
Dnist_curve_key_exchange_test.cpp60 EXPECT_EQ(alice_shared.available_read(), bob_shared.available_read()); in TEST()
62 alice_shared.available_read())); in TEST()
204 EXPECT_EQ(shared_secret.size(), computed_shared_secret.available_read()); in TEST()
Dandroid_keymaster_messages_test.cpp280 EXPECT_EQ(3U, deserialized->input.available_read()); in TEST()
309 EXPECT_EQ(3U, deserialized->output.available_read()); in TEST()
353 EXPECT_EQ(3U, deserialized->signature.available_read()); in TEST()
378 EXPECT_EQ(msg.output.available_read(), deserialized->output.available_read()); in TEST()
380 msg.output.available_read())); in TEST()
538 EXPECT_EQ(3U, deserialized->random_data.available_read()); in TEST()
/system/keymaster/android_keymaster/
Dserializable.cpp76 memcpy(new_buffer, buffer_.get() + read_position_, available_read()); in reserve()
116 size_t Buffer::available_read() const { in available_read() function in keymaster::Buffer
131 if (available_read() < read_length) in read()
139 return sizeof(uint32_t) + available_read(); in SerializedSize()
143 return append_size_and_data_to_buf(buf, end, peek_read(), available_read()); in Serialize()
Doperation.cpp145 if (!input_params.empty() || input.available_read()) { in UpdateForFinish()
153 assert(input_consumed == input.available_read()); in UpdateForFinish()
155 assert(output.available_read() == 0); in UpdateForFinish()
Dandroid_keymaster.cpp213 request.random_data.available_read()); in AddRngEntropy()
/system/keymaster/legacy_support/
Dkeymaster_passthrough_operation.cpp31 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()
Dkeymaster_passthrough_operation.h60 keymaster_blob_t in{input.peek_read(), input.available_read()}; in Update()
/system/keymaster/include/keymaster/km_openssl/
Dhkdf.h36 return Init(secret.peek_read(), secret.available_read(), salt.peek_read(), in Init()
37 salt.available_read()); in Init()
/system/keymaster/key_blob_utils/
Docb_utils.cpp125 if (nonce.available_read() != OCB_NONCE_LENGTH) in OcbEncryptKey()
161 if (nonce.available_read() != OCB_NONCE_LENGTH || tag.available_read() != OCB_TAG_LENGTH) in OcbDecryptKey()
Dauth_encrypted_key_blob.cpp99 !nonce->Deserialize(buf_ptr, end) || nonce->available_read() != OCB_NONCE_LENGTH || in DeserializeAuthEncryptedBlob()
101 !tag->Deserialize(buf_ptr, end) || tag->available_read() != OCB_TAG_LENGTH || in DeserializeAuthEncryptedBlob()
Dsoftware_keyblobs.cpp255 if (nonce.available_read() != OCB_NONCE_LENGTH || tag.available_read() != OCB_TAG_LENGTH) in ParseOcbAuthEncryptedBlob()
/system/keymaster/include/keymaster/
Dserializable.h219 return Reinitialize(buffer.peek_read(), buffer.available_read()); in Reinitialize()
223 const uint8_t* end() const { return peek_read() + available_read(); } in end()
228 size_t available_read() const;
/system/core/trusty/keymaster/legacy/
Dtrusty_keymaster_device.cpp522 output->data_length = response.output.available_read(); in update()
527 } else if (response.output.available_read() > 0) { in update()
584 output->data_length = response.output.available_read(); in finish()
589 } else if (response.output.available_read() > 0) { in finish()
/system/keymaster/contexts/
Dpure_soft_keymaster_context.cpp319 KeymasterKeyBlob key_material = {output.peek_read(), output.available_read()}; in UnwrapKey()
401 *wrapped_key_material = {plaintext.peek_read(), plaintext.available_read()}; in UnwrapKey()
Dsoft_keymaster_device.cpp1341 output->data_length = response.output.available_read(); in update()
1347 } else if (response.output.available_read() > 0) { in update()
1417 output->data_length = response.output.available_read(); in finish()
1423 } else if (response.output.available_read() > 0) { in finish()
1575 output->data_length = response.output.available_read(); in finish()
1581 } else if (response.output.available_read() > 0) { in finish()
/system/core/trusty/keymaster/3.0/
DTrustyKeymaster3Device.cpp138 result.setToExternal(const_cast<unsigned char*>(buf.peek_read()), buf.available_read()); in kmBuffer2hidlVec()
/system/keymaster/ng/
DAndroidKeymaster3Device.cpp150 result.setToExternal(const_cast<unsigned char*>(buf.peek_read()), buf.available_read()); in kmBuffer2hidlVec()

12