Home
last modified time | relevance | path

Searched refs:peek_read (Results 1 – 25 of 25) sorted by relevance

/system/keymaster/km_openssl/
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()
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()
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()
Decdsa_operation.cpp98 if (!data_.write(input.peek_read(), min(data_.available_write(), input.available_read()))) in StoreData()
132 if (EVP_DigestSignUpdate(&digest_ctx_, input.peek_read(), input.available_read()) != 1) 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()
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()
227 } else if (!EVP_DigestVerifyFinal(&digest_ctx_, signature.peek_read(), in Finish()
Drsa_operation.cpp167 if (!data_.write(input.peek_read(), input.available_read())) { in StoreData()
290 if (EVP_DigestSignUpdate(&digest_ctx_, input.peek_read(), input.available_read()) != 1) in Update()
338 const uint8_t* to_encrypt = data_.peek_read(); in SignUndigested()
359 bytes_encrypted = RSA_private_encrypt(data_.available_read(), data_.peek_read(), in SignUndigested()
413 if (EVP_DigestVerifyUpdate(&digest_ctx_, input.peek_read(), input.available_read()) != 1) in Update()
463 int bytes_decrypted = RSA_public_decrypt(signature.available_read(), signature.peek_read(), in VerifyUndigested()
480 if (memcmp_s(compare_pos, data_.peek_read(), bytes_to_compare) != 0 || zero_check_result != 0) in VerifyUndigested()
486 if (!EVP_DigestVerifyFinal(&digest_ctx_, signature.peek_read(), signature.available_read())) in VerifyDigested()
551 if (EVP_PKEY_encrypt(ctx.get(), nullptr /* out */, &outlen, data_.peek_read(), in Finish()
558 const uint8_t* to_encrypt = data_.peek_read(); in Finish()
[all …]
Dhmac_operation.cpp154 if (!HMAC_Update(&ctx_, input.peek_read(), input.available_read())) in Update()
185 if (CRYPTO_memcmp(signature.peek_read(), digest, siglen) != 0) in Finish()
Dblock_cipher_operation.cpp174 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()
Dnist_curve_key_exchange.cpp93 return CalculateSharedKey(peer_public_value.peek_read(), peer_public_value.available_read(), in CalculateSharedKey()
Dattestation_record.cpp499 !ASN1_OCTET_STRING_set(key_desc->unique_id, unique_id.peek_read(), in build_attestation_record()
/system/keymaster/legacy_support/
Dkeymaster_passthrough_operation.cpp31 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()
Dkeymaster_passthrough_operation.h60 keymaster_blob_t in{input.peek_read(), input.available_read()}; in Update()
/system/keymaster/include/keymaster/km_openssl/
Dhkdf.h36 return Init(secret.peek_read(), secret.available_read(), salt.peek_read(), in Init()
/system/keymaster/tests/
Decies_kem_test.cpp68 EXPECT_EQ(0, memcmp(output_clear_key.peek_read(), decrypted_clear_key.peek_read(), in TEST()
Dnist_curve_key_exchange_test.cpp61 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()
Dandroid_keymaster_messages_test.cpp281 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()
Dandroid_keymaster_test.cpp1904 *output = string(reinterpret_cast<const char*>(rsp.output.peek_read()), in FinishOperation()
/system/keymaster/include/keymaster/
Dserializable.h219 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/
Docb_utils.cpp139 int ae_err = ae_encrypt(ctx.get(), nonce.peek_read(), plaintext.key_material, in OcbEncryptKey()
175 int ae_err = ae_decrypt(ctx.get(), nonce.peek_read(), ciphertext.key_material, in OcbDecryptKey()
178 tag.peek_read(), 1 /* final */); in OcbDecryptKey()
/system/keymaster/contexts/
Dpure_soft_keymaster_context.cpp357 KeymasterKeyBlob key_material = {output.peek_read(), output.available_read()}; in UnwrapKey()
439 *wrapped_key_material = {plaintext.peek_read(), plaintext.available_read()}; in UnwrapKey()
440 if (!wrapped_key_material->key_material && plaintext.peek_read()) { in UnwrapKey()
Dsoft_keymaster_device.cpp1345 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/
Dserializable.cpp151 return append_size_and_data_to_buf(buf, end, peek_read(), available_read()); in Serialize()
Dandroid_keymaster.cpp212 response->error = context_->AddRngEntropy(request.random_data.peek_read(), in AddRngEntropy()
/system/core/trusty/keymaster/3.0/
DTrustyKeymaster3Device.cpp138 result.setToExternal(const_cast<unsigned char*>(buf.peek_read()), buf.available_read()); in kmBuffer2hidlVec()
/system/keymaster/ng/
DAndroidKeymaster3Device.cpp150 result.setToExternal(const_cast<unsigned char*>(buf.peek_read()), buf.available_read()); in kmBuffer2hidlVec()
DAndroidKeymaster4Device.cpp102 result.setToExternal(const_cast<unsigned char*>(buf.peek_read()), buf.available_read()); in kmBuffer2hidlVec()
/system/core/trusty/keymaster/4.0/
DTrustyKeymaster4Device.cpp190 result.setToExternal(const_cast<unsigned char*>(buf.peek_read()), buf.available_read()); in kmBuffer2hidlVec()