Lines Matching refs:key_tfm

1544 ecryptfs_process_key_cipher(struct crypto_skcipher **key_tfm,  in ecryptfs_process_key_cipher()  argument
1551 *key_tfm = NULL; in ecryptfs_process_key_cipher()
1562 *key_tfm = crypto_alloc_skcipher(full_alg_name, 0, CRYPTO_ALG_ASYNC); in ecryptfs_process_key_cipher()
1563 if (IS_ERR(*key_tfm)) { in ecryptfs_process_key_cipher()
1564 rc = PTR_ERR(*key_tfm); in ecryptfs_process_key_cipher()
1569 crypto_skcipher_set_flags(*key_tfm, CRYPTO_TFM_REQ_FORBID_WEAK_KEYS); in ecryptfs_process_key_cipher()
1571 *key_size = crypto_skcipher_max_keysize(*key_tfm); in ecryptfs_process_key_cipher()
1573 rc = crypto_skcipher_setkey(*key_tfm, dummy_key, *key_size); in ecryptfs_process_key_cipher()
1603 struct ecryptfs_key_tfm *key_tfm, *key_tfm_tmp; in ecryptfs_destroy_crypto() local
1606 list_for_each_entry_safe(key_tfm, key_tfm_tmp, &key_tfm_list, in ecryptfs_destroy_crypto()
1608 list_del(&key_tfm->key_tfm_list); in ecryptfs_destroy_crypto()
1609 crypto_free_skcipher(key_tfm->key_tfm); in ecryptfs_destroy_crypto()
1610 kmem_cache_free(ecryptfs_key_tfm_cache, key_tfm); in ecryptfs_destroy_crypto()
1617 ecryptfs_add_new_key_tfm(struct ecryptfs_key_tfm **key_tfm, char *cipher_name, in ecryptfs_add_new_key_tfm() argument
1626 if (key_tfm) in ecryptfs_add_new_key_tfm()
1627 (*key_tfm) = tmp_tfm; in ecryptfs_add_new_key_tfm()
1637 rc = ecryptfs_process_key_cipher(&tmp_tfm->key_tfm, in ecryptfs_add_new_key_tfm()
1645 if (key_tfm) in ecryptfs_add_new_key_tfm()
1646 (*key_tfm) = NULL; in ecryptfs_add_new_key_tfm()
1664 int ecryptfs_tfm_exists(char *cipher_name, struct ecryptfs_key_tfm **key_tfm) in ecryptfs_tfm_exists() argument
1672 if (key_tfm) in ecryptfs_tfm_exists()
1673 (*key_tfm) = tmp_key_tfm; in ecryptfs_tfm_exists()
1677 if (key_tfm) in ecryptfs_tfm_exists()
1678 (*key_tfm) = NULL; in ecryptfs_tfm_exists()
1697 struct ecryptfs_key_tfm *key_tfm; in ecryptfs_get_tfm_and_mutex_for_cipher_name() local
1704 if (!ecryptfs_tfm_exists(cipher_name, &key_tfm)) { in ecryptfs_get_tfm_and_mutex_for_cipher_name()
1705 rc = ecryptfs_add_new_key_tfm(&key_tfm, cipher_name, 0); in ecryptfs_get_tfm_and_mutex_for_cipher_name()
1712 (*tfm) = key_tfm->key_tfm; in ecryptfs_get_tfm_and_mutex_for_cipher_name()
1713 (*tfm_mutex) = &key_tfm->key_tfm_mutex; in ecryptfs_get_tfm_and_mutex_for_cipher_name()