Lines Matching refs:tfm2
73 struct crypto_skcipher *tfm2; in aes_siv_encrypt() local
116 tfm2 = crypto_alloc_skcipher("ctr(aes)", 0, CRYPTO_ALG_ASYNC); in aes_siv_encrypt()
117 if (IS_ERR(tfm2)) { in aes_siv_encrypt()
119 return PTR_ERR(tfm2); in aes_siv_encrypt()
122 res = crypto_skcipher_setkey(tfm2, key + key_len, key_len); in aes_siv_encrypt()
126 req = skcipher_request_alloc(tfm2, GFP_KERNEL); in aes_siv_encrypt()
139 crypto_free_skcipher(tfm2); in aes_siv_encrypt()
150 struct crypto_skcipher *tfm2; in aes_siv_decrypt() local
175 tfm2 = crypto_alloc_skcipher("ctr(aes)", 0, CRYPTO_ALG_ASYNC); in aes_siv_decrypt()
176 if (IS_ERR(tfm2)) in aes_siv_decrypt()
177 return PTR_ERR(tfm2); in aes_siv_decrypt()
179 res = crypto_skcipher_setkey(tfm2, key + key_len, key_len); in aes_siv_decrypt()
181 crypto_free_skcipher(tfm2); in aes_siv_decrypt()
185 req = skcipher_request_alloc(tfm2, GFP_KERNEL); in aes_siv_decrypt()
187 crypto_free_skcipher(tfm2); in aes_siv_decrypt()
196 crypto_free_skcipher(tfm2); in aes_siv_decrypt()