/linux-6.6.21/crypto/ |
D | testmgr.h | 41 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 …]
|
D | ecrdsa.c | 40 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()
|
D | hctr2.c | 194 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() 270 u8 digest[POLYVAL_DIGEST_SIZE]; in hctr2_crypt() local 293 err = hctr2_hash_message(req, rctx->bulk_part_src, digest); in hctr2_crypt() 296 crypto_xor(digest, rctx->first_block, BLOCKCIPHER_BLOCK_SIZE); in hctr2_crypt() 302 digest); in hctr2_crypt() 305 digest); in hctr2_crypt() [all …]
|
D | adiantum.c | 248 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() 328 le128 digest; in adiantum_crypt() local 342 err = adiantum_hash_message(req, req->src, &digest); in adiantum_crypt() 345 le128_add(&digest, &digest, &rctx->header_hash); in adiantum_crypt() 348 le128_add(&rctx->rbuf.bignum, &rctx->rbuf.bignum, &digest); in adiantum_crypt()
|
/linux-6.6.21/lib/crypto/ |
D | sha1.c | 87 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.6.21/arch/s390/purgatory/ |
D | purgatory.c | 18 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.6.21/arch/riscv/purgatory/ |
D | purgatory.c | 24 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.6.21/include/crypto/ |
D | poly1305.h | 88 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.6.21/arch/x86/purgatory/ |
D | purgatory.c | 27 u8 digest[SHA256_DIGEST_SIZE]; in verify_sha256_digest() local 36 sha256_final(&sctx, digest); in verify_sha256_digest() 38 if (memcmp(digest, purgatory_sha256_digest, sizeof(digest))) in verify_sha256_digest()
|
/linux-6.6.21/crypto/asymmetric_keys/ |
D | pkcs7_verify.c | 34 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()
|
D | x509_public_key.c | 57 sig->digest = kmalloc(sig->digest_size, GFP_KERNEL); in x509_get_sig_params() 58 if (!sig->digest) in x509_get_sig_params() 71 cert->pub->keylen, sig->digest) ?: in x509_get_sig_params() 73 crypto_shash_update(desc, sig->digest, in x509_get_sig_params() 76 sig->digest); in x509_get_sig_params() 79 sig->digest); in x509_get_sig_params() 85 ret = is_hash_blacklisted(sig->digest, sig->digest_size, in x509_get_sig_params() 89 sig->digest_size, sig->digest); in x509_get_sig_params()
|
D | verify_pefile.c | 328 void *digest; in pefile_digest_pe() local 365 digest = (void *)desc + desc_size; in pefile_digest_pe() 366 ret = crypto_shash_final(desc, digest); in pefile_digest_pe() 370 pr_debug("Digest calc = [%*ph]\n", ctx->digest_len, digest); in pefile_digest_pe() 375 if (memcmp(digest, ctx->digest, ctx->digest_len) != 0) { in pefile_digest_pe() 446 ctx.digest_len, ctx.digest_len, ctx.digest); in verify_pefile_signature() 454 kfree_sensitive(ctx.digest); in verify_pefile_signature()
|
/linux-6.6.21/security/integrity/evm/ |
D | evm_main.c | 177 struct evm_digest digest; in evm_verify_hmac() local 214 digest.hdr.algo = HASH_ALGO_SHA1; in evm_verify_hmac() 216 xattr_value_len, &digest); in evm_verify_hmac() 219 rc = crypto_memneq(xattr_data->data, digest.digest, in evm_verify_hmac() 235 digest.hdr.algo = hdr->hash_algo; in evm_verify_hmac() 237 xattr_value_len, xattr_data->type, &digest); in evm_verify_hmac() 242 digest.digest, digest.hdr.length); in evm_verify_hmac() 272 pr_debug("digest: (%d) [%*phN]\n", digest.hdr.length, digest.hdr.length, in evm_verify_hmac() 273 digest.digest); in evm_verify_hmac() 910 rc = evm_init_hmac(inode, xattrs, xattr_data->digest); in evm_inode_init_security()
|
/linux-6.6.21/drivers/crypto/inside-secure/ |
D | safexcel_hash.c | 52 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.6.21/security/integrity/ima/ |
D | ima_modsig.c | 24 const u8 *digest; member 115 rc = pkcs7_get_digest(modsig->pkcs7_msg, &modsig->digest, in ima_collect_modsig() 126 const u8 **digest, u32 *digest_size) in ima_get_modsig_digest() argument 129 *digest = modsig->digest; in ima_get_modsig_digest()
|
D | ima_queue.c | 58 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()
|
D | ima_appraise.c | 254 enum hash_algo algo, const u8 *digest, in calc_file_id_hash() argument 264 memcpy(file_id.hash, digest, hash_digest_size[algo]); in calc_file_id_hash() 314 iint->ima_hash->digest, in xattr_verify() 344 iint->ima_hash->digest, in xattr_verify() 355 iint->ima_hash->digest, in xattr_verify() 383 iint->ima_hash->digest, &hash.hdr); in xattr_verify() 392 xattr_len, hash.digest, in xattr_verify() 450 const u8 *digest = NULL; in ima_check_blacklist() local 458 ima_get_modsig_digest(modsig, &hash_algo, &digest, &digestsize); in ima_check_blacklist() 460 rc = is_binary_blacklisted(digest, digestsize); in ima_check_blacklist() [all …]
|
D | ima_crypto.c | 432 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 …]
|
D | ima.h | 153 void ima_print_digest(struct seq_file *m, u8 *digest, u32 size); 183 static inline unsigned int ima_hash_key(u8 *digest) in ima_hash_key() argument 186 return (digest[0] | digest[1] << 8) % IMA_MEASURE_HTABLE_SIZE; in ima_hash_key() 276 bool buf_hash, u8 *digest, size_t digest_len); 389 const u8 **digest, u32 *digest_size); 406 enum hash_algo *algo, const u8 **digest, in ima_get_modsig_digest() argument
|
/linux-6.6.21/drivers/char/tpm/ |
D | tpm2-cmd.c | 149 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.6.21/security/keys/encrypted-keys/ |
D | encrypted.h | 40 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.6.21/drivers/crypto/aspeed/ |
D | aspeed-hace-hash.c | 145 rctx->digest_dma_addr = dma_map_single(hace_dev->dev, rctx->digest, in aspeed_ahash_dma_prepare() 190 rctx->digest_dma_addr = dma_map_single(hace_dev->dev, rctx->digest, in aspeed_ahash_dma_prepare_sg() 303 memcpy(req->result, rctx->digest, rctx->digsize); in aspeed_ahash_transfer() 366 memcpy(rctx->buffer + rctx->block_size, rctx->digest, rctx->digsize); in aspeed_ahash_hmac_resume() 372 memcpy(rctx->digest, rctx->sha_iv, rctx->ivsize); in aspeed_ahash_hmac_resume() 374 rctx->digest_dma_addr = dma_map_single(hace_dev->dev, rctx->digest, in aspeed_ahash_hmac_resume() 417 rctx->digest, in aspeed_ahash_req_final() 684 memcpy(rctx->digest, sha1_iv, rctx->ivsize); in aspeed_sham_init() 693 memcpy(rctx->digest, sha224_iv, rctx->ivsize); in aspeed_sham_init() 702 memcpy(rctx->digest, sha256_iv, rctx->ivsize); in aspeed_sham_init() [all …]
|
/linux-6.6.21/Documentation/security/ |
D | IMA-templates.rst | 65 - '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.6.21/security/integrity/ |
D | integrity.h | 94 u8 digest[SHA1_DIGEST_SIZE]; member 113 u8 digest[]; member 122 u8 digest[HASH_MAX_DIGESTSIZE]; member 199 const char *digest, int digestlen); 210 const char *digest, int digestlen) in integrity_digsig_verify() argument
|
/linux-6.6.21/drivers/block/drbd/ |
D | drbd_worker.c | 287 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 …]
|