Home
last modified time | relevance | path

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

12

/system/tpm/trunks/
Dhmac_authorization_delegate_test.cc38 TPM2B_NONCE nonce; in TEST() local
39 nonce.size = kAesKeySize; in TEST()
40 memset(nonce.buffer, 0, nonce.size); in TEST()
42 EXPECT_TRUE(delegate.InitSession(dummy_handle, nonce, nonce, std::string(), in TEST()
48 EXPECT_TRUE(delegate.InitSession(dummy_handle, nonce, nonce, dummy_salt, in TEST()
69 TPM2B_NONCE nonce; in TEST() local
70 nonce.size = kAesKeySize; in TEST()
72 ASSERT_TRUE(delegate.InitSession(dummy_handle, nonce, nonce, salt, in TEST()
79 ASSERT_TRUE(delegate.InitSession(dummy_handle, nonce, nonce, salt, in TEST()
87 delegate.caller_nonce_ = nonce; in TEST()
[all …]
Dsession_manager_test.cc113 TPM2B_NONCE nonce; in TEST_F() local
114 nonce.size = 20; in TEST_F()
118 .WillOnce(DoAll(SetArgPointee<8>(nonce), in TEST_F()
159 TPM2B_NONCE nonce; in TEST_F() local
160 nonce.size = 0; in TEST_F()
164 .WillOnce(DoAll(SetArgPointee<8>(nonce), in TEST_F()
Dpassword_authorization_delegate.cc41 auth.nonce.size = 0; in GetCommandAuthorization()
70 if (auth_response.nonce.size != 0) { in CheckResponseAuthorization()
Dhmac_authorization_delegate.cc69 auth.nonce = caller_nonce_; in GetCommandAuthorization()
129 if (auth_response.nonce.size < kNonceMinSize || in CheckResponseAuthorization()
130 auth_response.nonce.size > kNonceMaxSize) { in CheckResponseAuthorization()
134 tpm_nonce_ = auth_response.nonce; in CheckResponseAuthorization()
Dresource_manager.cc554 TPM2B_NONCE nonce; in ParseCommand() local
555 result = Parse_TPM2B_NONCE(&buffer, &nonce, nullptr); in ParseCommand()
628 TPM2B_NONCE nonce; in ParseResponse() local
629 result = Parse_TPM2B_NONCE(&buffer, &nonce, nullptr); in ParseResponse()
/system/keymaster/
Dauth_encrypted_key_blob.cpp33 const Buffer& nonce, const Buffer& tag, in SerializeAuthEncryptedBlob() argument
35 size_t size = 1 /* version byte */ + nonce.SerializedSize() + in SerializeAuthEncryptedBlob()
46 buf = nonce.Serialize(buf, end); in SerializeAuthEncryptedBlob()
60 AuthorizationSet* sw_enforced, Buffer* nonce, in DeserializeUnversionedBlob() argument
66 if (!nonce->reserve(OCB_NONCE_LENGTH) || !tag->reserve(OCB_TAG_LENGTH)) in DeserializeUnversionedBlob()
69 if (!copy_from_buf(buf_ptr, end, nonce->peek_write(), OCB_NONCE_LENGTH) || in DeserializeUnversionedBlob()
77 if (!nonce->advance_write(OCB_NONCE_LENGTH) || !tag->advance_write(OCB_TAG_LENGTH)) in DeserializeUnversionedBlob()
85 AuthorizationSet* sw_enforced, Buffer* nonce, in DeserializeAuthEncryptedBlob() argument
99 !nonce->Deserialize(buf_ptr, end) || nonce->available_read() != OCB_NONCE_LENGTH || in DeserializeAuthEncryptedBlob()
132 sw_enforced, nonce, tag); in DeserializeAuthEncryptedBlob()
Docb_utils.cpp121 const KeymasterKeyBlob& plaintext, const Buffer& nonce, in OcbEncryptKey() argument
125 if (nonce.available_read() != OCB_NONCE_LENGTH) in OcbEncryptKey()
140 int ae_err = ae_encrypt(ctx.get(), nonce.peek_read(), plaintext.key_material, in OcbEncryptKey()
157 const KeymasterKeyBlob& ciphertext, const Buffer& nonce, in OcbDecryptKey() argument
161 if (nonce.available_read() != OCB_NONCE_LENGTH || tag.available_read() != OCB_TAG_LENGTH) in OcbDecryptKey()
176 int ae_err = ae_decrypt(ctx.get(), nonce.peek_read(), ciphertext.key_material, in OcbDecryptKey()
Dauth_encrypted_key_blob.h31 const Buffer& nonce, const Buffer& tag,
37 AuthorizationSet* sw_enforced, Buffer* nonce,
Docb_utils.h37 const KeymasterKeyBlob& plaintext, const Buffer& nonce,
43 const KeymasterKeyBlob& ciphertext, const Buffer& nonce,
Dae.h94 int ae_encrypt(ae_ctx* ctx, const void* nonce, const void* pt, int pt_len, const void* ad,
124 int ae_decrypt(ae_ctx* ctx, const void* nonce, const void* ct, int ct_len, const void* ad,
Docb.c747 static block gen_offset_from_nonce(ae_ctx* ctx, const void* nonce) { in gen_offset_from_nonce() argument
771 tmp.u32[1] = ((uint32_t*)nonce)[0]; in gen_offset_from_nonce()
772 tmp.u32[2] = ((uint32_t*)nonce)[1]; in gen_offset_from_nonce()
773 tmp.u32[3] = ((uint32_t*)nonce)[2]; in gen_offset_from_nonce()
917 int ae_encrypt(ae_ctx* ctx, const void* nonce, const void* pt, int pt_len, const void* ad, in ae_encrypt() argument
930 if (nonce) { in ae_encrypt()
931 ctx->offset = gen_offset_from_nonce(ctx, nonce); in ae_encrypt()
1128 int ae_decrypt(ae_ctx* ctx, const void* nonce, const void* ct, int ct_len, const void* ad, in ae_decrypt() argument
1149 if (nonce) { in ae_decrypt()
1150 ctx->offset = gen_offset_from_nonce(ctx, nonce); in ae_decrypt()
[all …]
Dandroid_keymaster_test_utils.cpp574 keymaster_padding_t padding, const string& nonce) { in DecryptMessage() argument
579 begin_params.push_back(TAG_NONCE, nonce.data(), nonce.size()); in DecryptMessage()
585 keymaster_padding_t padding, const string& nonce) { in DecryptMessage() argument
590 begin_params.push_back(TAG_NONCE, nonce.data(), nonce.size()); in DecryptMessage()
597 keymaster_padding_t padding, const string& nonce) { in DecryptMessage() argument
602 begin_params.push_back(TAG_NONCE, nonce.data(), nonce.size()); in DecryptMessage()
637 void Keymaster2Test::CheckAesCtrTestVector(const string& key, const string& nonce, in CheckAesCtrTestVector() argument
648 begin_params.push_back(TAG_NONCE, nonce.data(), nonce.size()); in CheckAesCtrTestVector()
Dandroid_keymaster_test_utils.h267 keymaster_padding_t padding, const std::string& nonce);
269 keymaster_padding_t padding, const std::string& nonce);
272 const std::string& nonce);
275 const std::string& nonce);
279 void CheckAesOcbTestVector(const std::string& key, const std::string& nonce,
282 void CheckAesCtrTestVector(const std::string& key, const std::string& nonce,
Dsoft_keymaster_context.cpp518 Buffer nonce, tag; in ParseOcbAuthEncryptedBlob() local
521 hw_enforced, sw_enforced, &nonce, &tag); in ParseOcbAuthEncryptedBlob()
525 if (nonce.available_read() != OCB_NONCE_LENGTH || tag.available_read() != OCB_TAG_LENGTH) in ParseOcbAuthEncryptedBlob()
529 nonce, tag, key_material); in ParseOcbAuthEncryptedBlob()
/system/connectivity/shill/
Dmock_crypto_util_proxy.cc49 const std::string& nonce, in RealVerifyDestination() argument
57 nonce, signed_data, in RealVerifyDestination()
Dmock_crypto_util_proxy.h43 const std::string& nonce,
57 const std::string& nonce,
Dcrypto_util_proxy.h66 const std::string& nonce,
Dcrypto_util_proxy.cc79 const string& nonce, in VerifyDestination() argument
93 nonce.c_str())); in VerifyDestination()
Dmanager.h463 const std::string& nonce,
478 const std::string& nonce,
493 const std::string& nonce,
/system/vold/
DKeyStorage.cpp152 std::string nonce(reinterpret_cast<const char*>(nonceBlob.data), nonceBlob.data_length); in encryptWithKeymasterKey()
153 if (!checkSize("nonce", nonce.size(), GCM_NONCE_BYTES)) return false; in encryptWithKeymasterKey()
160 *ciphertext = nonce + body + mac; in encryptWithKeymasterKey()
167 auto nonce = ciphertext.substr(0, GCM_NONCE_BYTES); in decryptWithKeymasterKey() local
169 auto params = addStringParam(beginParams(auth, appId), keymaster::TAG_NONCE, nonce).build(); in decryptWithKeymasterKey()
/system/connectivity/shill/dbus/
Dchromeos_manager_dbus_adaptor.cc421 const string& nonce, in VerifyDestination() argument
430 manager_->VerifyDestination(certificate, public_key, nonce, in VerifyDestination()
449 const string& nonce, in VerifyAndEncryptCredentials() argument
460 manager_->VerifyAndEncryptCredentials(certificate, public_key, nonce, in VerifyAndEncryptCredentials()
481 const string& nonce, in VerifyAndEncryptData() argument
492 manager_->VerifyAndEncryptData(certificate, public_key, nonce, in VerifyAndEncryptData()
Dchromeos_manager_dbus_adaptor.h135 const std::string& nonce,
143 const std::string& nonce,
152 const std::string& nonce,
/system/tpm/attestation/common/
Dattestation_ca.proto142 optional bytes nonce = 2; field
157 // A 256-bit random value generated by the client. Mixing in this nonce
159 optional bytes nonce = 2; field
/system/tpm/attestation/server/
Dattestation_service.cc734 std::string nonce; in CreateKey() local
735 if (!crypto_utility_->GetRandom(kNonceSize, &nonce)) { in CreateKey()
749 nonce, in CreateKey()
/system/extras/tests/net_test/
Dmultinetwork_test.py273 nonce = "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c"
278 nonce
298 optdata=nonce)]) /

12