Lines Matching refs:tfm
34 crypto_free_shash(shash->tfm); in free_shash()
41 struct crypto_aead *tfm = NULL; in alloc_aead() local
45 tfm = crypto_alloc_aead("gcm(aes)", 0, 0); in alloc_aead()
48 tfm = crypto_alloc_aead("ccm(aes)", 0, 0); in alloc_aead()
55 if (IS_ERR(tfm)) { in alloc_aead()
56 pr_err("Failed to alloc encrypt aead : %ld\n", PTR_ERR(tfm)); in alloc_aead()
60 return tfm; in alloc_aead()
65 struct crypto_shash *tfm = NULL; in alloc_shash_desc() local
70 tfm = crypto_alloc_shash("hmac(md5)", 0, 0); in alloc_shash_desc()
73 tfm = crypto_alloc_shash("hmac(sha256)", 0, 0); in alloc_shash_desc()
76 tfm = crypto_alloc_shash("cmac(aes)", 0, 0); in alloc_shash_desc()
79 tfm = crypto_alloc_shash("sha256", 0, 0); in alloc_shash_desc()
82 tfm = crypto_alloc_shash("sha512", 0, 0); in alloc_shash_desc()
88 if (IS_ERR(tfm)) in alloc_shash_desc()
91 shash = kzalloc(sizeof(*shash) + crypto_shash_descsize(tfm), in alloc_shash_desc()
94 crypto_free_shash(tfm); in alloc_shash_desc()
96 shash->tfm = tfm; in alloc_shash_desc()