Lines Matching refs:aead_req
23 struct aead_request *aead_req; in aead_encrypt() local
24 int reqsize = sizeof(*aead_req) + crypto_aead_reqsize(tfm); in aead_encrypt()
28 aead_req = kzalloc(reqsize + aad_len, GFP_ATOMIC); in aead_encrypt()
29 if (!aead_req) in aead_encrypt()
32 __aad = (u8 *)aead_req + reqsize; in aead_encrypt()
40 aead_request_set_tfm(aead_req, tfm); in aead_encrypt()
41 aead_request_set_crypt(aead_req, sg, sg, data_len, b_0); in aead_encrypt()
42 aead_request_set_ad(aead_req, sg[0].length); in aead_encrypt()
44 ret = crypto_aead_encrypt(aead_req); in aead_encrypt()
45 kfree_sensitive(aead_req); in aead_encrypt()
55 struct aead_request *aead_req; in aead_decrypt() local
56 int reqsize = sizeof(*aead_req) + crypto_aead_reqsize(tfm); in aead_decrypt()
63 aead_req = kzalloc(reqsize + aad_len, GFP_ATOMIC); in aead_decrypt()
64 if (!aead_req) in aead_decrypt()
67 __aad = (u8 *)aead_req + reqsize; in aead_decrypt()
75 aead_request_set_tfm(aead_req, tfm); in aead_decrypt()
76 aead_request_set_crypt(aead_req, sg, sg, data_len + mic_len, b_0); in aead_decrypt()
77 aead_request_set_ad(aead_req, sg[0].length); in aead_decrypt()
79 err = crypto_aead_decrypt(aead_req); in aead_decrypt()
80 kfree_sensitive(aead_req); in aead_decrypt()