Searched defs:nonce (Results 1 - 16 of 16) sorted by path

/system/iot/attestation/atap/libatap/
H A Datap_commands.c32 uint8_t nonce[ATAP_NONCE_LEN]; local
37 /* deriving nonce uses same HKDF as deriving session key */
43 nonce,
49 ops, nonce, ATAP_NONCE_LEN, *signature, signature_len);
/system/iot/attestation/atap/ops/
H A Datap_ops_provider.cpp92 const uint8_t* nonce,
98 ->auth_key_sign(nonce, nonce_len, sig, sig_len);
91 forward_auth_key_sign(AtapOps* ops, const uint8_t* nonce, uint32_t nonce_len, uint8_t sig[ATAP_SIGNATURE_LEN_MAX], uint32_t* sig_len) argument
/system/iot/attestation/atap/test/
H A Dfake_atap_ops.cpp72 AtapResult FakeAtapOps::auth_key_sign(const uint8_t* nonce, argument
/system/keymaster/include/keymaster/
H A Dandroid_keymaster_messages.h691 HmacSharingParameters() : seed({}) { memset(nonce, 0, sizeof(nonce)); }
694 memcpy(nonce, other.nonce, sizeof(nonce));
704 uint8_t nonce[32]; member in struct:keymaster::HmacSharingParameters
/system/keymaster/key_blob_utils/
H A Dauth_encrypted_key_blob.cpp33 const Buffer& nonce, const Buffer& tag,
35 size_t size = 1 /* version byte */ + nonce.SerializedSize() +
46 buf = nonce.Serialize(buf, end);
60 AuthorizationSet* sw_enforced, Buffer* nonce,
66 if (!nonce->reserve(OCB_NONCE_LENGTH) || !tag->reserve(OCB_TAG_LENGTH))
69 if (!copy_from_buf(buf_ptr, end, nonce->peek_write(), OCB_NONCE_LENGTH) ||
77 if (!nonce->advance_write(OCB_NONCE_LENGTH) || !tag->advance_write(OCB_TAG_LENGTH))
85 AuthorizationSet* sw_enforced, Buffer* nonce,
99 !nonce->Deserialize(buf_ptr, end) || nonce
29 SerializeAuthEncryptedBlob(const KeymasterKeyBlob& encrypted_key_material, const AuthorizationSet& hw_enforced, const AuthorizationSet& sw_enforced, const Buffer& nonce, const Buffer& tag, KeymasterKeyBlob* key_blob) argument
57 DeserializeUnversionedBlob(const KeymasterKeyBlob& key_blob, KeymasterKeyBlob* encrypted_key_material, AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced, Buffer* nonce, Buffer* tag) argument
82 DeserializeAuthEncryptedBlob(const KeymasterKeyBlob& key_blob, KeymasterKeyBlob* encrypted_key_material, AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced, Buffer* nonce, Buffer* tag) argument
[all...]
H A Docb.c748 static block gen_offset_from_nonce(ae_ctx* ctx, const void* nonce) { argument
760 /* Replace cached nonce Top if needed */
772 tmp.u32[1] = ((uint32_t*)nonce)[0];
773 tmp.u32[2] = ((uint32_t*)nonce)[1];
774 tmp.u32[3] = ((uint32_t*)nonce)[2];
775 idx = (unsigned)(tmp.u8[15] & 0x3f); /* Get low 6 bits of nonce */
776 tmp.u8[15] = tmp.u8[15] & 0xc0; /* Zero low 6 bits of nonce */
918 int ae_encrypt(ae_ctx* ctx, const void* nonce, const void* pt, int pt_len, const void* ad, argument
930 /* Non-null nonce means start of new message, init per-message values */
931 if (nonce) {
1129 ae_decrypt(ae_ctx* ctx, const void* nonce, const void* ct, int ct_len, const void* ad, int ad_len, void* pt, const void* tag, int final) argument
[all...]
H A Docb_utils.cpp121 const KeymasterKeyBlob& plaintext, const Buffer& nonce,
125 if (nonce.available_read() != OCB_NONCE_LENGTH)
140 int ae_err = ae_encrypt(ctx.get(), nonce.peek_read(), plaintext.key_material,
157 const KeymasterKeyBlob& ciphertext, const Buffer& nonce,
161 if (nonce.available_read() != OCB_NONCE_LENGTH || tag.available_read() != OCB_TAG_LENGTH)
176 int ae_err = ae_decrypt(ctx.get(), nonce.peek_read(), ciphertext.key_material,
118 OcbEncryptKey(const AuthorizationSet& hw_enforced, const AuthorizationSet& sw_enforced, const AuthorizationSet& hidden, const KeymasterKeyBlob& master_key, const KeymasterKeyBlob& plaintext, const Buffer& nonce, KeymasterKeyBlob* ciphertext, Buffer* tag) argument
154 OcbDecryptKey(const AuthorizationSet& hw_enforced, const AuthorizationSet& sw_enforced, const AuthorizationSet& hidden, const KeymasterKeyBlob& master_key, const KeymasterKeyBlob& ciphertext, const Buffer& nonce, const Buffer& tag, KeymasterKeyBlob* plaintext) argument
H A Dsoftware_keyblobs.cpp248 Buffer nonce, tag; local
251 hw_enforced, sw_enforced, &nonce, &tag);
255 if (nonce.available_read() != OCB_NONCE_LENGTH || tag.available_read() != OCB_TAG_LENGTH)
259 nonce, tag, key_material);
/system/keymaster/tests/
H A Dandroid_keymaster_test.cpp2681 const char* nonce; member in struct:keymaster::test::AesCtrSp80038aTestVector
2720 const string nonce = hex2str(test.nonce); local
2723 CheckAesCtrTestVector(key, nonce, plaintext, ciphertext);
2791 // Don't specify nonce, should get a random one.
2799 // Now specify a nonce, should also work.
2809 // Decrypt with correct nonce.
2814 // Now try with wrong nonce.
2834 // Don't specify nonce, should get a random one.
2842 // Now specify a nonce, shoul
3024 uint8_t nonce[] = { local
[all...]
H A Dandroid_keymaster_test_utils.cpp569 keymaster_padding_t padding, const string& nonce) {
574 begin_params.push_back(TAG_NONCE, nonce.data(), nonce.size());
580 keymaster_padding_t padding, const string& nonce) {
585 begin_params.push_back(TAG_NONCE, nonce.data(), nonce.size());
592 keymaster_padding_t padding, const string& nonce) {
597 begin_params.push_back(TAG_NONCE, nonce.data(), nonce.size());
640 void Keymaster2Test::CheckAesCtrTestVector(const string& key, const string& nonce, argument
568 DecryptMessage(const string& ciphertext, keymaster_digest_t digest, keymaster_padding_t padding, const string& nonce) argument
579 DecryptMessage(const string& ciphertext, keymaster_block_mode_t block_mode, keymaster_padding_t padding, const string& nonce) argument
590 DecryptMessage(const AuthorizationSet& update_params, const string& ciphertext, keymaster_digest_t digest, keymaster_padding_t padding, const string& nonce) argument
[all...]
/system/tpm/attestation/server/
H A Dattestation_service.cc677 std::string nonce; local
678 if (!crypto_utility_->GetRandom(kNonceSize, &nonce)) {
679 LOG(ERROR) << __func__ << ": GetRandom(nonce) failed.";
690 nonce, &key_blob, &public_key, &public_key_tpm_format, &key_info,
/system/tpm/trunks/
H A Dhmac_authorization_delegate_test.cc38 TPM2B_NONCE nonce; local
39 nonce.size = kAesKeySize;
40 memset(nonce.buffer, 0, nonce.size);
42 EXPECT_TRUE(delegate.InitSession(dummy_handle, nonce, nonce, std::string(),
48 EXPECT_TRUE(delegate.InitSession(dummy_handle, nonce, nonce, dummy_salt,
70 TPM2B_NONCE nonce; local
71 nonce
[all...]
H A Dresource_manager.cc542 TPM2B_NONCE nonce; local
543 result = Parse_TPM2B_NONCE(&buffer, &nonce, nullptr);
616 TPM2B_NONCE nonce; local
617 result = Parse_TPM2B_NONCE(&buffer, &nonce, nullptr);
H A Dsession_manager_test.cc109 TPM2B_NONCE nonce; local
110 nonce.size = 20;
113 .WillOnce(DoAll(SetArgPointee<8>(nonce), Return(TPM_RC_SUCCESS)));
158 TPM2B_NONCE nonce; local
159 nonce.size = 0;
162 .WillOnce(DoAll(SetArgPointee<8>(nonce), Return(TPM_RC_SUCCESS)));
H A Dtpm_generated.h1247 TPM2B_NONCE nonce; member in struct:trunks::TPMS_AUTH_COMMAND
1253 TPM2B_NONCE nonce; member in struct:trunks::TPMS_AUTH_RESPONSE
/system/vold/
H A DKeyStorage.cpp245 LOG(ERROR) << "GCM encryption but no nonce generated";
249 std::string nonce(reinterpret_cast<const char*>(&nonceBlob.value()[0]),
251 if (!checkSize("nonce", nonce.size(), GCM_NONCE_BYTES)) return false;
258 *ciphertext = nonce + body + mac;
266 auto nonce = ciphertext.substr(0, GCM_NONCE_BYTES); local
269 km::support::blob2hidlVec(nonce));

Completed in 228 milliseconds