• Home
  • Raw
  • Download

Lines Matching refs:block_size

30 			   u32 block_size, const u8 *salt, u32 salt_size)  in hash_one_block()  argument
35 memset(&cur->data[cur->filled], 0, block_size - cur->filled); in hash_one_block()
39 libfsverity_hash_update(hash, cur->data, block_size); in hash_one_block()
45 return next->filled + hash->alg->digest_size > block_size; in hash_one_block()
54 u32 block_size, const u8 *salt, u32 salt_size, in compute_root_hash() argument
57 const u32 hashes_per_block = block_size / hash->alg->digest_size; in compute_root_hash()
58 const u32 padded_salt_size = roundup(salt_size, hash->alg->block_size); in compute_root_hash()
82 for (blocks = DIV_ROUND_UP(file_size, block_size); blocks > 1; in compute_root_hash()
97 buffers[level].data = libfsverity_zalloc(block_size); in compute_root_hash()
106 for (offset = 0; offset < file_size; offset += block_size) { in compute_root_hash()
107 buffers[-1].filled = min(block_size, file_size - offset); in compute_root_hash()
116 while (hash_one_block(hash, &buffers[level], block_size, in compute_root_hash()
128 hash_one_block(hash, &buffers[level], block_size, in compute_root_hash()
151 u32 block_size; in libfsverity_compute_digest() local
169 block_size = params->block_size ?: FS_VERITY_BLOCK_SIZE_DEFAULT; in libfsverity_compute_digest()
171 if (!is_power_of_2(block_size)) { in libfsverity_compute_digest()
173 block_size); in libfsverity_compute_digest()
199 if (block_size < 2 * hash_alg->digest_size) { in libfsverity_compute_digest()
201 block_size, hash_alg->name); in libfsverity_compute_digest()
212 desc.log_blocksize = ilog2(block_size); in libfsverity_compute_digest()
220 block_size, params->salt, in libfsverity_compute_digest()