Searched refs:tfm (Results 1 – 6 of 6) sorted by relevance
/security/integrity/ima/ |
D | ima_crypto.c | 88 struct crypto_shash *tfm = ima_shash_tfm; in ima_alloc_tfm() local 95 tfm = crypto_alloc_shash(hash_algo_name[algo], 0, 0); in ima_alloc_tfm() 96 if (IS_ERR(tfm)) { in ima_alloc_tfm() 97 rc = PTR_ERR(tfm); in ima_alloc_tfm() 102 return tfm; in ima_alloc_tfm() 105 static void ima_free_tfm(struct crypto_shash *tfm) in ima_free_tfm() argument 107 if (tfm != ima_shash_tfm) in ima_free_tfm() 108 crypto_free_shash(tfm); in ima_free_tfm() 175 struct crypto_ahash *tfm = ima_ahash_tfm; in ima_alloc_atfm() local 181 if (algo != ima_hash_algo || !tfm) { in ima_alloc_atfm() [all …]
|
/security/keys/ |
D | dh.c | 93 struct crypto_shash *tfm; in kdf_alloc() local 99 tfm = crypto_alloc_shash(hashname, 0, 0); in kdf_alloc() 100 if (IS_ERR(tfm)) { in kdf_alloc() 102 return PTR_ERR(tfm); in kdf_alloc() 106 if (crypto_shash_digestsize(tfm) == 0) in kdf_alloc() 110 size = sizeof(struct shash_desc) + crypto_shash_descsize(tfm); in kdf_alloc() 114 sdesc->shash.tfm = tfm; in kdf_alloc() 122 crypto_free_shash(tfm); in kdf_alloc() 131 if (sdesc->shash.tfm) in kdf_dealloc() 132 crypto_free_shash(sdesc->shash.tfm); in kdf_dealloc() [all …]
|
D | trusted.c | 55 sdesc->shash.tfm = alg; in init_sdesc()
|
/security/integrity/evm/ |
D | evm_crypto.c | 78 struct crypto_shash **tfm; in init_desc() local 86 tfm = &hmac_tfm; in init_desc() 89 tfm = &hash_tfm; in init_desc() 93 if (*tfm == NULL) { in init_desc() 95 if (*tfm) in init_desc() 97 *tfm = crypto_alloc_shash(algo, 0, in init_desc() 99 if (IS_ERR(*tfm)) { in init_desc() 100 rc = PTR_ERR(*tfm); in init_desc() 102 *tfm = NULL; in init_desc() 107 rc = crypto_shash_setkey(*tfm, evmkey, evmkey_len); in init_desc() [all …]
|
/security/keys/encrypted-keys/ |
D | encrypted.c | 83 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() 325 static int calc_hash(struct crypto_shash *tfm, u8 *digest, in calc_hash() argument 328 SHASH_DESC_ON_STACK(desc, tfm); in calc_hash() [all …]
|
/security/apparmor/ |
D | crypto.c | 45 desc->tfm = apparmor_tfm; in aa_calc_hash() 83 desc->tfm = apparmor_tfm; in aa_calc_profile_hash() 110 struct crypto_shash *tfm; in init_profile_hash() local 115 tfm = crypto_alloc_shash("sha1", 0, CRYPTO_ALG_ASYNC); in init_profile_hash() 116 if (IS_ERR(tfm)) { in init_profile_hash() 117 int error = PTR_ERR(tfm); in init_profile_hash() 121 apparmor_tfm = tfm; in init_profile_hash()
|