/system/keymaster/ |
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 | rsa_operation.cpp | 165 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 …]
|
D | ecies_kem_test.cpp | 60 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()
|
D | ecdsa_operation.cpp | 102 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()
|
D | hmac.cpp | 35 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()
|
D | serializable.cpp | 76 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()
|
D | aes_operation.cpp | 202 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 …]
|
D | hkdf.h | 36 return Init(secret.peek_read(), secret.available_read(), salt.peek_read(), in Init() 37 salt.available_read()); in Init()
|
D | nist_curve_key_exchange_test.cpp | 60 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()
|
D | operation.cpp | 139 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()
|
D | hmac_operation.cpp | 153 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()
|
D | ocb_utils.cpp | 125 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()
|
D | auth_encrypted_key_blob.cpp | 99 !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()
|
D | android_keymaster_messages_test.cpp | 280 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()
|
D | nist_curve_key_exchange.cpp | 91 return CalculateSharedKey(peer_public_value.peek_read(), peer_public_value.available_read(), in CalculateSharedKey()
|
D | soft_keymaster_context.cpp | 525 if (nonce.available_read() != OCB_NONCE_LENGTH || tag.available_read() != OCB_TAG_LENGTH) in ParseOcbAuthEncryptedBlob()
|
D | soft_keymaster_device.cpp | 1303 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()
|
D | android_keymaster.cpp | 183 request.random_data.available_read()); in AddRngEntropy()
|
D | attestation_record.cpp | 516 unique_id.available_read())) in build_attestation_record()
|
/system/keymaster/include/keymaster/ |
D | serializable.h | 215 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;
|