/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 | rsa_operation.cpp | 167 if (!data_.write(input.peek_read(), input.available_read())) { in StoreData() 169 input.available_read() + data_.available_read(), EVP_PKEY_size(rsa_key_)); in StoreData() 173 *input_consumed = input.available_read(); in StoreData() 290 if (EVP_DigestSignUpdate(&digest_ctx_, input.peek_read(), input.available_read()) != 1) in Update() 292 *input_consumed = input.available_read(); in Update() 312 assert(padded_len > src.available_read()); in zero_pad_left() 318 size_t padding_len = padded_len - src.available_read(); in zero_pad_left() 320 if (!src.read(dest->get() + padding_len, src.available_read())) in zero_pad_left() 340 if (data_.available_read() > key_len) { in SignUndigested() 342 } else if (data_.available_read() < key_len) { in SignUndigested() [all …]
|
D | ecdsa_operation.cpp | 98 if (!data_.write(input.peek_read(), min(data_.available_write(), input.available_read()))) in StoreData() 101 *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() 201 if (EVP_DigestVerifyUpdate(&digest_ctx_, input.peek_read(), input.available_read()) != 1) in Update() 203 *input_consumed = input.available_read(); in Update() 221 ECDSA_verify(0 /* type -- ignored */, data_.peek_read(), data_.available_read(), in Finish() 222 signature.peek_read(), signature.available_read(), ecdsa.get()); in Finish() 228 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 | block_cipher_operation.cpp | 174 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 …]
|
D | hmac_operation.cpp | 154 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()
|
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 | 500 unique_id.available_read())) in build_attestation_record()
|
/system/keymaster/tests/ |
D | ecies_kem_test.cpp | 61 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()
|
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 | 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() 538 EXPECT_EQ(3U, deserialized->random_data.available_read()); in TEST()
|
/system/keymaster/android_keymaster/ |
D | serializable.cpp | 84 memcpy(new_buffer, buffer_.get() + read_position_, available_read()); in reserve() 124 size_t Buffer::available_read() const { in available_read() function in keymaster::Buffer 139 if (available_read() < read_length) in read() 147 return sizeof(uint32_t) + available_read(); in SerializedSize() 151 return append_size_and_data_to_buf(buf, end, peek_read(), available_read()); in Serialize()
|
D | operation.cpp | 154 if (!input_params.empty() || input.available_read()) { in UpdateForFinish() 162 assert(input_consumed == input.available_read()); in UpdateForFinish() 164 assert(output.available_read() == 0); in UpdateForFinish()
|
D | android_keymaster.cpp | 213 request.random_data.available_read()); in AddRngEntropy()
|
/system/keymaster/legacy_support/ |
D | keymaster_passthrough_operation.cpp | 31 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 | ocb_utils.cpp | 124 if (nonce.available_read() != OCB_NONCE_LENGTH) in OcbEncryptKey() 160 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 | software_keyblobs.cpp | 255 if (nonce.available_read() != OCB_NONCE_LENGTH || tag.available_read() != OCB_TAG_LENGTH) in ParseOcbAuthEncryptedBlob()
|
/system/keymaster/include/keymaster/ |
D | serializable.h | 219 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/keymaster/contexts/ |
D | pure_soft_keymaster_context.cpp | 357 KeymasterKeyBlob key_material = {output.peek_read(), output.available_read()}; in UnwrapKey() 439 *wrapped_key_material = {plaintext.peek_read(), plaintext.available_read()}; in UnwrapKey()
|
D | soft_keymaster_device.cpp | 1341 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/ |
D | TrustyKeymaster3Device.cpp | 138 result.setToExternal(const_cast<unsigned char*>(buf.peek_read()), buf.available_read()); in kmBuffer2hidlVec()
|
/system/keymaster/ng/ |
D | AndroidKeymaster3Device.cpp | 150 result.setToExternal(const_cast<unsigned char*>(buf.peek_read()), buf.available_read()); in kmBuffer2hidlVec()
|