Lines Matching full:hash
3 * fs-verity hash algorithms
10 #include <crypto/hash.h>
12 /* The hash algorithms supported by fs-verity */
33 * fsverity_get_hash_alg() - validate and prepare a hash algorithm
35 * @num: the hash algorithm number
37 * Get the struct fsverity_hash_alg for the given hash algorithm number, and
38 * ensure it has a hash transform ready to go. The hash transforms are
42 * Return: pointer to the hash alg on success, else an ERR_PTR()
53 fsverity_warn(inode, "Unknown hash algorithm number: %u", num); in fsverity_get_hash_alg()
71 "Missing crypto API support for hash algorithm \"%s\"", in fsverity_get_hash_alg()
77 "Error allocating hash algorithm \"%s\": %ld", in fsverity_get_hash_alg()
105 * fsverity_prepare_hash_state() - precompute the initial hash state
106 * @alg: hash algorithm
111 * initial hash state on success or an ERR_PTR() on failure.
132 * Zero-pad the salt to the next multiple of the input size of the hash in fsverity_prepare_hash_state()
134 * bytes for SHA-512. This ensures that the hash algorithm won't have in fsverity_prepare_hash_state()
167 * fsverity_hash_block() - hash a single data or hash block
170 * @data: virtual address of a buffer containing the block to hash
173 * Hash a single data or hash block. The hash is salted if a salt is specified
190 "Error %d importing hash state", err); in fsverity_hash_block()
198 fsverity_err(inode, "Error %d computing block hash", err); in fsverity_hash_block()
203 * fsverity_hash_buffer() - hash some data
204 * @alg: the hash algorithm to use
205 * @data: the data to hash
206 * @size: size of data to hash, in bytes
222 * Sanity check the hash algorithms (could be a build-time check, but in fsverity_check_hash_algs()