Home
last modified time | relevance | path

Searched refs:tfm (Results 1 – 5 of 5) sorted by relevance

/security/integrity/ima/
Dima_crypto.c116 struct crypto_shash *tfm = ima_shash_tfm; in ima_alloc_tfm() local
123 tfm = crypto_alloc_shash(hash_algo_name[algo], 0, 0); in ima_alloc_tfm()
124 if (IS_ERR(tfm)) { in ima_alloc_tfm()
125 rc = PTR_ERR(tfm); in ima_alloc_tfm()
130 return tfm; in ima_alloc_tfm()
133 static void ima_free_tfm(struct crypto_shash *tfm) in ima_free_tfm() argument
135 if (tfm != ima_shash_tfm) in ima_free_tfm()
136 crypto_free_shash(tfm); in ima_free_tfm()
203 struct crypto_ahash *tfm = ima_ahash_tfm; in ima_alloc_atfm() local
209 if (algo != ima_hash_algo || !tfm) { in ima_alloc_atfm()
[all …]
/security/integrity/evm/
Devm_crypto.c39 struct crypto_shash **tfm; in init_desc() local
43 tfm = &hmac_tfm; in init_desc()
46 tfm = &hash_tfm; in init_desc()
50 if (*tfm == NULL) { in init_desc()
52 if (*tfm) in init_desc()
54 *tfm = crypto_alloc_shash(algo, 0, CRYPTO_ALG_ASYNC); in init_desc()
55 if (IS_ERR(*tfm)) { in init_desc()
56 rc = PTR_ERR(*tfm); in init_desc()
58 *tfm = NULL; in init_desc()
63 rc = crypto_shash_setkey(*tfm, evmkey, evmkey_len); in init_desc()
[all …]
/security/apparmor/
Dcrypto.c49 desc.shash.tfm = apparmor_tfm; in aa_calc_profile_hash()
76 struct crypto_shash *tfm; in init_profile_hash() local
81 tfm = crypto_alloc_shash("sha1", 0, CRYPTO_ALG_ASYNC); in init_profile_hash()
82 if (IS_ERR(tfm)) { in init_profile_hash()
83 int error = PTR_ERR(tfm); in init_profile_hash()
87 apparmor_tfm = tfm; in init_profile_hash()
/security/keys/encrypted-keys/
Dencrypted.c88 struct crypto_blkcipher *tfm; in aes_get_sizes() local
90 tfm = crypto_alloc_blkcipher(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_blkcipher_ivsize(tfm); in aes_get_sizes()
97 blksize = crypto_blkcipher_blocksize(tfm); in aes_get_sizes()
98 crypto_free_blkcipher(tfm); in aes_get_sizes()
340 sdesc->shash.tfm = alg; in alloc_sdesc()
417 desc->tfm = crypto_alloc_blkcipher(blkcipher_alg, 0, CRYPTO_ALG_ASYNC); in init_blkcipher_desc()
[all …]
/security/keys/
Dtrusted.c54 sdesc->shash.tfm = alg; in init_sdesc()