Lines Matching refs:tfm
110 struct crypto_akcipher *tfm; in software_key_query() local
122 tfm = crypto_alloc_akcipher(alg_name, 0, 0); in software_key_query()
123 if (IS_ERR(tfm)) in software_key_query()
124 return PTR_ERR(tfm); in software_key_query()
138 ret = crypto_akcipher_set_priv_key(tfm, key, pkey->keylen); in software_key_query()
140 ret = crypto_akcipher_set_pub_key(tfm, key, pkey->keylen); in software_key_query()
144 len = crypto_akcipher_maxsize(tfm); in software_key_query()
160 crypto_free_akcipher(tfm); in software_key_query()
173 struct crypto_akcipher *tfm; in software_key_eds_op() local
188 tfm = crypto_alloc_akcipher(alg_name, 0, 0); in software_key_eds_op()
189 if (IS_ERR(tfm)) in software_key_eds_op()
190 return PTR_ERR(tfm); in software_key_eds_op()
193 req = akcipher_request_alloc(tfm, GFP_KERNEL); in software_key_eds_op()
209 ret = crypto_akcipher_set_priv_key(tfm, key, pkey->keylen); in software_key_eds_op()
211 ret = crypto_akcipher_set_pub_key(tfm, key, pkey->keylen); in software_key_eds_op()
248 crypto_free_akcipher(tfm); in software_key_eds_op()
257 struct crypto_shash *tfm; in cert_sig_digest_update() local
270 tfm = crypto_alloc_shash(sig->hash_algo, 0, 0); in cert_sig_digest_update()
271 if (IS_ERR(tfm)) in cert_sig_digest_update()
272 return PTR_ERR(tfm); in cert_sig_digest_update()
274 desc_size = crypto_shash_descsize(tfm) + sizeof(*desc); in cert_sig_digest_update()
281 desc->tfm = tfm; in cert_sig_digest_update()
296 crypto_free_shash(tfm); in cert_sig_digest_update()
315 struct crypto_akcipher *tfm; in public_key_verify_signature() local
334 tfm = crypto_alloc_akcipher(alg_name, 0, 0); in public_key_verify_signature()
335 if (IS_ERR(tfm)) in public_key_verify_signature()
336 return PTR_ERR(tfm); in public_key_verify_signature()
339 req = akcipher_request_alloc(tfm, GFP_KERNEL); in public_key_verify_signature()
355 ret = crypto_akcipher_set_priv_key(tfm, key, pkey->keylen); in public_key_verify_signature()
357 ret = crypto_akcipher_set_pub_key(tfm, key, pkey->keylen); in public_key_verify_signature()
363 ret = cert_sig_digest_update(sig, tfm); in public_key_verify_signature()
384 crypto_free_akcipher(tfm); in public_key_verify_signature()