Home
last modified time | relevance | path

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

/security/integrity/ima/
Dima_crypto.c24 static int init_desc(struct hash_desc *desc) in init_desc() argument
28 desc->tfm = crypto_alloc_hash(ima_hash, 0, CRYPTO_ALG_ASYNC); in init_desc()
29 if (IS_ERR(desc->tfm)) { in init_desc()
31 ima_hash, PTR_ERR(desc->tfm)); in init_desc()
32 rc = PTR_ERR(desc->tfm); in init_desc()
35 desc->flags = 0; in init_desc()
36 rc = crypto_hash_init(desc); in init_desc()
38 crypto_free_hash(desc->tfm); in init_desc()
47 struct hash_desc desc; in ima_calc_hash() local
53 rc = init_desc(&desc); in ima_calc_hash()
[all …]
/security/integrity/evm/
Devm_crypto.c38 struct shash_desc *desc; in init_desc() local
73 desc = kmalloc(sizeof(*desc) + crypto_shash_descsize(*tfm), in init_desc()
75 if (!desc) in init_desc()
78 desc->tfm = *tfm; in init_desc()
79 desc->flags = CRYPTO_TFM_REQ_MAY_SLEEP; in init_desc()
81 rc = crypto_shash_init(desc); in init_desc()
83 kfree(desc); in init_desc()
86 return desc; in init_desc()
95 static void hmac_add_misc(struct shash_desc *desc, struct inode *inode, in hmac_add_misc() argument
112 crypto_shash_update(desc, (const u8 *)&hmac_misc, sizeof hmac_misc); in hmac_add_misc()
[all …]
/security/keys/encrypted-keys/
Dencrypted.c404 static int init_blkcipher_desc(struct blkcipher_desc *desc, const u8 *key, in init_blkcipher_desc() argument
410 desc->tfm = crypto_alloc_blkcipher(blkcipher_alg, 0, CRYPTO_ALG_ASYNC); in init_blkcipher_desc()
411 if (IS_ERR(desc->tfm)) { in init_blkcipher_desc()
413 blkcipher_alg, PTR_ERR(desc->tfm)); in init_blkcipher_desc()
414 return PTR_ERR(desc->tfm); in init_blkcipher_desc()
416 desc->flags = 0; in init_blkcipher_desc()
418 ret = crypto_blkcipher_setkey(desc->tfm, key, key_len); in init_blkcipher_desc()
421 crypto_free_blkcipher(desc->tfm); in init_blkcipher_desc()
424 crypto_blkcipher_set_iv(desc->tfm, iv, ivsize); in init_blkcipher_desc()
470 struct blkcipher_desc desc; in derived_key_encrypt() local
[all …]
/security/keys/
Duser_defined.c21 static int logon_vet_description(const char *desc);
214 static int logon_vet_description(const char *desc) in logon_vet_description() argument
219 p = strchr(desc, ':'); in logon_vet_description()
224 if (p == desc) in logon_vet_description()
Drequest_key_auth.c139 char desc[20]; in request_key_auth_new() local
186 sprintf(desc, "%x", target->serial); in request_key_auth_new()
188 authkey = key_alloc(&key_type_request_key_auth, desc, in request_key_auth_new()
Dkey.c231 struct key *key_alloc(struct key_type *type, const char *desc, in key_alloc() argument
241 if (!desc || !*desc) in key_alloc()
245 ret = type->vet_description(desc); in key_alloc()
252 desclen = strlen(desc) + 1; in key_alloc()
286 if (desc) { in key_alloc()
287 key->description = kmemdup(desc, desclen, GFP_KERNEL); in key_alloc()
Drequest_key.c122 char desc[20]; in call_sbin_request_key() local
132 sprintf(desc, "_req.%u", key->serial); in call_sbin_request_key()
135 keyring = keyring_alloc(desc, cred->fsuid, cred->fsgid, cred, in call_sbin_request_key()
Dkeyring.c44 static inline unsigned keyring_hash(const char *desc) in keyring_hash() argument
48 for (; *desc; desc++) in keyring_hash()
49 bucket += (unsigned char)*desc; in keyring_hash()