Lines Matching refs:tfm
18 int aead_encrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad, size_t aad_len, in aead_encrypt() argument
21 size_t mic_len = crypto_aead_authsize(tfm); in aead_encrypt()
24 int reqsize = sizeof(*aead_req) + crypto_aead_reqsize(tfm); in aead_encrypt()
40 aead_request_set_tfm(aead_req, tfm); in aead_encrypt()
50 int aead_decrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad, size_t aad_len, in aead_decrypt() argument
53 size_t mic_len = crypto_aead_authsize(tfm); in aead_decrypt()
56 int reqsize = sizeof(*aead_req) + crypto_aead_reqsize(tfm); in aead_decrypt()
75 aead_request_set_tfm(aead_req, tfm); in aead_decrypt()
89 struct crypto_aead *tfm; in aead_key_setup_encrypt() local
92 tfm = crypto_alloc_aead(alg, 0, CRYPTO_ALG_ASYNC); in aead_key_setup_encrypt()
93 if (IS_ERR(tfm)) in aead_key_setup_encrypt()
94 return tfm; in aead_key_setup_encrypt()
96 err = crypto_aead_setkey(tfm, key, key_len); in aead_key_setup_encrypt()
99 err = crypto_aead_setauthsize(tfm, mic_len); in aead_key_setup_encrypt()
103 return tfm; in aead_key_setup_encrypt()
106 crypto_free_aead(tfm); in aead_key_setup_encrypt()
110 void aead_key_free(struct crypto_aead *tfm) in aead_key_free() argument
112 crypto_free_aead(tfm); in aead_key_free()