Lines Matching refs:tfm
165 struct crypto_blkcipher *tfm = ceph_crypto_alloc_cipher(); in ceph_aes_encrypt() local
166 struct blkcipher_desc desc = { .tfm = tfm, .flags = 0 }; in ceph_aes_encrypt()
173 if (IS_ERR(tfm)) in ceph_aes_encrypt()
174 return PTR_ERR(tfm); in ceph_aes_encrypt()
187 crypto_blkcipher_setkey((void *)tfm, key, key_len); in ceph_aes_encrypt()
188 iv = crypto_blkcipher_crt(tfm)->iv; in ceph_aes_encrypt()
189 ivsize = crypto_blkcipher_ivsize(tfm); in ceph_aes_encrypt()
214 crypto_free_blkcipher(tfm); in ceph_aes_encrypt()
225 struct crypto_blkcipher *tfm = ceph_crypto_alloc_cipher(); in ceph_aes_encrypt2() local
226 struct blkcipher_desc desc = { .tfm = tfm, .flags = 0 }; in ceph_aes_encrypt2()
233 if (IS_ERR(tfm)) in ceph_aes_encrypt2()
234 return PTR_ERR(tfm); in ceph_aes_encrypt2()
248 crypto_blkcipher_setkey((void *)tfm, key, key_len); in ceph_aes_encrypt2()
249 iv = crypto_blkcipher_crt(tfm)->iv; in ceph_aes_encrypt2()
250 ivsize = crypto_blkcipher_ivsize(tfm); in ceph_aes_encrypt2()
277 crypto_free_blkcipher(tfm); in ceph_aes_encrypt2()
287 struct crypto_blkcipher *tfm = ceph_crypto_alloc_cipher(); in ceph_aes_decrypt() local
288 struct blkcipher_desc desc = { .tfm = tfm }; in ceph_aes_decrypt()
295 if (IS_ERR(tfm)) in ceph_aes_decrypt()
296 return PTR_ERR(tfm); in ceph_aes_decrypt()
305 crypto_blkcipher_setkey((void *)tfm, key, key_len); in ceph_aes_decrypt()
306 iv = crypto_blkcipher_crt(tfm)->iv; in ceph_aes_decrypt()
307 ivsize = crypto_blkcipher_ivsize(tfm); in ceph_aes_decrypt()
341 crypto_free_blkcipher(tfm); in ceph_aes_decrypt()
352 struct crypto_blkcipher *tfm = ceph_crypto_alloc_cipher(); in ceph_aes_decrypt2() local
353 struct blkcipher_desc desc = { .tfm = tfm }; in ceph_aes_decrypt2()
360 if (IS_ERR(tfm)) in ceph_aes_decrypt2()
361 return PTR_ERR(tfm); in ceph_aes_decrypt2()
371 crypto_blkcipher_setkey((void *)tfm, key, key_len); in ceph_aes_decrypt2()
372 iv = crypto_blkcipher_crt(tfm)->iv; in ceph_aes_decrypt2()
373 ivsize = crypto_blkcipher_ivsize(tfm); in ceph_aes_decrypt2()
418 crypto_free_blkcipher(tfm); in ceph_aes_decrypt2()