Lines Matching defs:tfm
88 struct crypto_skcipher *tfm;
90 tfm = crypto_alloc_skcipher(blkcipher_alg, 0, CRYPTO_ALG_ASYNC);
91 if (IS_ERR(tfm)) {
93 PTR_ERR(tfm));
94 return PTR_ERR(tfm);
96 ivsize = crypto_skcipher_ivsize(tfm);
97 blksize = crypto_skcipher_blocksize(tfm);
98 crypto_free_skcipher(tfm);
335 struct crypto_shash *tfm;
338 tfm = crypto_alloc_shash(hmac_alg, 0, 0);
339 if (IS_ERR(tfm)) {
341 hmac_alg, PTR_ERR(tfm));
342 return PTR_ERR(tfm);
345 err = crypto_shash_setkey(tfm, key, keylen);
347 err = crypto_shash_tfm_digest(tfm, buf, buflen, digest);
348 crypto_free_shash(tfm);
387 struct crypto_skcipher *tfm;
390 tfm = crypto_alloc_skcipher(blkcipher_alg, 0, CRYPTO_ALG_ASYNC);
391 if (IS_ERR(tfm)) {
393 blkcipher_alg, PTR_ERR(tfm));
394 return ERR_CAST(tfm);
397 ret = crypto_skcipher_setkey(tfm, key, key_len);
400 crypto_free_skcipher(tfm);
404 req = skcipher_request_alloc(tfm, GFP_KERNEL);
408 crypto_free_skcipher(tfm);
458 struct crypto_skcipher *tfm;
483 tfm = crypto_skcipher_reqtfm(req);
485 crypto_free_skcipher(tfm);
560 struct crypto_skcipher *tfm;
589 tfm = crypto_skcipher_reqtfm(req);
591 crypto_free_skcipher(tfm);