Lines Matching refs:tfm
89 struct crypto_shash *tfm; in kdf_alloc() local
95 tfm = crypto_alloc_shash(hashname, 0, 0); in kdf_alloc()
96 if (IS_ERR(tfm)) { in kdf_alloc()
98 return PTR_ERR(tfm); in kdf_alloc()
102 if (crypto_shash_digestsize(tfm) == 0) in kdf_alloc()
106 size = sizeof(struct shash_desc) + crypto_shash_descsize(tfm); in kdf_alloc()
110 sdesc->shash.tfm = tfm; in kdf_alloc()
117 crypto_free_shash(tfm); in kdf_alloc()
126 if (sdesc->shash.tfm) in kdf_dealloc()
127 crypto_free_shash(sdesc->shash.tfm); in kdf_dealloc()
147 unsigned int h = crypto_shash_digestsize(desc->tfm); in kdf_ctr()
206 crypto_shash_digestsize(sdesc->shash.tfm)); in keyctl_dh_compute_kdf()
239 struct crypto_kpp *tfm; in __keyctl_dh_compute() local
315 tfm = crypto_alloc_kpp("dh", 0, 0); in __keyctl_dh_compute()
316 if (IS_ERR(tfm)) { in __keyctl_dh_compute()
317 ret = PTR_ERR(tfm); in __keyctl_dh_compute()
321 ret = crypto_kpp_set_secret(tfm, secret, secretlen); in __keyctl_dh_compute()
325 outlen = crypto_kpp_maxsize(tfm); in __keyctl_dh_compute()
350 req = kpp_request_alloc(tfm, GFP_KERNEL); in __keyctl_dh_compute()
400 crypto_free_kpp(tfm); in __keyctl_dh_compute()