Home
last modified time | relevance | path

Searched refs:digest_size (Results 1 – 25 of 64) sorted by relevance

123

/linux/fs/verity/
A Dmeasure.c42 if (get_user(arg.digest_size, &uarg->digest_size)) in fsverity_ioctl_measure()
44 if (arg.digest_size < hash_alg->digest_size) 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()
A Dsignature.c57 d = kzalloc(sizeof(*d) + hash_alg->digest_size, GFP_KERNEL); in fsverity_verify_signature()
62 d->digest_size = cpu_to_le16(hash_alg->digest_size); in fsverity_verify_signature()
63 memcpy(d->digest, vi->file_digest, hash_alg->digest_size); in fsverity_verify_signature()
65 err = verify_pkcs7_signature(d, sizeof(*d) + hash_alg->digest_size, in fsverity_verify_signature()
86 hash_alg->name, hash_alg->digest_size, vi->file_digest); in fsverity_verify_signature()
A Dopen.c46 params->digest_size = hash_alg->digest_size; in fsverity_init_merkle_tree_params()
66 if (WARN_ON(!is_power_of_2(params->digest_size))) { in fsverity_init_merkle_tree_params()
70 if (params->block_size < 2 * params->digest_size) { in fsverity_init_merkle_tree_params()
77 params->log_arity = params->log_blocksize - ilog2(params->digest_size); in fsverity_init_merkle_tree_params()
172 memcpy(vi->root_hash, desc->root_hash, vi->tree_params.digest_size); in fsverity_create_info()
182 vi->tree_params.digest_size, vi->file_digest); in fsverity_create_info()
A Dhash_algs.c17 .digest_size = SHA256_DIGEST_SIZE,
22 .digest_size = SHA512_DIGEST_SIZE,
85 if (WARN_ON(alg->digest_size != crypto_ahash_digestsize(tfm))) in fsverity_get_hash_alg()
318 BUG_ON(alg->digest_size > FS_VERITY_MAX_DIGEST_SIZE); in fsverity_check_hash_algs()
325 BUG_ON(!is_power_of_2(alg->digest_size)); in fsverity_check_hash_algs()
A Denable.c112 pending_size += params->digest_size; in build_merkle_tree_level()
117 if (pending_size + params->digest_size > params->block_size || in build_merkle_tree_level()
164 memset(root_hash, 0, params->digest_size); in build_merkle_tree()
190 memcpy(root_hash, pending_hashes, params->digest_size); in build_merkle_tree()
275 params.hash_alg->name, params.digest_size, desc->root_hash); in enable_verity()
/linux/drivers/target/iscsi/
A Discsi_target_auth.c162 chap->digest_size = MD5_SIGNATURE_SIZE; in chap_server_open()
165 chap->digest_size = SHA1_SIGNATURE_SIZE; in chap_server_open()
168 chap->digest_size = SHA256_SIGNATURE_SIZE; in chap_server_open()
171 chap->digest_size = SHA3_256_SIGNATURE_SIZE; in chap_server_open()
183 chap->challenge_len = chap->digest_size; in chap_server_open()
231 digest = kzalloc(chap->digest_size, GFP_KERNEL); in chap_server_compute_hash()
243 client_digest = kzalloc(chap->digest_size, GFP_KERNEL); in chap_server_compute_hash()
249 server_digest = kzalloc(chap->digest_size, GFP_KERNEL); in chap_server_compute_hash()
302 if (strlen(chap_r) != chap->digest_size * 2) { in chap_server_compute_hash()
354 bin2hex(response, server_digest, chap->digest_size); in chap_server_compute_hash()
[all …]
/linux/arch/arm64/crypto/
A Dsha3-ce-glue.c38 unsigned int digest_size = crypto_shash_digestsize(desc->tfm); in sha3_update() local
51 sha3_ce_transform(sctx->st, sctx->buf, 1, digest_size); in sha3_update()
67 digest_size); in sha3_update()
84 unsigned int digest_size = crypto_shash_digestsize(desc->tfm); in sha3_final() local
96 sha3_ce_transform(sctx->st, sctx->buf, 1, digest_size); in sha3_final()
99 for (i = 0; i < digest_size / 8; i++) in sha3_final()
102 if (digest_size & 4) in sha3_final()
/linux/security/integrity/ima/
A Dima_modsig.c25 u32 digest_size; member
113 &modsig->digest_size, &modsig->hash_algo); in ima_collect_modsig()
123 const u8 **digest, u32 *digest_size) in ima_get_modsig_digest() argument
127 *digest_size = modsig->digest_size; in ima_get_modsig_digest()
A Dima_queue.c216 u16 digest_size; in ima_init_digests() local
230 digest_size = ima_tpm_chip->allocated_banks[i].digest_size; in ima_init_digests()
235 digest_size = SHA1_DIGEST_SIZE; in ima_init_digests()
237 memset(digests[i].digest, 0xff, digest_size); in ima_init_digests()
/linux/drivers/char/tpm/
A Dtpm2-cmd.c148 __be16 digest_size; member
169 u16 digest_size; in tpm2_pcr_read() local
183 expected_digest_size = chip->allocated_banks[i].digest_size; in tpm2_pcr_read()
203 digest_size = be16_to_cpu(out->digest_size); in tpm2_pcr_read()
204 if (digest_size > sizeof(digest->digest) || in tpm2_pcr_read()
205 (!digest_size_ptr && digest_size != expected_digest_size)) { in tpm2_pcr_read()
211 *digest_size_ptr = digest_size; in tpm2_pcr_read()
213 memcpy(digest->digest, out->digest, digest_size); in tpm2_pcr_read()
262 chip->allocated_banks[i].digest_size); in tpm2_pcr_extend()
523 bank->digest_size = hash_digest_size[crypto_algo]; in tpm2_init_bank_info()
[all …]
A Dtpm-sysfs.c356 int digest_size = 0; in pcr_value_show() local
362 digest_size = chip->allocated_banks[i].digest_size; in pcr_value_show()
364 if (!digest_size) in pcr_value_show()
371 for (i = 0; i < digest_size; i++) in pcr_value_show()
/linux/drivers/crypto/ccp/
A Dccp-crypto-sha.c32 unsigned int digest_size = crypto_ahash_digestsize(tfm); in ccp_sha_complete() local
50 memcpy(req->result, rctx->ctx, digest_size); in ccp_sha_complete()
278 unsigned int digest_size = crypto_shash_digestsize(shash); in ccp_sha_setkey() local
296 key_len = digest_size; in ccp_sha_setkey()
364 u32 digest_size; member
374 .digest_size = SHA1_DIGEST_SIZE,
382 .digest_size = SHA224_DIGEST_SIZE,
390 .digest_size = SHA256_DIGEST_SIZE,
398 .digest_size = SHA384_DIGEST_SIZE,
406 .digest_size = SHA512_DIGEST_SIZE,
[all …]
/linux/drivers/md/
A Ddm-verity.h54 unsigned digest_size; /* digest size for the current hash algorithm */ member
111 return (u8 *)(io + 1) + v->ahash_reqsize + v->digest_size; in verity_io_want_digest()
117 return verity_io_want_digest(v, io) + v->digest_size; in verity_io_digest_end()
A Ddm-verity-target.c206 *offset = idx * v->digest_size; in verity_hash_at_level()
308 v->digest_size) == 0)) in verity_verify_level()
323 memcpy(want_digest, data, v->digest_size); in verity_verify_level()
353 memcpy(digest, v->root_digest, v->digest_size); in verity_hash_for_block()
739 for (x = 0; x < v->digest_size; x++) in verity_status()
795 for (x = 0; x < v->digest_size; x++) in verity_status()
923 v->zero_digest = kmalloc(v->digest_size, GFP_KERNEL); in verity_alloc_zero_digest()
1175 v->digest_size = crypto_ahash_digestsize(v->tfm); in verity_ctr()
1184 v->root_digest = kmalloc(v->digest_size, GFP_KERNEL); in verity_ctr()
1190 if (strlen(argv[8]) != v->digest_size * 2 || in verity_ctr()
[all …]
/linux/crypto/asymmetric_keys/
A Dverify_pefile.c323 size_t digest_size, desc_size; in pefile_digest_pe() local
337 digest_size = crypto_shash_digestsize(tfm); in pefile_digest_pe()
339 if (digest_size != ctx->digest_len) { in pefile_digest_pe()
341 digest_size, ctx->digest_len); in pefile_digest_pe()
345 pr_debug("Digest: desc=%zu size=%zu\n", desc_size, digest_size); in pefile_digest_pe()
348 desc = kzalloc(desc_size + digest_size, GFP_KERNEL); in pefile_digest_pe()
A Dx509_public_key.c67 sig->digest_size = crypto_shash_digestsize(tfm); in x509_get_sig_params()
70 sig->digest = kmalloc(sig->digest_size, GFP_KERNEL); in x509_get_sig_params()
84 ret = is_hash_blacklisted(sig->digest, sig->digest_size, "tbs"); in x509_get_sig_params()
87 sig->digest_size, sig->digest); in x509_get_sig_params()
A Dpkcs7_verify.c48 sig->digest_size = crypto_shash_digestsize(tfm); in pkcs7_digest()
51 sig->digest = kmalloc(sig->digest_size, GFP_KERNEL); in pkcs7_digest()
81 if (sinfo->msgdigest_len != sig->digest_size) { in pkcs7_digest()
101 memset(sig->digest, 0, sig->digest_size); in pkcs7_digest()
142 *len = sinfo->sig->digest_size; in pkcs7_get_digest()
/linux/include/crypto/
A Dsha256_base.h101 unsigned int digest_size = crypto_shash_digestsize(desc->tfm); in sha256_base_finish() local
106 for (i = 0; digest_size > 0; i++, digest_size -= sizeof(__be32)) in sha256_base_finish()
A Dsha512_base.h122 unsigned int digest_size = crypto_shash_digestsize(desc->tfm); in sha512_base_finish() local
127 for (i = 0; digest_size > 0; i++, digest_size -= sizeof(__be64)) in sha512_base_finish()
/linux/crypto/
A Dsha3_generic.c164 unsigned int digest_size = crypto_shash_digestsize(desc->tfm); in crypto_sha3_init() local
166 sctx->rsiz = 200 - 2 * digest_size; in crypto_sha3_init()
217 unsigned int digest_size = crypto_shash_digestsize(desc->tfm); in crypto_sha3_final() local
229 for (i = 0; i < digest_size / 8; i++) in crypto_sha3_final()
232 if (digest_size & 4) in crypto_sha3_final()
A Dblake2s_generic.c26 #define BLAKE2S_ALG(name, driver_name, digest_size) \ argument
35 .digestsize = digest_size, \
/linux/drivers/block/drbd/
A Ddrbd_worker.c348 int digest_size; in w_e_send_csum() local
359 digest = kmalloc(digest_size, GFP_NOIO); in w_e_send_csum()
373 digest, digest_size, in w_e_send_csum()
1174 int digest_size; in w_e_end_csum_rs_req() local
1197 D_ASSERT(device, digest_size == di->digest_size); in w_e_end_csum_rs_req()
1239 int digest_size; in w_e_end_ov_req() local
1247 digest = kmalloc(digest_size, GFP_NOIO); in w_e_end_ov_req()
1256 memset(digest, 0, digest_size); in w_e_end_ov_req()
1298 int digest_size; in w_e_end_ov_reply() local
1319 digest = kmalloc(digest_size, GFP_NOIO); in w_e_end_ov_reply()
[all …]
/linux/include/uapi/linux/
A Dfsverity.h33 __u16 digest_size; /* input/output */ member
82 __le16 digest_size; member
/linux/arch/arm/crypto/
A Dblake2s-glue.c27 #define BLAKE2S_ALG(name, driver_name, digest_size) \ argument
36 .digestsize = digest_size, \
A Dblake2b-neon-glue.c53 #define BLAKE2B_ALG(name, driver_name, digest_size) \ argument
62 .digestsize = digest_size, \

Completed in 39 milliseconds

123