Home
last modified time | relevance | path

Searched refs:digest (Results 1 – 25 of 206) sorted by relevance

123456789

/linux-6.1.9/crypto/
Dtestmgr.h41 const char *digest; member
4411 .digest = "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31"
4416 .digest = "\xbd\xe5\x2c\xb3\x1d\xe3\x3e\x46"
4421 .digest = "\xa4\x48\x01\x7a\xaf\x21\xd8\x52"
4426 .digest = "\xd9\x13\x0a\x81\x64\x54\x9f\xe8"
4431 .digest = "\xd7\x9e\x1c\x30\x8a\xa5\xbb\xcd"
4436 .digest = "\x04\x3f\x85\x82\xf2\x41\xdb\x35"
4442 .digest = "\xe3\x3b\x4d\xdc\x9c\x38\xf2\x19"
4450 .digest = "\x6b\x4e\x03\x42\x36\x67\xdb\xb7"
4457 .digest = "\x9e\x86\xff\x69\x55\x7c\xa9\x5f"
[all …]
Decrdsa.c40 const char *digest; /* digest name from oid */ member
76 unsigned char digest[STREEBOG512_DIGEST_SIZE]; in ecrdsa_verify() local
93 !ctx->digest || in ecrdsa_verify()
101 WARN_ON(req->dst_len > sizeof(digest))) in ecrdsa_verify()
109 digest, req->dst_len, req->src_len); in ecrdsa_verify()
123 vli_from_le64(e, digest, ndigits); in ecrdsa_verify()
209 ctx->digest = "streebog256"; in ecrdsa_set_pub_key()
213 ctx->digest = "streebog512"; in ecrdsa_set_pub_key()
Dhctr2.c194 u8 digest[POLYVAL_DIGEST_SIZE]) in hctr2_hash_message()
226 return crypto_shash_final(hash_desc, digest); in hctr2_hash_message()
234 u8 digest[POLYVAL_DIGEST_SIZE]; in hctr2_finish() local
244 err = hctr2_hash_message(req, rctx->bulk_part_dst, digest); in hctr2_finish()
247 crypto_xor(rctx->first_block, digest, BLOCKCIPHER_BLOCK_SIZE); in hctr2_finish()
271 u8 digest[POLYVAL_DIGEST_SIZE]; in hctr2_crypt() local
294 err = hctr2_hash_message(req, rctx->bulk_part_src, digest); in hctr2_crypt()
297 crypto_xor(digest, rctx->first_block, BLOCKCIPHER_BLOCK_SIZE); in hctr2_crypt()
303 digest); in hctr2_crypt()
306 digest); in hctr2_crypt()
[all …]
Dadiantum.c248 struct scatterlist *sgl, le128 *digest) in adiantum_hash_message() argument
278 return crypto_shash_final(hash_desc, (u8 *)digest); in adiantum_hash_message()
288 le128 digest; in adiantum_finish() local
301 err = adiantum_hash_message(req, req->dst, &digest); in adiantum_finish()
304 le128_add(&digest, &digest, &rctx->header_hash); in adiantum_finish()
305 le128_sub(&rctx->rbuf.bignum, &rctx->rbuf.bignum, &digest); in adiantum_finish()
329 le128 digest; in adiantum_crypt() local
343 err = adiantum_hash_message(req, req->src, &digest); in adiantum_crypt()
346 le128_add(&digest, &digest, &rctx->header_hash); in adiantum_crypt()
349 le128_add(&rctx->rbuf.bignum, &rctx->rbuf.bignum, &digest); in adiantum_crypt()
/linux-6.1.9/lib/crypto/
Dsha1.c87 void sha1_transform(__u32 *digest, const char *data, __u32 *array) in sha1_transform() argument
92 A = digest[0]; in sha1_transform()
93 B = digest[1]; in sha1_transform()
94 C = digest[2]; in sha1_transform()
95 D = digest[3]; in sha1_transform()
96 E = digest[4]; in sha1_transform()
118 digest[0] += A; in sha1_transform()
119 digest[1] += B; in sha1_transform()
120 digest[2] += C; in sha1_transform()
121 digest[3] += D; in sha1_transform()
[all …]
/linux-6.1.9/arch/s390/purgatory/
Dpurgatory.c18 u8 digest[SHA256_DIGEST_SIZE]; in verify_sha256_digest() local
27 sha256_final(&sctx, digest); in verify_sha256_digest()
29 if (memcmp(digest, purgatory_sha256_digest, sizeof(digest))) in verify_sha256_digest()
/linux-6.1.9/arch/riscv/purgatory/
Dpurgatory.c24 u8 digest[SHA256_DIGEST_SIZE]; in verify_sha256_digest() local
30 sha256_final(&ss, digest); in verify_sha256_digest()
31 if (memcmp(digest, purgatory_sha256_digest, sizeof(digest)) != 0) in verify_sha256_digest()
/linux-6.1.9/fs/verity/
Dmeasure.c54 if (copy_to_user(uarg->digest, vi->file_digest, hash_alg->digest_size)) in fsverity_ioctl_measure()
74 u8 digest[FS_VERITY_MAX_DIGEST_SIZE], in fsverity_get_digest()
86 memset(digest, 0, FS_VERITY_MAX_DIGEST_SIZE); in fsverity_get_digest()
96 memcpy(digest, vi->file_digest, hash_alg->digest_size); in fsverity_get_digest()
99 hash_digest_size[*alg], digest); in fsverity_get_digest()
/linux-6.1.9/include/crypto/
Dpoly1305.h88 void poly1305_final_arch(struct poly1305_desc_ctx *desc, u8 *digest);
89 void poly1305_final_generic(struct poly1305_desc_ctx *desc, u8 *digest);
91 static inline void poly1305_final(struct poly1305_desc_ctx *desc, u8 *digest) in poly1305_final() argument
94 poly1305_final_arch(desc, digest); in poly1305_final()
96 poly1305_final_generic(desc, digest); in poly1305_final()
/linux-6.1.9/arch/x86/purgatory/
Dpurgatory.c26 u8 digest[SHA256_DIGEST_SIZE]; in verify_sha256_digest() local
35 sha256_final(&sctx, digest); in verify_sha256_digest()
37 if (memcmp(digest, purgatory_sha256_digest, sizeof(digest))) in verify_sha256_digest()
/linux-6.1.9/crypto/asymmetric_keys/
Dpkcs7_verify.c34 if (sig->digest) in pkcs7_digest()
51 sig->digest = kmalloc(sig->digest_size, GFP_KERNEL); in pkcs7_digest()
52 if (!sig->digest) in pkcs7_digest()
63 sig->digest); in pkcs7_digest()
66 pr_devel("MsgDigest = [%*ph]\n", 8, sig->digest); in pkcs7_digest()
88 if (memcmp(sig->digest, sinfo->msgdigest, in pkcs7_digest()
101 memset(sig->digest, 0, sig->digest_size); in pkcs7_digest()
111 sinfo->authattrs_len, sig->digest); in pkcs7_digest()
114 pr_devel("AADigest = [%*ph]\n", 8, sig->digest); in pkcs7_digest()
141 *buf = sinfo->sig->digest; in pkcs7_get_digest()
Dverify_pefile.c324 void *digest; in pefile_digest_pe() local
361 digest = (void *)desc + desc_size; in pefile_digest_pe()
362 ret = crypto_shash_final(desc, digest); in pefile_digest_pe()
366 pr_debug("Digest calc = [%*ph]\n", ctx->digest_len, digest); in pefile_digest_pe()
371 if (memcmp(digest, ctx->digest, ctx->digest_len) != 0) { in pefile_digest_pe()
442 ctx.digest_len, ctx.digest_len, ctx.digest); in verify_pefile_signature()
450 kfree_sensitive(ctx.digest); in verify_pefile_signature()
Dx509_public_key.c58 sig->digest = kmalloc(sig->digest_size, GFP_KERNEL); in x509_get_sig_params()
59 if (!sig->digest) in x509_get_sig_params()
68 ret = crypto_shash_digest(desc, cert->tbs, cert->tbs_size, sig->digest); in x509_get_sig_params()
72 ret = is_hash_blacklisted(sig->digest, sig->digest_size, in x509_get_sig_params()
76 sig->digest_size, sig->digest); in x509_get_sig_params()
/linux-6.1.9/security/integrity/evm/
Devm_main.c176 struct evm_digest digest; in evm_verify_hmac() local
213 digest.hdr.algo = HASH_ALGO_SHA1; in evm_verify_hmac()
215 xattr_value_len, &digest); in evm_verify_hmac()
218 rc = crypto_memneq(xattr_data->data, digest.digest, in evm_verify_hmac()
234 digest.hdr.algo = hdr->hash_algo; in evm_verify_hmac()
236 xattr_value_len, xattr_data->type, &digest); in evm_verify_hmac()
241 digest.digest, digest.hdr.length); in evm_verify_hmac()
271 pr_debug("digest: (%d) [%*phN]\n", digest.hdr.length, digest.hdr.length, in evm_verify_hmac()
272 digest.digest); in evm_verify_hmac()
864 rc = evm_init_hmac(inode, lsm_xattr, xattr_data->digest); in evm_inode_init_security()
/linux-6.1.9/drivers/crypto/inside-secure/
Dsafexcel_hash.c52 u32 digest; member
123 if (unlikely(req->digest == CONTEXT_CONTROL_DIGEST_XCM)) { in safexcel_context_control()
146 cdesc->control_data.control0 |= req->digest | in safexcel_context_control()
152 cdesc->control_data.control0 |= req->digest | in safexcel_context_control()
166 if ((req->digest == CONTEXT_CONTROL_DIGEST_PRECOMPUTED) || in safexcel_context_control()
182 if ((req->digest == CONTEXT_CONTROL_DIGEST_PRECOMPUTED) || in safexcel_context_control()
200 req->digest = CONTEXT_CONTROL_DIGEST_PRECOMPUTED; in safexcel_context_control()
271 (sreq->digest != CONTEXT_CONTROL_DIGEST_HMAC)) { in safexcel_handle_req_result()
292 if (unlikely(sreq->digest == CONTEXT_CONTROL_DIGEST_XCM && in safexcel_handle_req_result()
804 } else if (unlikely(req->digest == CONTEXT_CONTROL_DIGEST_XCM && in safexcel_ahash_final()
[all …]
/linux-6.1.9/security/integrity/ima/
Dima_modsig.c24 const u8 *digest; member
112 rc = pkcs7_get_digest(modsig->pkcs7_msg, &modsig->digest, in ima_collect_modsig()
123 const u8 **digest, u32 *digest_size) in ima_get_modsig_digest() argument
126 *digest = modsig->digest; in ima_get_modsig_digest()
Dima_queue.c58 rc = memcmp(qe->entry->digests[ima_hash_algo_idx].digest, in ima_lookup_digest_entry()
111 key = ima_hash_key(entry->digests[ima_hash_algo_idx].digest); in ima_add_digest_entry()
163 u8 *digest = entry->digests[ima_hash_algo_idx].digest; in ima_add_template_entry() local
172 if (ima_lookup_digest_entry(digest, entry->pcr)) { in ima_add_template_entry()
237 memset(digests[i].digest, 0xff, digest_size); in ima_init_digests()
Dima_crypto.c432 ahash_request_set_crypt(req, NULL, hash->digest, 0); in ima_calc_file_hash_atfm()
503 rc = crypto_shash_final(shash, hash->digest); in ima_calc_file_hash_tfm()
622 rc = crypto_shash_final(shash, entry->digests[tfm_idx].digest); in ima_calc_field_array_hash_tfm()
650 memcpy(entry->digests[i].digest, in ima_calc_field_array_hash()
651 entry->digests[ima_sha1_idx].digest, in ima_calc_field_array_hash()
695 ahash_request_set_crypt(req, NULL, hash->digest, 0); in calc_buffer_ahash_atfm()
746 rc = crypto_shash_final(shash, hash->digest); in calc_buffer_shash_tfm()
800 static int ima_calc_boot_aggregate_tfm(char *digest, u16 alg_id, in ima_calc_boot_aggregate_tfm() argument
803 struct tpm_digest d = { .alg_id = alg_id, .digest = {0} }; in ima_calc_boot_aggregate_tfm()
821 rc = crypto_shash_update(shash, d.digest, in ima_calc_boot_aggregate_tfm()
[all …]
Dima_appraise.c251 enum hash_algo algo, const u8 *digest, in calc_file_id_hash() argument
261 memcpy(file_id.hash, digest, hash_digest_size[algo]); in calc_file_id_hash()
311 iint->ima_hash->digest, in xattr_verify()
341 iint->ima_hash->digest, in xattr_verify()
352 iint->ima_hash->digest, in xattr_verify()
380 iint->ima_hash->digest, &hash.hdr); in xattr_verify()
389 xattr_len, hash.digest, in xattr_verify()
447 const u8 *digest = NULL; in ima_check_blacklist() local
455 ima_get_modsig_digest(modsig, &hash_algo, &digest, &digestsize); in ima_check_blacklist()
457 rc = is_binary_blacklisted(digest, digestsize); in ima_check_blacklist()
[all …]
/linux-6.1.9/drivers/crypto/aspeed/
Daspeed-hace-hash.c156 rctx->digest_dma_addr = dma_map_single(hace_dev->dev, rctx->digest, in aspeed_ahash_dma_prepare()
201 rctx->digest_dma_addr = dma_map_single(hace_dev->dev, rctx->digest, in aspeed_ahash_dma_prepare_sg()
314 memcpy(req->result, rctx->digest, rctx->digsize); in aspeed_ahash_transfer()
377 memcpy(rctx->buffer + rctx->block_size, rctx->digest, rctx->digsize); in aspeed_ahash_hmac_resume()
383 memcpy(rctx->digest, rctx->sha_iv, rctx->ivsize); in aspeed_ahash_hmac_resume()
385 rctx->digest_dma_addr = dma_map_single(hace_dev->dev, rctx->digest, in aspeed_ahash_hmac_resume()
428 rctx->digest, in aspeed_ahash_req_final()
691 memcpy(rctx->digest, sha1_iv, rctx->ivsize); in aspeed_sham_init()
700 memcpy(rctx->digest, sha224_iv, rctx->ivsize); in aspeed_sham_init()
709 memcpy(rctx->digest, sha256_iv, rctx->ivsize); in aspeed_sham_init()
[all …]
/linux-6.1.9/drivers/char/tpm/
Dtpm2-cmd.c149 u8 digest[]; member
162 struct tpm_digest *digest, u16 *digest_size_ptr) in tpm2_pcr_read() argument
177 chip->allocated_banks[i].alg_id != digest->alg_id; i++) in tpm2_pcr_read()
193 tpm_buf_append_u16(&buf, digest->alg_id); in tpm2_pcr_read()
204 if (digest_size > sizeof(digest->digest) || in tpm2_pcr_read()
213 memcpy(digest->digest, out->digest, digest_size); in tpm2_pcr_read()
261 tpm_buf_append(&buf, (const unsigned char *)&digests[i].digest, in tpm2_pcr_extend()
519 struct tpm_digest digest = { .alg_id = bank->alg_id }; in tpm2_init_bank_info() local
539 return tpm2_pcr_read(chip, 0, &digest, &bank->digest_size); in tpm2_init_bank_info()
/linux-6.1.9/security/keys/encrypted-keys/
Dencrypted.h40 static inline void dump_hmac(const char *str, const u8 *digest, in dump_hmac() argument
45 print_hex_dump(KERN_ERR, "hmac: ", DUMP_PREFIX_NONE, 32, 1, digest, in dump_hmac()
62 static inline void dump_hmac(const char *str, const u8 *digest, in dump_hmac() argument
/linux-6.1.9/drivers/block/drbd/
Ddrbd_worker.c287 void drbd_csum_ee(struct crypto_shash *tfm, struct drbd_peer_request *peer_req, void *digest) in drbd_csum_ee() argument
312 crypto_shash_final(desc, digest); in drbd_csum_ee()
316 void drbd_csum_bio(struct crypto_shash *tfm, struct bio *bio, void *digest) in drbd_csum_bio() argument
333 crypto_shash_final(desc, digest); in drbd_csum_bio()
344 void *digest; in w_e_send_csum() local
354 digest = kmalloc(digest_size, GFP_NOIO); in w_e_send_csum()
355 if (digest) { in w_e_send_csum()
358 drbd_csum_ee(peer_device->connection->csums_tfm, peer_req, digest); in w_e_send_csum()
368 digest, digest_size, in w_e_send_csum()
370 kfree(digest); in w_e_send_csum()
[all …]
/linux-6.1.9/Documentation/security/
DIMA-templates.rst65 - 'd': the digest of the event (i.e. the digest of a measured file),
68 - 'd-ng': the digest of the event, calculated with an arbitrary hash
69 algorithm (field format: <hash algo>:digest);
70 - 'd-ngv2': same as d-ng, but prefixed with the "ima" or "verity" digest type
71 (field format: <digest type>:<hash algo>:digest);
72 - 'd-modsig': the digest of the event without the appended modsig;
74 - 'sig': the file signature, based on either the file's/fsverity's digest[1],
/linux-6.1.9/security/integrity/
Dintegrity.h94 u8 digest[SHA1_DIGEST_SIZE]; member
113 u8 digest[]; member
122 u8 digest[HASH_MAX_DIGESTSIZE]; member
197 const char *digest, int digestlen);
208 const char *digest, int digestlen) in integrity_digsig_verify() argument

123456789