• Home
  • Raw
  • Download

Lines Matching refs:key_tfm

1722 ecryptfs_process_key_cipher(struct crypto_blkcipher **key_tfm,  in ecryptfs_process_key_cipher()  argument
1729 *key_tfm = NULL; in ecryptfs_process_key_cipher()
1740 *key_tfm = crypto_alloc_blkcipher(full_alg_name, 0, CRYPTO_ALG_ASYNC); in ecryptfs_process_key_cipher()
1741 if (IS_ERR(*key_tfm)) { in ecryptfs_process_key_cipher()
1742 rc = PTR_ERR(*key_tfm); in ecryptfs_process_key_cipher()
1747 crypto_blkcipher_set_flags(*key_tfm, CRYPTO_TFM_REQ_WEAK_KEY); in ecryptfs_process_key_cipher()
1749 struct blkcipher_alg *alg = crypto_blkcipher_alg(*key_tfm); in ecryptfs_process_key_cipher()
1754 rc = crypto_blkcipher_setkey(*key_tfm, dummy_key, *key_size); in ecryptfs_process_key_cipher()
1785 struct ecryptfs_key_tfm *key_tfm, *key_tfm_tmp; in ecryptfs_destroy_crypto() local
1788 list_for_each_entry_safe(key_tfm, key_tfm_tmp, &key_tfm_list, in ecryptfs_destroy_crypto()
1790 list_del(&key_tfm->key_tfm_list); in ecryptfs_destroy_crypto()
1791 if (key_tfm->key_tfm) in ecryptfs_destroy_crypto()
1792 crypto_free_blkcipher(key_tfm->key_tfm); in ecryptfs_destroy_crypto()
1793 kmem_cache_free(ecryptfs_key_tfm_cache, key_tfm); in ecryptfs_destroy_crypto()
1800 ecryptfs_add_new_key_tfm(struct ecryptfs_key_tfm **key_tfm, char *cipher_name, in ecryptfs_add_new_key_tfm() argument
1809 if (key_tfm != NULL) in ecryptfs_add_new_key_tfm()
1810 (*key_tfm) = tmp_tfm; in ecryptfs_add_new_key_tfm()
1822 rc = ecryptfs_process_key_cipher(&tmp_tfm->key_tfm, in ecryptfs_add_new_key_tfm()
1830 if (key_tfm != NULL) in ecryptfs_add_new_key_tfm()
1831 (*key_tfm) = NULL; in ecryptfs_add_new_key_tfm()
1849 int ecryptfs_tfm_exists(char *cipher_name, struct ecryptfs_key_tfm **key_tfm) in ecryptfs_tfm_exists() argument
1857 if (key_tfm) in ecryptfs_tfm_exists()
1858 (*key_tfm) = tmp_key_tfm; in ecryptfs_tfm_exists()
1862 if (key_tfm) in ecryptfs_tfm_exists()
1863 (*key_tfm) = NULL; in ecryptfs_tfm_exists()
1882 struct ecryptfs_key_tfm *key_tfm; in ecryptfs_get_tfm_and_mutex_for_cipher_name() local
1889 if (!ecryptfs_tfm_exists(cipher_name, &key_tfm)) { in ecryptfs_get_tfm_and_mutex_for_cipher_name()
1890 rc = ecryptfs_add_new_key_tfm(&key_tfm, cipher_name, 0); in ecryptfs_get_tfm_and_mutex_for_cipher_name()
1897 (*tfm) = key_tfm->key_tfm; in ecryptfs_get_tfm_and_mutex_for_cipher_name()
1898 (*tfm_mutex) = &key_tfm->key_tfm_mutex; in ecryptfs_get_tfm_and_mutex_for_cipher_name()