Lines Matching defs:tfm
156 struct crypto_shash *tfm;
159 tfm = crypto_alloc_shash(ECRYPTFS_DEFAULT_HASH, 0, 0);
160 if (IS_ERR(tfm)) {
161 rc = PTR_ERR(tfm);
173 crypt_stat->hash_tfm = tfm;
189 crypto_free_skcipher(crypt_stat->tfm);
299 BUG_ON(!crypt_stat || !crypt_stat->tfm
311 req = skcipher_request_alloc(crypt_stat->tfm, GFP_NOFS);
323 rc = crypto_skcipher_setkey(crypt_stat->tfm, crypt_stat->key,
567 if (crypt_stat->tfm) {
575 crypt_stat->tfm = crypto_alloc_skcipher(full_alg_name, 0, 0);
576 if (IS_ERR(crypt_stat->tfm)) {
577 rc = PTR_ERR(crypt_stat->tfm);
578 crypt_stat->tfm = NULL;
584 crypto_skcipher_set_flags(crypt_stat->tfm,
1659 * ecryptfs_tfm_exists - Search for existing tfm for cipher_name.
1661 * @key_tfm: set to corresponding tfm if found
1689 * @tfm: set to cached tfm found, or new tfm created
1690 * @tfm_mutex: set to mutex for cached tfm found, or new tfm created
1693 * Sets pointers to @tfm & @tfm_mutex matching @cipher_name.
1697 int ecryptfs_get_tfm_and_mutex_for_cipher_name(struct crypto_skcipher **tfm,
1704 (*tfm) = NULL;
1716 (*tfm) = key_tfm->key_tfm;
1887 * pointed to by crypt_stat->tfm.
2069 struct crypto_skcipher *tfm;
2079 rc = ecryptfs_get_tfm_and_mutex_for_cipher_name(&tfm, &tfm_mutex,
2087 cipher_blocksize = crypto_skcipher_blocksize(tfm);