Lines Matching refs:hdr
99 struct tk_blob_hdr *hdr = (struct tk_blob_hdr *)out; in huk_ae_encrypt() local
104 hdr->reserved = 0; in huk_ae_encrypt()
106 memcpy(hdr->iv, iv, IV_SIZE); in huk_ae_encrypt()
108 res = TEE_AEInit(crypto_op, hdr->iv, IV_SIZE, TAG_SIZE * 8, 0, 0); in huk_ae_encrypt()
112 res = TEE_AEEncryptFinal(crypto_op, in, in_sz, hdr->enc_key, in huk_ae_encrypt()
113 &enc_key_len, hdr->tag, &tag_len); in huk_ae_encrypt()
117 if (ADD_OVERFLOW(enc_key_len, sizeof(*hdr), out_sz)) in huk_ae_encrypt()
127 struct tk_blob_hdr *hdr = (struct tk_blob_hdr *)in; in huk_ae_decrypt() local
131 if (SUB_OVERFLOW(in_sz, sizeof(*hdr), &enc_key_len)) in huk_ae_decrypt()
134 res = TEE_AEInit(crypto_op, hdr->iv, IV_SIZE, TAG_SIZE * 8, 0, 0); in huk_ae_decrypt()
138 memcpy(tag, hdr->tag, TAG_SIZE); in huk_ae_decrypt()
139 res = TEE_AEDecryptFinal(crypto_op, hdr->enc_key, enc_key_len, out, in huk_ae_decrypt()