Home
last modified time | relevance | path

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

/security/integrity/ima/
Dima_crypto.c80 struct crypto_shash *tfm = ima_shash_tfm; in ima_alloc_tfm() local
87 tfm = crypto_alloc_shash(hash_algo_name[algo], 0, 0); in ima_alloc_tfm()
88 if (IS_ERR(tfm)) { in ima_alloc_tfm()
89 rc = PTR_ERR(tfm); in ima_alloc_tfm()
94 return tfm; in ima_alloc_tfm()
97 static void ima_free_tfm(struct crypto_shash *tfm) in ima_free_tfm() argument
99 if (tfm != ima_shash_tfm) in ima_free_tfm()
100 crypto_free_shash(tfm); in ima_free_tfm()
167 struct crypto_ahash *tfm = ima_ahash_tfm; in ima_alloc_atfm() local
173 if (algo != ima_hash_algo || !tfm) { in ima_alloc_atfm()
[all …]
/security/keys/
Ddh.c89 struct crypto_shash *tfm; in kdf_alloc() local
95 tfm = crypto_alloc_shash(hashname, 0, 0); in kdf_alloc()
96 if (IS_ERR(tfm)) { in kdf_alloc()
98 return PTR_ERR(tfm); in kdf_alloc()
102 if (crypto_shash_digestsize(tfm) == 0) in kdf_alloc()
106 size = sizeof(struct shash_desc) + crypto_shash_descsize(tfm); in kdf_alloc()
110 sdesc->shash.tfm = tfm; in kdf_alloc()
117 crypto_free_shash(tfm); in kdf_alloc()
126 if (sdesc->shash.tfm) in kdf_dealloc()
127 crypto_free_shash(sdesc->shash.tfm); in kdf_dealloc()
[all …]
Dtrusted.c54 sdesc->shash.tfm = alg; in init_sdesc()
/security/keys/encrypted-keys/
Dencrypted.c83 struct crypto_skcipher *tfm; in aes_get_sizes() local
85 tfm = crypto_alloc_skcipher(blkcipher_alg, 0, CRYPTO_ALG_ASYNC); in aes_get_sizes()
86 if (IS_ERR(tfm)) { in aes_get_sizes()
88 PTR_ERR(tfm)); in aes_get_sizes()
89 return PTR_ERR(tfm); in aes_get_sizes()
91 ivsize = crypto_skcipher_ivsize(tfm); in aes_get_sizes()
92 blksize = crypto_skcipher_blocksize(tfm); in aes_get_sizes()
93 crypto_free_skcipher(tfm); in aes_get_sizes()
326 static int calc_hash(struct crypto_shash *tfm, u8 *digest, in calc_hash() argument
329 SHASH_DESC_ON_STACK(desc, tfm); in calc_hash()
[all …]
/security/apparmor/
Dcrypto.c41 desc->tfm = apparmor_tfm; in aa_calc_hash()
78 desc->tfm = apparmor_tfm; in aa_calc_profile_hash()
104 struct crypto_shash *tfm; in init_profile_hash() local
109 tfm = crypto_alloc_shash("sha1", 0, 0); in init_profile_hash()
110 if (IS_ERR(tfm)) { in init_profile_hash()
111 int error = PTR_ERR(tfm); in init_profile_hash()
115 apparmor_tfm = tfm; in init_profile_hash()
/security/integrity/evm/
Devm_crypto.c78 struct crypto_shash **tfm, *tmp_tfm; in init_desc() local
86 tfm = &hmac_tfm; in init_desc()
92 tfm = &evm_tfm[hash_algo]; in init_desc()
96 if (*tfm) in init_desc()
99 if (*tfm) in init_desc()
117 *tfm = tmp_tfm; in init_desc()
121 desc = kmalloc(sizeof(*desc) + crypto_shash_descsize(*tfm), in init_desc()
126 desc->tfm = *tfm; in init_desc()
209 data->hdr.length = crypto_shash_digestsize(desc->tfm); in evm_calc_hmac_or_hash()