Home
last modified time | relevance | path

Searched refs:hash_alg (Results 1 – 25 of 26) sorted by relevance

12

/kernel/linux/linux-5.10/fs/verity/
Dmeasure.c28 const struct fsverity_hash_alg *hash_alg; in fsverity_ioctl_measure() local
34 hash_alg = vi->tree_params.hash_alg; in fsverity_ioctl_measure()
44 if (arg.digest_size < hash_alg->digest_size) in fsverity_ioctl_measure()
48 arg.digest_algorithm = hash_alg - fsverity_hash_algs; in fsverity_ioctl_measure()
49 arg.digest_size = hash_alg->digest_size; in fsverity_ioctl_measure()
54 if (copy_to_user(uarg->digest, vi->measurement, hash_alg->digest_size)) in fsverity_ioctl_measure()
Dsignature.c83 const struct fsverity_hash_alg *hash_alg = vi->tree_params.hash_alg; in fsverity_verify_signature() local
102 d = kzalloc(sizeof(*d) + hash_alg->digest_size, GFP_KERNEL); in fsverity_verify_signature()
106 d->digest_algorithm = cpu_to_le16(hash_alg - fsverity_hash_algs); in fsverity_verify_signature()
107 d->digest_size = cpu_to_le16(hash_alg->digest_size); in fsverity_verify_signature()
108 memcpy(d->digest, vi->measurement, hash_alg->digest_size); in fsverity_verify_signature()
117 err = verify_pkcs7_signature(d, sizeof(*d) + hash_alg->digest_size, in fsverity_verify_signature()
139 hash_alg->name, hash_alg->digest_size, vi->measurement); in fsverity_verify_signature()
Dopen.c36 struct fsverity_hash_alg *hash_alg; in fsverity_init_merkle_tree_params() local
44 hash_alg = fsverity_get_hash_alg(inode, hash_algorithm); in fsverity_init_merkle_tree_params()
45 if (IS_ERR(hash_alg)) in fsverity_init_merkle_tree_params()
46 return PTR_ERR(hash_alg); in fsverity_init_merkle_tree_params()
47 params->hash_alg = hash_alg; in fsverity_init_merkle_tree_params()
48 params->digest_size = hash_alg->digest_size; in fsverity_init_merkle_tree_params()
50 params->hashstate = fsverity_prepare_hash_state(hash_alg, salt, in fsverity_init_merkle_tree_params()
75 params->block_size, hash_alg->name); in fsverity_init_merkle_tree_params()
83 hash_alg->name, params->block_size, params->hashes_per_block, in fsverity_init_merkle_tree_params()
132 static int compute_file_measurement(struct fsverity_hash_alg *hash_alg, in compute_file_measurement() argument
[all …]
Dverify.c64 vi->tree_params.hash_alg->name, hsize, want_hash, in cmp_hashes()
65 vi->tree_params.hash_alg->name, hsize, real_hash); in cmp_hashes()
143 params->hash_alg->name, in verify_page()
154 params->hash_alg->name, hsize, want_hash); in verify_page()
172 level - 1, params->hash_alg->name, hsize, want_hash); in verify_page()
204 req = fsverity_alloc_hash_request(vi->tree_params.hash_alg, GFP_NOFS); in fsverity_verify_page()
208 fsverity_free_hash_request(vi->tree_params.hash_alg, req); in fsverity_verify_page()
241 req = fsverity_alloc_hash_request(params->hash_alg, GFP_NOFS); in fsverity_verify_bio()
269 fsverity_free_hash_request(params->hash_alg, req); in fsverity_verify_bio()
Denable.c197 req = fsverity_alloc_hash_request(params->hash_alg, GFP_KERNEL); in build_merkle_tree()
222 fsverity_free_hash_request(params->hash_alg, req); in build_merkle_tree()
332 params.hash_alg->name, params.digest_size, desc->root_hash); in fsverity_enable_with_descriptor()
Dfsverity_private.h47 struct fsverity_hash_alg *hash_alg; /* the hash algorithm */ member
/kernel/linux/linux-5.10/drivers/crypto/bcm/
Dspu.h55 enum hash_alg { enum
127 enum hash_alg alg;
228 u16 spum_hash_pad_len(enum hash_alg hash_alg, enum hash_mode hash_mode,
238 u32 spum_digest_size(u32 alg_digest_size, enum hash_alg alg,
259 enum hash_alg auth_alg,
Dspu.c34 u32 hash_alg; in spum_dump_msg_hdr() local
81 hash_alg = (cflags & HASH_ALG) >> HASH_ALG_SHIFT; in spum_dump_msg_hdr()
85 hash_alg, hash_mode, hash_type); in spum_dump_msg_hdr()
106 if (hash_alg && hash_mode) { in spum_dump_msg_hdr()
109 switch (hash_alg) { in spum_dump_msg_hdr()
146 } else if ((hash_alg == HASH_ALG_AES) && in spum_dump_msg_hdr()
170 if (hash_alg && (hash_mode == HASH_MODE_NONE) && in spum_dump_msg_hdr()
174 switch (hash_alg) { in spum_dump_msg_hdr()
426 u16 spum_hash_pad_len(enum hash_alg hash_alg, enum hash_mode hash_mode, in spum_hash_pad_len() argument
434 if ((hash_alg == HASH_ALG_AES) && (hash_mode == HASH_MODE_XCBC)) { in spum_hash_pad_len()
[all …]
Dspu2.h180 u16 spu2_hash_pad_len(enum hash_alg hash_alg, enum hash_mode hash_mode,
190 u32 spu2_digest_size(u32 alg_digest_size, enum hash_alg alg,
205 enum hash_alg auth_alg, enum hash_mode auth_mode,
Dcipher.h100 enum hash_alg alg;
366 u16 (*spu_hash_pad_len)(enum hash_alg hash_alg,
377 u32 (*spu_digest_size)(u32 digest_size, enum hash_alg alg,
393 u32 hash_pad_len, enum hash_alg auth_alg,
Dspu2.c234 spu2_hash_xlate(enum hash_alg hash_alg, enum hash_mode hash_mode, in spu2_hash_xlate() argument
246 switch (hash_alg) { in spu2_hash_xlate()
303 hash_alg, hash_type); in spu2_hash_xlate()
841 u16 spu2_hash_pad_len(enum hash_alg hash_alg, enum hash_mode hash_mode, in spu2_hash_pad_len() argument
917 u32 spu2_digest_size(u32 alg_digest_size, enum hash_alg alg, in spu2_digest_size()
1243 enum hash_alg auth_alg, enum hash_mode auth_mode, in spu2_request_pad()
/kernel/linux/linux-5.10/crypto/
Dessiv.c413 struct shash_alg *hash_alg, in essiv_supported_algorithms() argument
425 if (hash_alg->digestsize < alg->cra_cipher.cia_min_keysize || in essiv_supported_algorithms()
426 hash_alg->digestsize > alg->cra_cipher.cia_max_keysize) in essiv_supported_algorithms()
432 if (crypto_shash_alg_needs_key(hash_alg)) in essiv_supported_algorithms()
455 struct shash_alg *hash_alg; in essiv_create() local
538 hash_alg = __crypto_shash_alg(_hash_alg); in essiv_create()
541 if (!essiv_supported_algorithms(ictx->essiv_cipher_name, hash_alg, in essiv_create()
544 block_base->cra_name, hash_alg->base.cra_name); in essiv_create()
550 strlcpy(ictx->shash_driver_name, hash_alg->base.cra_driver_name, in essiv_create()
558 hash_alg->base.cra_name) >= CRYPTO_MAX_ALG_NAME) in essiv_create()
[all …]
Dadiantum.c473 struct shash_alg *hash_alg) in adiantum_supported_algorithms() argument
485 if (strcmp(hash_alg->base.cra_name, "nhpoly1305") != 0) in adiantum_supported_algorithms()
499 struct shash_alg *hash_alg; in adiantum_create() local
536 hash_alg = crypto_spawn_shash_alg(&ictx->hash_spawn); in adiantum_create()
540 hash_alg)) { in adiantum_create()
543 blockcipher_alg->cra_name, hash_alg->base.cra_name); in adiantum_create()
559 hash_alg->base.cra_driver_name) >= CRYPTO_MAX_ALG_NAME) in adiantum_create()
565 hash_alg->base.cra_alignmask; in adiantum_create()
573 2 * hash_alg->base.cra_priority + in adiantum_create()
/kernel/linux/linux-5.10/drivers/char/tpm/
Dtpm2-cmd.c144 __be16 hash_alg; member
543 __be16 hash_alg; member
558 u16 hash_alg; in tpm2_get_pcr_allocation() local
600 hash_alg = be16_to_cpu(pcr_selection.hash_alg); in tpm2_get_pcr_allocation()
605 chip->allocated_banks[nr_alloc_banks].alg_id = hash_alg; in tpm2_get_pcr_allocation()
614 sizeof_pcr_selection = sizeof(pcr_selection.hash_alg) + in tpm2_get_pcr_allocation()
/kernel/linux/linux-5.10/security/keys/trusted-keys/
Dtrusted_tpm1.c33 static const char hash_alg[] = "sha1"; variable
66 pr_info("trusted_key: can't alloc %s\n", hash_alg); in TSS_sha1()
139 pr_info("trusted_key: can't alloc %s\n", hash_alg); in TSS_authhmac()
215 pr_info("trusted_key: can't alloc %s\n", hash_alg); in TSS_checkhmac1()
308 pr_info("trusted_key: can't alloc %s\n", hash_alg); in TSS_checkhmac2()
1226 hashalg = crypto_alloc_shash(hash_alg, 0, 0); in trusted_shash_alloc()
1229 hash_alg); in trusted_shash_alloc()
/kernel/linux/linux-5.10/drivers/crypto/inside-secure/
Dsafexcel_cipher.c62 u32 hash_alg; member
464 switch (ctx->hash_alg) { in safexcel_aead_setkey()
522 ctx->hash_alg | in safexcel_context_control()
532 ctx->hash_alg | in safexcel_context_control()
540 ctx->hash_alg | in safexcel_context_control()
1726 ctx->hash_alg = CONTEXT_CONTROL_CRYPTO_ALG_SHA1; in safexcel_aead_sha1_cra_init()
1762 ctx->hash_alg = CONTEXT_CONTROL_CRYPTO_ALG_SHA256; in safexcel_aead_sha256_cra_init()
1798 ctx->hash_alg = CONTEXT_CONTROL_CRYPTO_ALG_SHA224; in safexcel_aead_sha224_cra_init()
1834 ctx->hash_alg = CONTEXT_CONTROL_CRYPTO_ALG_SHA512; in safexcel_aead_sha512_cra_init()
1870 ctx->hash_alg = CONTEXT_CONTROL_CRYPTO_ALG_SHA384; in safexcel_aead_sha384_cra_init()
[all …]
/kernel/linux/linux-5.10/fs/nfs/
Dnfs4session.h66 u32 hash_alg; member
/kernel/linux/linux-5.10/security/keys/encrypted-keys/
Dencrypted.c40 static const char hash_alg[] = "sha256"; variable
981 hash_tfm = crypto_alloc_shash(hash_alg, 0, 0); in init_encrypted()
984 hash_alg, PTR_ERR(hash_tfm)); in init_encrypted()
/kernel/linux/linux-5.10/drivers/crypto/ux500/hash/
Dhash_core.c1503 struct hash_algo_template *hash_alg; in hash_cra_init() local
1505 hash_alg = container_of(__crypto_ahash_alg(alg), in hash_cra_init()
1513 ctx->config.algorithm = hash_alg->conf.algorithm; in hash_cra_init()
1514 ctx->config.oper_mode = hash_alg->conf.oper_mode; in hash_cra_init()
1516 ctx->digestsize = hash_alg->hash.halg.digestsize; in hash_cra_init()
/kernel/linux/linux-5.10/drivers/crypto/amcc/
Dcrypto4xx_sa.h98 u32 hash_alg:4; member
Dcrypto4xx_alg.c41 sa->sa_command_0.bf.hash_alg = h; in set_dynamic_sa_command_0()
Dcrypto4xx_core.c494 if (sa->sa_command_0.bf.hash_alg == SA_HASH_ALG_SHA1) { in crypto4xx_copy_digest_to_dst()
/kernel/linux/patches/linux-4.19/prebuilts/usr/include/linux/
Dopenvswitch.h377 __u32 hash_alg; member
/kernel/linux/patches/linux-5.10/prebuilts/usr/include/linux/
Dopenvswitch.h384 __u32 hash_alg; member
/kernel/linux/linux-5.10/include/uapi/linux/
Dopenvswitch.h735 __u32 hash_alg; /* One of ovs_hash_alg. */ member

12