Home
last modified time | relevance | path

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

/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.cpp530 keymaster_padding_t padding, const string& nonce) { in DecryptMessage() argument
535 begin_params.push_back(TAG_NONCE, nonce.data(), nonce.size()); in DecryptMessage()
541 keymaster_padding_t padding, const string& nonce) { in DecryptMessage() argument
546 begin_params.push_back(TAG_NONCE, nonce.data(), nonce.size()); in DecryptMessage()
553 keymaster_padding_t padding, const string& nonce) { in DecryptMessage() argument
558 begin_params.push_back(TAG_NONCE, nonce.data(), nonce.size()); in DecryptMessage()
593 void Keymaster1Test::CheckAesCtrTestVector(const string& key, const string& nonce, in CheckAesCtrTestVector() argument
604 begin_params.push_back(TAG_NONCE, nonce.data(), nonce.size()); in CheckAesCtrTestVector()
Dandroid_keymaster_test_utils.h255 keymaster_padding_t padding, const std::string& nonce);
257 keymaster_padding_t padding, const std::string& nonce);
260 const std::string& nonce);
263 const std::string& nonce);
267 void CheckAesOcbTestVector(const std::string& key, const std::string& nonce,
270 void CheckAesCtrTestVector(const std::string& key, const std::string& nonce,
Dsoft_keymaster_context.cpp181 Buffer nonce, tag; in ParseOcbAuthEncryptedBlob() local
184 hw_enforced, sw_enforced, &nonce, &tag); in ParseOcbAuthEncryptedBlob()
188 if (nonce.available_read() != OCB_NONCE_LENGTH || tag.available_read() != OCB_TAG_LENGTH) in ParseOcbAuthEncryptedBlob()
192 nonce, tag, key_material); in ParseOcbAuthEncryptedBlob()
Dandroid_keymaster_test.cpp2418 const char* nonce; member
2457 const string nonce = hex2str(test.nonce); in TEST_P() local
2460 CheckAesCtrTestVector(key, nonce, plaintext, ciphertext); in TEST_P()
2761 uint8_t nonce[] = { in TEST_P() local
2777 begin_params.push_back(TAG_NONCE, nonce, sizeof(nonce)); in TEST_P()
/system/extras/tests/net_test/
Dmultinetwork_test.py467 nonce = "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c"
472 nonce
492 optdata=nonce)]) /