Home
last modified time | relevance | path

Searched refs:desc (Results 1 – 10 of 10) sorted by relevance

/security/integrity/evm/
Devm_crypto.c40 struct shash_desc *desc; in init_desc() local
75 desc = kmalloc(sizeof(*desc) + crypto_shash_descsize(*tfm), in init_desc()
77 if (!desc) in init_desc()
80 desc->tfm = *tfm; in init_desc()
81 desc->flags = CRYPTO_TFM_REQ_MAY_SLEEP; in init_desc()
83 rc = crypto_shash_init(desc); in init_desc()
85 kfree(desc); in init_desc()
88 return desc; in init_desc()
97 static void hmac_add_misc(struct shash_desc *desc, struct inode *inode, in hmac_add_misc() argument
114 crypto_shash_update(desc, (const u8 *)&hmac_misc, sizeof(hmac_misc)); in hmac_add_misc()
[all …]
/security/apparmor/
Dcrypto.c38 } desc; in aa_calc_profile_hash() local
49 desc.shash.tfm = apparmor_tfm; in aa_calc_profile_hash()
50 desc.shash.flags = 0; in aa_calc_profile_hash()
52 error = crypto_shash_init(&desc.shash); in aa_calc_profile_hash()
55 error = crypto_shash_update(&desc.shash, (u8 *) &le32_version, 4); in aa_calc_profile_hash()
58 error = crypto_shash_update(&desc.shash, (u8 *) start, len); in aa_calc_profile_hash()
61 error = crypto_shash_final(&desc.shash, profile->hash); in aa_calc_profile_hash()
/security/keys/encrypted-keys/
Dencrypted.c411 static int init_blkcipher_desc(struct blkcipher_desc *desc, const u8 *key, in init_blkcipher_desc() argument
417 desc->tfm = crypto_alloc_blkcipher(blkcipher_alg, 0, CRYPTO_ALG_ASYNC); in init_blkcipher_desc()
418 if (IS_ERR(desc->tfm)) { in init_blkcipher_desc()
420 blkcipher_alg, PTR_ERR(desc->tfm)); in init_blkcipher_desc()
421 return PTR_ERR(desc->tfm); in init_blkcipher_desc()
423 desc->flags = 0; in init_blkcipher_desc()
425 ret = crypto_blkcipher_setkey(desc->tfm, key, key_len); in init_blkcipher_desc()
428 crypto_free_blkcipher(desc->tfm); in init_blkcipher_desc()
431 crypto_blkcipher_set_iv(desc->tfm, iv, ivsize); in init_blkcipher_desc()
477 struct blkcipher_desc desc; in derived_key_encrypt() local
[all …]
/security/keys/
Duser_defined.c21 static int logon_vet_description(const char *desc);
210 static int logon_vet_description(const char *desc) in logon_vet_description() argument
215 p = strchr(desc, ':'); in logon_vet_description()
220 if (p == desc) in logon_vet_description()
Drequest_key_auth.c153 char desc[20]; in request_key_auth_new() local
200 sprintf(desc, "%x", target->serial); in request_key_auth_new()
202 authkey = key_alloc(&key_type_request_key_auth, desc, in request_key_auth_new()
Dkey.c224 struct key *key_alloc(struct key_type *type, const char *desc, in key_alloc() argument
234 if (!desc || !*desc) in key_alloc()
238 ret = type->vet_description(desc); in key_alloc()
245 desclen = strlen(desc); in key_alloc()
279 if (desc) { in key_alloc()
281 key->index_key.description = kmemdup(desc, desclen + 1, GFP_KERNEL); in key_alloc()
Drequest_key.c104 char desc[20]; in call_sbin_request_key() local
114 sprintf(desc, "_req.%u", key->serial); in call_sbin_request_key()
117 keyring = keyring_alloc(desc, cred->fsuid, cred->fsgid, cred, in call_sbin_request_key()
Dkeyring.c61 static inline unsigned keyring_hash(const char *desc) in keyring_hash() argument
65 for (; *desc; desc++) in keyring_hash()
66 bucket += (unsigned char)*desc; in keyring_hash()
/security/integrity/ima/
Dima_crypto.c533 struct ima_template_desc *desc, int num_fields, in ima_calc_field_array_hash() argument
543 rc = ima_calc_field_array_hash_tfm(field_data, desc, num_fields, in ima_calc_field_array_hash()
Dima.h102 struct ima_template_desc *desc, int num_fields,