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