Searched refs:hash_alg (Results 1 – 9 of 9) sorted by relevance
/fs/verity/ |
D | signature.c | 44 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() 100 d = kzalloc(sizeof(*d) + hash_alg->digest_size, GFP_KERNEL); in __fsverity_verify_signature() 104 d->digest_algorithm = cpu_to_le16(hash_alg - fsverity_hash_algs); in __fsverity_verify_signature() 105 d->digest_size = cpu_to_le16(hash_alg->digest_size); in __fsverity_verify_signature() 106 memcpy(d->digest, file_digest, hash_alg->digest_size); in __fsverity_verify_signature() 108 err = verify_pkcs7_signature(d, sizeof(*d) + hash_alg->digest_size, in __fsverity_verify_signature() 129 hash_alg->name, hash_alg->digest_size, file_digest); in __fsverity_verify_signature()
|
D | measure.c | 28 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()
|
D | open.c | 34 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 …]
|
D | verify.c | 64 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()
|
D | enable.c | 169 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()
|
D | fsverity_private.h | 46 struct fsverity_hash_alg *hash_alg; /* the hash algorithm */ member
|
/fs/incfs/ |
D | integrity.c | 136 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()
|
D | verity.c | 142 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()
|
/fs/nfs/ |
D | nfs4session.h | 66 u32 hash_alg; member
|