Home
last modified time | relevance | path

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

12

/OK3568_Linux_fs/kernel/fs/verity/
H A Dsignature.c44 vi->tree_params.hash_alg - fsverity_hash_algs; in fsverity_verify_signature()
68 struct fsverity_hash_alg *hash_alg = fsverity_get_hash_alg(inode, in __fsverity_verify_signature() local
72 if (IS_ERR(hash_alg)) in __fsverity_verify_signature()
73 return PTR_ERR(hash_alg); in __fsverity_verify_signature()
84 d = kzalloc(sizeof(*d) + hash_alg->digest_size, GFP_KERNEL); in __fsverity_verify_signature()
88 d->digest_algorithm = cpu_to_le16(hash_alg - fsverity_hash_algs); in __fsverity_verify_signature()
89 d->digest_size = cpu_to_le16(hash_alg->digest_size); in __fsverity_verify_signature()
90 memcpy(d->digest, file_digest, hash_alg->digest_size); in __fsverity_verify_signature()
92 err = verify_pkcs7_signature(d, sizeof(*d) + hash_alg->digest_size, in __fsverity_verify_signature()
113 hash_alg->name, hash_alg->digest_size, file_digest); in __fsverity_verify_signature()
H A 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->file_digest, hash_alg->digest_size)) in fsverity_ioctl_measure()
H A Dopen.c34 struct fsverity_hash_alg *hash_alg; in fsverity_init_merkle_tree_params() local
42 hash_alg = fsverity_get_hash_alg(inode, hash_algorithm); in fsverity_init_merkle_tree_params()
43 if (IS_ERR(hash_alg)) in fsverity_init_merkle_tree_params()
44 return PTR_ERR(hash_alg); in fsverity_init_merkle_tree_params()
45 params->hash_alg = hash_alg; in fsverity_init_merkle_tree_params()
46 params->digest_size = hash_alg->digest_size; in fsverity_init_merkle_tree_params()
48 params->hashstate = fsverity_prepare_hash_state(hash_alg, salt, in fsverity_init_merkle_tree_params()
73 params->block_size, hash_alg->name); in fsverity_init_merkle_tree_params()
81 hash_alg->name, params->block_size, params->hashes_per_block, in fsverity_init_merkle_tree_params()
130 static int compute_file_digest(struct fsverity_hash_alg *hash_alg, in compute_file_digest() argument
[all …]
H A 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()
136 params->hash_alg->name, in verify_page()
147 params->hash_alg->name, hsize, want_hash); in verify_page()
165 level - 1, params->hash_alg->name, hsize, want_hash); in verify_page()
197 req = fsverity_alloc_hash_request(vi->tree_params.hash_alg, GFP_NOFS); in fsverity_verify_page()
201 fsverity_free_hash_request(vi->tree_params.hash_alg, req); in fsverity_verify_page()
234 req = fsverity_alloc_hash_request(params->hash_alg, GFP_NOFS); in fsverity_verify_bio()
262 fsverity_free_hash_request(params->hash_alg, req); in fsverity_verify_bio()
H A Denable.c169 req = fsverity_alloc_hash_request(params->hash_alg, GFP_KERNEL); in build_merkle_tree()
194 fsverity_free_hash_request(params->hash_alg, req); in build_merkle_tree()
275 params.hash_alg->name, params.digest_size, desc->root_hash); in enable_verity()
H A Dfsverity_private.h46 struct fsverity_hash_alg *hash_alg; /* the hash algorithm */ member
/OK3568_Linux_fs/kernel/fs/incfs/
H A Dintegrity.c136 struct incfs_hash_alg *hash_alg = NULL; in incfs_alloc_mtree() local
150 hash_alg = incfs_get_hash_alg(si.hash_algorithm); in incfs_alloc_mtree()
151 if (IS_ERR(hash_alg)) in incfs_alloc_mtree()
152 return ERR_PTR(PTR_ERR(hash_alg)); in incfs_alloc_mtree()
154 if (si.root_hash.len < hash_alg->digest_size) in incfs_alloc_mtree()
161 result->alg = hash_alg; in incfs_alloc_mtree()
194 memcpy(result->root_hash, si.root_hash.data, hash_alg->digest_size); in incfs_alloc_mtree()
H A Dverity.c142 int hash_alg) in incfs_convert_fsverity_hash_alg() argument
144 switch (hash_alg) { in incfs_convert_fsverity_hash_alg()
217 struct incfs_hash_alg *hash_alg; in incfs_calc_verity_digest_from_desc() local
223 hash_alg = incfs_get_hash_alg(incfs_hash_alg); in incfs_calc_verity_digest_from_desc()
224 if (IS_ERR(hash_alg)) in incfs_calc_verity_digest_from_desc()
225 return range((u8 *)hash_alg, 0); in incfs_calc_verity_digest_from_desc()
227 verity_file_digest = range(kzalloc(hash_alg->digest_size, GFP_KERNEL), in incfs_calc_verity_digest_from_desc()
228 hash_alg->digest_size); in incfs_calc_verity_digest_from_desc()
232 err = incfs_compute_file_digest(hash_alg, desc, in incfs_calc_verity_digest_from_desc()
239 hash_alg->name, (int) verity_file_digest.len, in incfs_calc_verity_digest_from_desc()
/OK3568_Linux_fs/kernel/drivers/crypto/bcm/
H A 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,
H A 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 …]
H A 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,
H A 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,
H A 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()
/OK3568_Linux_fs/kernel/crypto/
H A Dessiv.c409 struct shash_alg *hash_alg, in essiv_supported_algorithms() argument
421 if (hash_alg->digestsize < alg->cra_cipher.cia_min_keysize || in essiv_supported_algorithms()
422 hash_alg->digestsize > alg->cra_cipher.cia_max_keysize) in essiv_supported_algorithms()
428 if (crypto_shash_alg_needs_key(hash_alg)) in essiv_supported_algorithms()
451 struct shash_alg *hash_alg; in essiv_create() local
534 hash_alg = __crypto_shash_alg(_hash_alg); in essiv_create()
537 if (!essiv_supported_algorithms(ictx->essiv_cipher_name, hash_alg, in essiv_create()
540 block_base->cra_name, hash_alg->base.cra_name); in essiv_create()
546 strlcpy(ictx->shash_driver_name, hash_alg->base.cra_driver_name, in essiv_create()
554 hash_alg->base.cra_name) >= CRYPTO_MAX_ALG_NAME) in essiv_create()
[all …]
H A Dadiantum.c474 struct shash_alg *hash_alg) in adiantum_supported_algorithms() argument
486 if (strcmp(hash_alg->base.cra_name, "nhpoly1305") != 0) in adiantum_supported_algorithms()
500 struct shash_alg *hash_alg; in adiantum_create() local
537 hash_alg = crypto_spawn_shash_alg(&ictx->hash_spawn); in adiantum_create()
541 hash_alg)) { in adiantum_create()
544 blockcipher_alg->cra_name, hash_alg->base.cra_name); in adiantum_create()
560 hash_alg->base.cra_driver_name) >= CRYPTO_MAX_ALG_NAME) in adiantum_create()
566 hash_alg->base.cra_alignmask; in adiantum_create()
574 2 * hash_alg->base.cra_priority + in adiantum_create()
/OK3568_Linux_fs/kernel/drivers/char/tpm/
H A 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()
/OK3568_Linux_fs/kernel/security/keys/trusted-keys/
H A 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()
/OK3568_Linux_fs/kernel/drivers/crypto/inside-secure/
H A 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 …]
/OK3568_Linux_fs/kernel/fs/nfs/
H A Dnfs4session.h66 u32 hash_alg; member
/OK3568_Linux_fs/kernel/drivers/crypto/ux500/hash/
H A 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()
/OK3568_Linux_fs/kernel/security/keys/encrypted-keys/
H A 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()
/OK3568_Linux_fs/external/security/rk_tee_user/v2/export-ta_arm64/include/mbedtls/
H A Dpk.h874 psa_algorithm_t hash_alg );
/OK3568_Linux_fs/external/security/rk_tee_user/v2/export-ta_arm64/host_include/mbedtls/
H A Dpk.h874 psa_algorithm_t hash_alg );
/OK3568_Linux_fs/external/security/rk_tee_user/v2/export-ta_arm32/host_include/mbedtls/
H A Dpk.h874 psa_algorithm_t hash_alg );
/OK3568_Linux_fs/external/security/rk_tee_user/v2/export-ta_arm32/include/mbedtls/
H A Dpk.h874 psa_algorithm_t hash_alg );

12