Lines Matching full:hash
3 * fs/verity/hash_algs.c: fs-verity hash algorithms
10 #include <crypto/hash.h>
13 /* The hash algorithms supported by fs-verity */
30 * fsverity_get_hash_alg() - validate and prepare a hash algorithm
32 * @num: the hash algorithm number
34 * Get the struct fsverity_hash_alg for the given hash algorithm number, and
35 * ensure it has a hash transform ready to go. The hash transforms are
39 * Return: pointer to the hash alg on success, else an ERR_PTR()
50 fsverity_warn(inode, "Unknown hash algorithm number: %u", num); in fsverity_get_hash_alg()
72 "Missing crypto API support for hash algorithm \"%s\"", in fsverity_get_hash_alg()
78 "Error allocating hash algorithm \"%s\": %ld", in fsverity_get_hash_alg()
112 * fsverity_alloc_hash_request() - allocate a hash request object
113 * @alg: the hash algorithm for which to allocate the request
134 * fsverity_free_hash_request() - free a hash request object
135 * @alg: the hash algorithm
136 * @req: the hash request object to free
148 * fsverity_prepare_hash_state() - precompute the initial hash state
149 * @alg: hash algorithm
154 * initial hash state on success or an ERR_PTR() on failure.
178 * Zero-pad the salt to the next multiple of the input size of the hash in fsverity_prepare_hash_state()
180 * bytes for SHA-512. This ensures that the hash algorithm won't have in fsverity_prepare_hash_state()
221 * fsverity_hash_page() - hash a single data or hash page
224 * @req: preallocated hash request
225 * @page: the page to hash
228 * Hash a single data or hash block, assuming block_size == PAGE_SIZE.
229 * The hash is salted if a salt is specified in the Merkle tree parameters.
255 "Error %d importing hash state", err); in fsverity_hash_page()
265 fsverity_err(inode, "Error %d computing page hash", err); in fsverity_hash_page()
270 * fsverity_hash_buffer() - hash some data
271 * @alg: the hash algorithm to use
272 * @data: the data to hash
273 * @size: size of data to hash, in bytes
276 * Hash some data which is located in physically contiguous memory (i.e. memory
309 * Sanity check the hash algorithms (could be a build-time check, but in fsverity_check_hash_algs()