Lines Matching refs:tfm

160 	struct crypto_akcipher *tfm;  in software_key_query()  local
211 tfm = crypto_alloc_akcipher(alg_name, 0, 0); in software_key_query()
212 if (IS_ERR(tfm)) { in software_key_query()
213 ret = PTR_ERR(tfm); in software_key_query()
218 ret = crypto_akcipher_set_priv_key(tfm, key, pkey->keylen); in software_key_query()
220 ret = crypto_akcipher_set_pub_key(tfm, key, pkey->keylen); in software_key_query()
224 len = crypto_akcipher_maxsize(tfm); in software_key_query()
263 crypto_free_akcipher(tfm); in software_key_query()
278 struct crypto_akcipher *tfm; in software_key_eds_op() local
320 tfm = crypto_alloc_akcipher(alg_name, 0, 0); in software_key_eds_op()
321 if (IS_ERR(tfm)) { in software_key_eds_op()
322 ret = PTR_ERR(tfm); in software_key_eds_op()
327 ret = crypto_akcipher_set_priv_key(tfm, key, pkey->keylen); in software_key_eds_op()
329 ret = crypto_akcipher_set_pub_key(tfm, key, pkey->keylen); in software_key_eds_op()
333 ksz = crypto_akcipher_maxsize(tfm); in software_key_eds_op()
343 ret = crypto_akcipher_sync_encrypt(tfm, in, params->in_len, in software_key_eds_op()
349 ret = crypto_akcipher_sync_decrypt(tfm, in, params->in_len, in software_key_eds_op()
369 crypto_free_akcipher(tfm); in software_key_eds_op()
383 struct crypto_sig *tfm; in public_key_verify_signature() local
415 tfm = crypto_alloc_sig(alg_name, 0, 0); in public_key_verify_signature()
416 if (IS_ERR(tfm)) in public_key_verify_signature()
417 return PTR_ERR(tfm); in public_key_verify_signature()
433 ret = crypto_sig_set_privkey(tfm, key, pkey->keylen); in public_key_verify_signature()
435 ret = crypto_sig_set_pubkey(tfm, key, pkey->keylen); in public_key_verify_signature()
439 ret = crypto_sig_verify(tfm, sig->s, sig->s_size, in public_key_verify_signature()
445 crypto_free_sig(tfm); in public_key_verify_signature()