Lines Matching refs:tfm
169 struct crypto_blkcipher *tfm = ceph_crypto_alloc_cipher(); in ceph_aes_encrypt() local
170 struct blkcipher_desc desc = { .tfm = tfm, .flags = 0 }; in ceph_aes_encrypt()
177 if (IS_ERR(tfm)) in ceph_aes_encrypt()
178 return PTR_ERR(tfm); in ceph_aes_encrypt()
191 crypto_blkcipher_setkey((void *)tfm, key, key_len); in ceph_aes_encrypt()
192 iv = crypto_blkcipher_crt(tfm)->iv; in ceph_aes_encrypt()
193 ivsize = crypto_blkcipher_ivsize(tfm); in ceph_aes_encrypt()
218 crypto_free_blkcipher(tfm); in ceph_aes_encrypt()
229 struct crypto_blkcipher *tfm = ceph_crypto_alloc_cipher(); in ceph_aes_encrypt2() local
230 struct blkcipher_desc desc = { .tfm = tfm, .flags = 0 }; in ceph_aes_encrypt2()
237 if (IS_ERR(tfm)) in ceph_aes_encrypt2()
238 return PTR_ERR(tfm); in ceph_aes_encrypt2()
252 crypto_blkcipher_setkey((void *)tfm, key, key_len); in ceph_aes_encrypt2()
253 iv = crypto_blkcipher_crt(tfm)->iv; in ceph_aes_encrypt2()
254 ivsize = crypto_blkcipher_ivsize(tfm); in ceph_aes_encrypt2()
281 crypto_free_blkcipher(tfm); in ceph_aes_encrypt2()
291 struct crypto_blkcipher *tfm = ceph_crypto_alloc_cipher(); in ceph_aes_decrypt() local
292 struct blkcipher_desc desc = { .tfm = tfm }; in ceph_aes_decrypt()
299 if (IS_ERR(tfm)) in ceph_aes_decrypt()
300 return PTR_ERR(tfm); in ceph_aes_decrypt()
309 crypto_blkcipher_setkey((void *)tfm, key, key_len); in ceph_aes_decrypt()
310 iv = crypto_blkcipher_crt(tfm)->iv; in ceph_aes_decrypt()
311 ivsize = crypto_blkcipher_ivsize(tfm); in ceph_aes_decrypt()
345 crypto_free_blkcipher(tfm); in ceph_aes_decrypt()
356 struct crypto_blkcipher *tfm = ceph_crypto_alloc_cipher(); in ceph_aes_decrypt2() local
357 struct blkcipher_desc desc = { .tfm = tfm }; in ceph_aes_decrypt2()
364 if (IS_ERR(tfm)) in ceph_aes_decrypt2()
365 return PTR_ERR(tfm); in ceph_aes_decrypt2()
375 crypto_blkcipher_setkey((void *)tfm, key, key_len); in ceph_aes_decrypt2()
376 iv = crypto_blkcipher_crt(tfm)->iv; in ceph_aes_decrypt2()
377 ivsize = crypto_blkcipher_ivsize(tfm); in ceph_aes_decrypt2()
422 crypto_free_blkcipher(tfm); in ceph_aes_decrypt2()