Home
last modified time | relevance | path

Searched full:digest (Results 1 – 25 of 493) sorted by relevance

12345678910>>...20

/openbmc/linux/fs/verity/
H A Dmeasure.c3 * Ioctl to get a verity file's digest
13 * fsverity_ioctl_measure() - get a verity file's digest
14 * @filp: file to get digest of
17 * Retrieve the file digest that the kernel is enforcing for reads from a verity
38 * return the digest if it fits in the available space. We write back in fsverity_ioctl_measure()
54 if (copy_to_user(uarg->digest, vi->file_digest, hash_alg->digest_size)) in fsverity_ioctl_measure()
62 * fsverity_get_digest() - get a verity file's digest
63 * @inode: inode to get digest of
64 * @raw_digest: (out) the raw file digest
65 * @alg: (out) the digest's algorithm, as a FS_VERITY_HASH_ALG_* value
[all …]
/openbmc/linux/include/crypto/
H A Dhash.h18 * DOC: Message Digest Algorithm Definitions
20 * These data structures define modular message digest algorithm
45 * struct hash_alg_common - define properties of message digest
86 * struct ahash_alg - asynchronous message digest definition
96 * final message digest as this only adds more data into the
113 * @digest: Combination of @init and @update and @final. This function
130 * @init, @update, @final, @finup, @digest is called. No data
163 int (*digest)(struct ahash_request *req); member
194 * struct shash_alg - synchronous message digest definition
199 * @digest: see struct ahash_alg
[all …]
H A Dkdf_sp800108.h17 * @kmd Keyed message digest whose key was set with crypto_kdf108_setkey or
18 * unkeyed message digest
38 * @kmd Keyed message digest allocated by the caller. The key should not have
40 * @key Seed key to be used to initialize the keyed message digest context.
46 * the message digest size of the used keyed message digest. This limitation
/openbmc/qemu/tests/qtest/
H A Daspeed_hace-test.c167 uint8_t digest[16] = {0}; in test_md5() local
184 /* Read computed digest from memory */ in test_md5()
185 qtest_memread(s, digest_addr, digest, sizeof(digest)); in test_md5()
188 g_assert_cmpmem(digest, sizeof(digest), in test_md5()
189 test_result_md5, sizeof(digest)); in test_md5()
200 uint8_t digest[32] = {0}; in test_sha256() local
217 /* Read computed digest from memory */ in test_sha256()
218 qtest_memread(s, digest_addr, digest, sizeof(digest)); in test_sha256()
221 g_assert_cmpmem(digest, sizeof(digest), in test_sha256()
222 test_result_sha256, sizeof(digest)); in test_sha256()
[all …]
/openbmc/qemu/include/crypto/
H A Dhash.h61 * Determine the size of the hash digest in bytes
63 * Returns: the digest length in bytes
81 * @result_len match the size of the hash output. The digest will
85 * a buffer to hold the hash output digest, storing a pointer to
113 * @result_len match the size of the hash output. The digest will
117 * a buffer to hold the hash output digest, storing a pointer to
136 * @digest: pointer to hold output hash
140 * present in @iov. The @digest pointer will be
141 * filled with the printable hex digest of the computed
143 * memory pointer in @digest must be released
[all …]
H A Dhmac.h84 * @result_len match the size of the hash output. The digest will
88 * a buffer to hold the hash output digest, storing a pointer to
117 * @result_len match the size of the hash output. The digest will
121 * a buffer to hold the hash output digest, storing a pointer to
141 * @digest: pointer to hold output hmac
145 * present in @iov. The @digest pointer will be
146 * filled with the printable hex digest of the computed
148 * memory pointer in @digest must be released
157 char **digest,
165 * @digest: pointer to hold output hmac
[all …]
/openbmc/u-boot/arch/m68k/include/asm/coldfire/
H A Dmdha.h3 * Message Digest Hardware Accelerator Memory Map
12 /* Message Digest Hardware Accelerator */
23 u32 mda0; /* 0x30 Message Digest AO */
24 u32 mdb0; /* 0x34 Message Digest BO */
25 u32 mdc0; /* 0x38 Message Digest CO */
26 u32 mdd0; /* 0x3C Message Digest DO */
27 u32 mde0; /* 0x40 Message Digest EO */
30 u32 mda1; /* 0x70 Message Digest A1 */
31 u32 mdb1; /* 0x74 Message Digest B1 */
32 u32 mdc1; /* 0x78 Message Digest C1 */
[all …]
/openbmc/linux/lib/crypto/
H A Dsha1.c72 * @digest: 160 bit digest to update
77 * 160-bit internal state (@digest) with a single 512-bit data block (@data).
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()
[all …]
/openbmc/qemu/crypto/
H A Dhmac-nettle.c31 uint8_t *digest);
50 qcrypto_nettle_hmac_digest digest; member
56 .digest = (qcrypto_nettle_hmac_digest)hmac_md5_digest,
62 .digest = (qcrypto_nettle_hmac_digest)hmac_sha1_digest,
68 .digest = (qcrypto_nettle_hmac_digest)hmac_sha224_digest,
74 .digest = (qcrypto_nettle_hmac_digest)hmac_sha256_digest,
80 .digest = (qcrypto_nettle_hmac_digest)hmac_sha384_digest,
86 .digest = (qcrypto_nettle_hmac_digest)hmac_sha512_digest,
92 .digest = (qcrypto_nettle_hmac_digest)hmac_ripemd160_digest,
99 .digest = (qcrypto_nettle_hmac_digest)hmac_sm3_digest,
[all …]
H A Dhmac.c48 char **digest, in qcrypto_hmac_digestv() argument
59 *digest = g_new0(char, (resultlen * 2) + 1); in qcrypto_hmac_digestv()
62 (*digest)[(i * 2)] = hex[(result[i] >> 4) & 0xf]; in qcrypto_hmac_digestv()
63 (*digest)[(i * 2) + 1] = hex[result[i] & 0xf]; in qcrypto_hmac_digestv()
66 (*digest)[resultlen * 2] = '\0'; in qcrypto_hmac_digestv()
75 char **digest, in qcrypto_hmac_digest() argument
83 return qcrypto_hmac_digestv(hmac, &iov, 1, digest, errp); in qcrypto_hmac_digest()
H A Dhash.c151 char **digest, in qcrypto_hash_finalize_digest() argument
161 *digest = g_new0(char, (resultlen * 2) + 1); in qcrypto_hash_finalize_digest()
163 (*digest)[(i * 2)] = hex[(result[i] >> 4) & 0xf]; in qcrypto_hash_finalize_digest()
164 (*digest)[(i * 2) + 1] = hex[result[i] & 0xf]; in qcrypto_hash_finalize_digest()
166 (*digest)[resultlen * 2] = '\0'; in qcrypto_hash_finalize_digest()
191 char **digest, in qcrypto_hash_digestv() argument
201 qcrypto_hash_finalize_digest(ctx, digest, errp) < 0) { in qcrypto_hash_digestv()
211 char **digest, in qcrypto_hash_digest() argument
216 return qcrypto_hash_digestv(alg, &iov, 1, digest, errp); in qcrypto_hash_digest()
/openbmc/linux/security/integrity/ima/
H A Dima_template_lib.c289 static int ima_eventdigest_init_common(const u8 *digest, u32 digestsize, in ima_eventdigest_init_common() argument
294 * digest formats: in ima_eventdigest_init_common()
295 * - DATA_FMT_DIGEST: digest in ima_eventdigest_init_common()
296 * - DATA_FMT_DIGEST_WITH_ALGO: <hash algo> + ':' + '\0' + digest, in ima_eventdigest_init_common()
298 * <digest type> + ':' + <hash algo> + ':' + '\0' + digest, in ima_eventdigest_init_common()
300 * where 'DATA_FMT_DIGEST' is the original digest format ('d') in ima_eventdigest_init_common()
302 * where <digest type> is either "ima" or "verity", in ima_eventdigest_init_common()
321 if (digest) { in ima_eventdigest_init_common()
322 memcpy(buffer + offset, digest, digestsize); in ima_eventdigest_init_common()
325 * If digest is NULL, the event being recorded is a violation. in ima_eventdigest_init_common()
[all …]
/openbmc/linux/Documentation/crypto/
H A Dapi-digest.rst1 Message Digest Algorithm Definitions
5 :doc: Message Digest Algorithm Definitions
10 Asynchronous Message Digest API
14 :doc: Asynchronous Message Digest API
28 Synchronous Message Digest API
32 :doc: Synchronous Message Digest API
/openbmc/linux/crypto/asymmetric_keys/
H A Dpkcs7_verify.c20 * Digest the relevant parts of the PKCS#7 data
33 /* The digest was calculated already. */ in pkcs7_digest()
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()
61 /* Digest the message [RFC2315 9.3] */ in pkcs7_digest()
63 sig->digest); in pkcs7_digest()
66 pr_devel("MsgDigest = [%*ph]\n", 8, sig->digest); in pkcs7_digest()
69 * message digest attribute amongst them which corresponds to the in pkcs7_digest()
70 * digest we just calculated. in pkcs7_digest()
[all …]
H A Dverify_pefile.c242 * Load the contents of the PE binary into the digest, leaving out the image
252 /* Digest the header and data directory, but leave out the image in pefile_digest_pe_contents()
319 * Digest the contents of the PE binary, leaving out the image checksum and the
328 void *digest; in pefile_digest_pe() local
344 pr_warn("Digest size mismatch (%zx != %x)\n", in pefile_digest_pe()
349 pr_debug("Digest: desc=%zu size=%zu\n", desc_size, digest_size); in pefile_digest_pe()
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()
372 /* Check that the PE file digest matches that in the MSCODE part of the in pefile_digest_pe()
[all …]
/openbmc/ipmitool/src/plugins/lan/
H A Dauth.c94 static md5_byte_t digest[16]; in ipmi_auth_md5()
97 memset(digest, 0, 16); in ipmi_auth_md5()
114 md5_finish(&state, digest); in ipmi_auth_md5()
117 printf(" MD5 AuthCode : %s\n", buf2str(digest, 16)); in ipmi_auth_md5()
118 return digest; in ipmi_auth_md5()
196 static md5_byte_t digest[16]; in ipmi_auth_special()
200 memset(digest, 0, 16); in ipmi_auth_special()
205 md5_finish(&state, digest); in ipmi_auth_special()
208 challenge[i] = s->challenge[i] ^ digest[i]; in ipmi_auth_special()
210 memset(digest, 0, 16); in ipmi_auth_special()
[all …]
/openbmc/linux/arch/x86/crypto/
H A Dsha512-avx-asm.S57 digest = %rdi define
86 # MSG, DIGEST, K_t, W_t are arrays
92 # Output Digest (arg2)
93 #define DIGEST(i) 8*i(digest) macro
271 # Purpose: Updates the SHA512 digest stored at "state" with the message
297 mov DIGEST(0), a_64
298 mov DIGEST(1), b_64
299 mov DIGEST(2), c_64
300 mov DIGEST(3), d_64
301 mov DIGEST(4), e_64
[all …]
H A Dsha512-ssse3-asm.S57 digest = %rdi define
84 # MSG, DIGEST, K_t, W_t are arrays
90 # Output Digest (arg2)
91 #define DIGEST(i) 8*i(digest) macro
272 # Purpose: Updates the SHA512 digest stored at "state" with the message
299 mov DIGEST(0), a_64
300 mov DIGEST(1), b_64
301 mov DIGEST(2), c_64
302 mov DIGEST(3), d_64
303 mov DIGEST(4), e_64
[all …]
/openbmc/u-boot/board/gdsys/a38x/
H A Dhre.c146 uint8_t digest[20]; in find_key() local
169 sha1_csum(buf, buf_len, digest); in find_key()
170 if (!memcmp(digest, pubkey_digest, 20)) { in find_key()
206 sha1_finish(&ctx, fix_hregs[FIX_HREG_DEVICE_ID_HASH].digest); in read_common_data()
272 result->digest, 20); in access_hreg()
280 memcpy(result->digest, vendor, 20); in access_hreg()
335 uint8_t digest[20]; in compute_extend() local
341 sha1_finish(&ctx, digest); in compute_extend()
342 memcpy(_dst, digest, min(n, sizeof(digest))); in compute_extend()
356 if (find_key(tpm, src_reg->digest, dst_reg->digest, &parent_handle)) in hre_op_loadkey()
[all …]
/openbmc/u-boot/lib/libavb/
H A Davb_sha.h24 /* Block size in bytes of a SHA-256 digest. */
28 /* Block size in bytes of a SHA-512 digest. */
37 uint8_t buf[AVB_SHA256_DIGEST_SIZE]; /* Used for storing the final digest. */
46 uint8_t buf[AVB_SHA512_DIGEST_SIZE]; /* Used for storing the final digest. */
55 /* Returns the SHA-256 digest. */
64 /* Returns the SHA-512 digest. */
/openbmc/openbmc/meta-openembedded/meta-perl/recipes-perl/libdigest/
H A Dlibdigest-sha1-perl_2.13.bb2 DESCRIPTION = "Digest::SHA1 - Perl interface to the SHA-1 algorithm"
3 HOMEPAGE = "https://metacpan.org/pod/Digest::SHA1"
9 SRC_URI = "${CPAN_MIRROR}/authors/id/G/GA/GAAS/Digest-SHA1-${PV}.tar.gz \
14 S = "${WORKDIR}/Digest-SHA1-${PV}"
24 FILES:${PN}-dbg =+ "${libdir}/perl/vendor_perl/*/auto/Digest/SHA1/.debug/"
/openbmc/linux/drivers/crypto/inside-secure/
H A Dsafexcel_hash.c52 u32 digest; member
56 u8 digest_sz; /* output digest size, only set once */
119 * Copy the input digest if needed, and setup the context in safexcel_context_control()
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()
161 /* Hash continuation or HMAC, setup (inner) digest from state */ in safexcel_context_control()
165 /* Compute digest count for hash/HMAC finish operations */ 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()
[all …]
/openbmc/linux/Documentation/security/
H A 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],
/openbmc/linux/crypto/
H A Decrdsa.c40 const char *digest; /* digest name from oid */ member
76 unsigned char digest[STREEBOG512_DIGEST_SIZE]; in ecrdsa_verify() local
88 * Digest value, digest algorithm, and curve (modulus) should have the in ecrdsa_verify()
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()
162 /* Optional. If present should match expected digest algo OID. */
209 ctx->digest = "streebog256"; in ecrdsa_set_pub_key()
213 ctx->digest = "streebog512"; in ecrdsa_set_pub_key()
/openbmc/u-boot/drivers/crypto/
H A Daspeed_hace.c63 u8 digest[64]; /* Must be 8 byte aligned */ member
144 writel((u32)ctx->digest, base + ASPEED_HACE_HASH_DIGEST_BUFF); in hash_trigger()
145 writel((u32)ctx->digest, base + ASPEED_HACE_HASH_KEY_BUFF); in hash_trigger()
169 memcpy(ctx->digest, sha1_iv, 32); in hw_sha_init()
173 memcpy(ctx->digest, sha256_iv, 32); in hw_sha_init()
177 memcpy(ctx->digest, sha384_iv, 64); in hw_sha_init()
181 memcpy(ctx->digest, sha512_iv, 64); in hw_sha_init()
265 memcpy(dest_buf, ctx->digest, ctx->digest_size); in hw_sha_finish()
273 static int sha_digest(const void *src, unsigned int length, void *digest, in sha_digest() argument
303 memcpy(ctx->digest, sha1_iv, 32); in sha_digest()
[all …]

12345678910>>...20