/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() 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() 165 actual_secret.write(z.peek_read(), z.available_read()); in Decrypt() 166 actual_secret.write(shared_secret.peek_read(), shared_secret.available_read()); in Decrypt() 168 if (!kdf_->Init(actual_secret.peek_read(), actual_secret.available_read(), nullptr /* salt */, in Decrypt()
|
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()
|
D | ecdsa_operation.cpp | 96 if (!data_.write(input.peek_read(), min(data_.available_write(), input.available_read()))) in StoreData() 130 if (EVP_DigestSignUpdate(&digest_ctx_, input.peek_read(), input.available_read()) != 1) 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() 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() 225 } else if (!EVP_DigestVerifyFinal(&digest_ctx_, signature.peek_read(), in Finish()
|
D | rsa_operation.cpp | 164 if (!data_.write(input.peek_read(), input.available_read())) { in StoreData() 287 if (EVP_DigestSignUpdate(&digest_ctx_, input.peek_read(), input.available_read()) != 1) in Update() 335 const uint8_t* to_encrypt = data_.peek_read(); in SignUndigested() 356 bytes_encrypted = RSA_private_encrypt(data_.available_read(), data_.peek_read(), in SignUndigested() 410 if (EVP_DigestVerifyUpdate(&digest_ctx_, input.peek_read(), input.available_read()) != 1) in Update() 460 int bytes_decrypted = RSA_public_decrypt(signature.available_read(), signature.peek_read(), in VerifyUndigested() 477 if (memcmp_s(compare_pos, data_.peek_read(), bytes_to_compare) != 0 || zero_check_result != 0) in VerifyUndigested() 483 if (!EVP_DigestVerifyFinal(&digest_ctx_, signature.peek_read(), signature.available_read())) in VerifyDigested() 548 if (EVP_PKEY_encrypt(ctx.get(), nullptr /* out */, &outlen, data_.peek_read(), in Finish() 555 const uint8_t* to_encrypt = data_.peek_read(); in Finish() [all …]
|
D | hmac_operation.cpp | 154 if (!HMAC_Update(&ctx_, input.peek_read(), input.available_read())) in Update() 185 if (CRYPTO_memcmp(signature.peek_read(), digest, siglen) != 0) in Finish()
|
D | block_cipher_operation.cpp | 174 if (!InternalUpdate(input.peek_read(), input.available_read(), output, &error)) return error; in Update() 478 if (!InternalUpdate(input.peek_read(), input.available_read(), output, &error)) return error; in Update() 485 BufferCandidateTagData(input.peek_read(), input.available_read()); in ProcessAllButTagLengthBytes() 500 if (!InternalUpdate(input.peek_read(), to_process_from_input, output, &error)) return error; in ProcessAllButTagLengthBytes() 502 BufferCandidateTagData(input.peek_read() + to_process_from_input, in ProcessAllButTagLengthBytes()
|
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 | 492 !ASN1_OCTET_STRING_set(key_desc->unique_id, unique_id.peek_read(), in build_attestation_record()
|
/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()
|
/system/keymaster/tests/ |
D | ecies_kem_test.cpp | 68 EXPECT_EQ(0, memcmp(output_clear_key.peek_read(), decrypted_clear_key.peek_read(), in TEST()
|
D | nist_curve_key_exchange_test.cpp | 61 EXPECT_EQ(0, memcmp(alice_shared.peek_read(), bob_shared.peek_read(), in TEST() 205 EXPECT_EQ(0, memcmp(shared_secret.data(), computed_shared_secret.peek_read(), in TEST()
|
D | android_keymaster_messages_test.cpp | 281 EXPECT_EQ(0, memcmp(deserialized->input.peek_read(), "foo", 3)); in TEST() 310 EXPECT_EQ(0, memcmp(deserialized->output.peek_read(), "foo", 3)); in TEST() 354 EXPECT_EQ(0, memcmp(deserialized->signature.peek_read(), "bar", 3)); in TEST() 379 EXPECT_EQ(0, memcmp(msg.output.peek_read(), deserialized->output.peek_read(), in TEST() 539 EXPECT_EQ(0, memcmp("foo", deserialized->random_data.peek_read(), 3)); in TEST()
|
D | android_keymaster_test.cpp | 1904 *output = string(reinterpret_cast<const char*>(rsp.output.peek_read()), in FinishOperation()
|
/system/keymaster/include/keymaster/ |
D | serializable.h | 219 return Reinitialize(buffer.peek_read(), buffer.available_read()); in Reinitialize() 222 const uint8_t* begin() const { return peek_read(); } in begin() 223 const uint8_t* end() const { return peek_read() + available_read(); } in end() 233 const uint8_t* peek_read() const { return buffer_.get() + read_position_; } in peek_read() function
|
/system/keymaster/key_blob_utils/ |
D | ocb_utils.cpp | 140 int ae_err = ae_encrypt(ctx.get(), nonce.peek_read(), plaintext.key_material, in OcbEncryptKey() 176 int ae_err = ae_decrypt(ctx.get(), nonce.peek_read(), ciphertext.key_material, in OcbDecryptKey() 179 tag.peek_read(), 1 /* final */); in OcbDecryptKey()
|
/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() 402 if (!wrapped_key_material->key_material && plaintext.peek_read()) { in UnwrapKey()
|
D | soft_keymaster_device.cpp | 1345 memcpy(tmp, response.output.peek_read(), output->data_length); in update() 1421 memcpy(tmp, response.output.peek_read(), output->data_length); in finish() 1579 memcpy(tmp, response.output.peek_read(), output->data_length); in finish()
|
/system/keymaster/android_keymaster/ |
D | serializable.cpp | 143 return append_size_and_data_to_buf(buf, end, peek_read(), available_read()); in Serialize()
|
D | android_keymaster.cpp | 212 response->error = context_->AddRngEntropy(request.random_data.peek_read(), in AddRngEntropy()
|
/system/core/trusty/keymaster/legacy/ |
D | trusty_keymaster_device.cpp | 523 output->data = DuplicateBuffer(response.output.peek_read(), output->data_length); in update() 585 output->data = DuplicateBuffer(response.output.peek_read(), output->data_length); 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()
|
D | AndroidKeymaster4Device.cpp | 137 result.setToExternal(const_cast<unsigned char*>(buf.peek_read()), buf.available_read()); in kmBuffer2hidlVec()
|