Home
last modified time | relevance | path

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

/system/keymaster/
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.cpp165 if (!data_.write(input.peek_read(), input.available_read())) { in StoreData()
167 input.available_read() + data_.available_read(), EVP_PKEY_size(rsa_key_)); in StoreData()
171 *input_consumed = input.available_read(); in StoreData()
286 if (EVP_DigestSignUpdate(&digest_ctx_, input.peek_read(), input.available_read()) != 1) in Update()
288 *input_consumed = input.available_read(); in Update()
308 assert(padded_len > src.available_read()); in zero_pad_left()
314 size_t padding_len = padded_len - src.available_read(); in zero_pad_left()
316 if (!src.read(dest->get() + padding_len, src.available_read())) in zero_pad_left()
336 if (data_.available_read() > key_len) { in SignUndigested()
338 } else if (data_.available_read() < key_len) { in SignUndigested()
[all …]
Decies_kem_test.cpp60 ASSERT_EQ(kKeyLen, output_clear_key.available_read()); in TEST()
61 ASSERT_EQ(peer_public_value.available_read(), output_encrypted_key.available_read()); in TEST()
66 ASSERT_EQ(kKeyLen, decrypted_clear_key.available_read()); in TEST()
68 output_clear_key.available_read())); in TEST()
Decdsa_operation.cpp102 if (!data_.write(input.peek_read(), min(data_.available_write(), input.available_read()))) in StoreData()
105 *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()
157 if (!ECDSA_sign(0 /* type -- ignored */, data_.peek_read(), data_.available_read(), in Finish()
197 if (EVP_DigestVerifyUpdate(&digest_ctx_, input.peek_read(), input.available_read()) != 1) in Update()
199 *input_consumed = input.available_read(); in Update()
217 ECDSA_verify(0 /* type -- ignored */, data_.peek_read(), data_.available_read(), in Finish()
218 signature.peek_read(), signature.available_read(), ecdsa.get()); in Finish()
224 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()
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()
Daes_operation.cpp202 if (!InternalUpdate(input.peek_read(), input.available_read(), output, &error)) in Update()
204 *input_consumed = input.available_read(); in Update()
405 if (input.available_read()) { in HandleAad()
471 if (input.available_read() || !additional_params.empty()) { in UpdateForFinish()
476 if (input_consumed != input.available_read()) { in UpdateForFinish()
511 if (!output->reserve(input.available_read() + AES_BLOCK_SIZE + tag_length_)) in Finish()
568 *input_consumed = input.available_read(); in Update()
577 if (!InternalUpdate(input.peek_read(), input.available_read(), output, &error)) in Update()
584 if (input.available_read() <= tag_buf_unused()) { in ProcessAllButTagLengthBytes()
585 BufferCandidateTagData(input.peek_read(), input.available_read()); in ProcessAllButTagLengthBytes()
[all …]
Dhkdf.h36 return Init(secret.peek_read(), secret.available_read(), salt.peek_read(), in Init()
37 salt.available_read()); in Init()
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()
Doperation.cpp139 if (!input_params.empty() || input.available_read()) { in UpdateForFinish()
147 assert(input_consumed == input.available_read()); in UpdateForFinish()
149 assert(output.available_read() == 0); in UpdateForFinish()
Dhmac_operation.cpp153 if (!HMAC_Update(&ctx_, input.peek_read(), input.available_read())) in Update()
155 *input_consumed = input.available_read(); in Update()
183 size_t siglen = signature.available_read(); in Finish()
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()
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()
519 EXPECT_EQ(3U, deserialized->random_data.available_read()); in TEST()
Dnist_curve_key_exchange.cpp91 return CalculateSharedKey(peer_public_value.peek_read(), peer_public_value.available_read(), in CalculateSharedKey()
Dsoft_keymaster_context.cpp525 if (nonce.available_read() != OCB_NONCE_LENGTH || tag.available_read() != OCB_TAG_LENGTH) in ParseOcbAuthEncryptedBlob()
Dsoft_keymaster_device.cpp1303 output->data_length = response.output.available_read(); in update()
1309 } else if (response.output.available_read() > 0) { in update()
1376 output->data_length = response.output.available_read(); in finish()
1382 } else if (response.output.available_read() > 0) { in finish()
Dandroid_keymaster.cpp183 request.random_data.available_read()); in AddRngEntropy()
Dattestation_record.cpp516 unique_id.available_read())) in build_attestation_record()
/system/keymaster/include/keymaster/
Dserializable.h215 return Reinitialize(buffer.peek_read(), buffer.available_read()); in Reinitialize()
219 const uint8_t* end() const { return peek_read() + available_read(); } in end()
224 size_t available_read() const;