/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 | 164 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 …]
|
D | ecdsa_operation.cpp | 96 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()
|
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()
|
/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 | 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 | operation.cpp | 145 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()
|
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 | 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 | 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/core/trusty/keymaster/legacy/ |
D | trusty_keymaster_device.cpp | 522 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/ |
D | pure_soft_keymaster_context.cpp | 319 KeymasterKeyBlob key_material = {output.peek_read(), output.available_read()}; in UnwrapKey() 401 *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()
|