Home
last modified time | relevance | path

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

12345678910>>...27

/kernel/linux/linux-6.6/fs/verity/
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 …]
/kernel/linux/linux-5.10/include/crypto/
Dhash.h17 * DOC: Message Digest Algorithm Definitions
19 * These data structures define modular message digest algorithm
26 * struct hash_alg_common - define properties of message digest
63 * struct ahash_alg - asynchronous message digest definition
73 * final message digest as this only adds more data into the
90 * @digest: Combination of @init and @update and @final. This function
107 * @init, @update, @final, @finup, @digest is called. No data
139 int (*digest)(struct ahash_request *req); member
171 * struct shash_alg - synchronous message digest definition
176 * @digest: see struct ahash_alg
[all …]
/kernel/linux/linux-6.6/include/crypto/
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 …]
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
/kernel/linux/linux-5.10/lib/
Dsha1.c71 * @digest: 160 bit digest to update
76 * 160-bit internal state (@digest) with a single 512-bit data block (@data).
86 void sha1_transform(__u32 *digest, const char *data, __u32 *array) in sha1_transform() argument
91 A = digest[0]; in sha1_transform()
92 B = digest[1]; in sha1_transform()
93 C = digest[2]; in sha1_transform()
94 D = digest[3]; in sha1_transform()
95 E = digest[4]; in sha1_transform()
117 digest[0] += A; in sha1_transform()
118 digest[1] += B; in sha1_transform()
[all …]
/kernel/linux/linux-6.6/lib/crypto/
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 …]
/kernel/linux/linux-5.10/arch/arm64/crypto/
DKconfig13 tristate "SHA-224/SHA-256 digest algorithm for arm64"
17 tristate "SHA-384/SHA-512 digest algorithm for arm64"
21 tristate "SHA-1 digest algorithm (ARMv8 Crypto Extensions)"
27 tristate "SHA-224/SHA-256 digest algorithm (ARMv8 Crypto Extensions)"
33 tristate "SHA-384/SHA-512 digest algorithm (ARMv8 Crypto Extensions)"
39 tristate "SHA3 digest algorithm (ARMv8.2 Crypto Extensions)"
45 tristate "SM3 digest algorithm (ARMv8.2 Crypto Extensions)"
65 tristate "CRCT10DIF digest algorithm using PMULL instructions"
/kernel/linux/linux-5.10/security/integrity/ima/
Dima_template_lib.c226 static int ima_eventdigest_init_common(const u8 *digest, u32 digestsize, in ima_eventdigest_init_common() argument
231 * digest formats: in ima_eventdigest_init_common()
232 * - DATA_FMT_DIGEST: digest in ima_eventdigest_init_common()
233 * - DATA_FMT_DIGEST_WITH_ALGO: [<hash algo>] + ':' + '\0' + digest, in ima_eventdigest_init_common()
249 if (digest) in ima_eventdigest_init_common()
250 memcpy(buffer + offset, digest, digestsize); in ima_eventdigest_init_common()
253 * If digest is NULL, the event being recorded is a violation. in ima_eventdigest_init_common()
254 * Make room for the digest by increasing the offset of in ima_eventdigest_init_common()
264 * This function writes the digest of an event (with size limit).
271 char digest[IMA_MAX_DIGEST_SIZE]; in ima_eventdigest_init() member
[all …]
/kernel/linux/linux-6.6/security/integrity/ima/
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 …]
/kernel/linux/linux-6.6/Documentation/crypto/
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
/kernel/linux/linux-5.10/Documentation/crypto/
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
/kernel/linux/linux-5.10/arch/arm/crypto/
DKconfig13 tristate "SHA1 digest algorithm (ARM-asm)"
21 tristate "SHA1 digest algorithm (ARM NEON)"
32 tristate "SHA1 digest algorithm (ARM v8 Crypto Extensions)"
41 tristate "SHA-224/256 digest algorithm (ARM v8 Crypto Extensions)"
50 tristate "SHA-224/256 digest algorithm (ARM-asm and NEON)"
58 tristate "SHA-384/512 digest algorithm (ARM-asm and NEON)"
122 tristate "CRCT10DIF digest algorithm using PMULL instructions"
128 tristate "CRC32(C) digest algorithm using CRC and/or PMULL instructions"
/kernel/linux/linux-5.10/crypto/asymmetric_keys/
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 …]
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 …]
/kernel/linux/linux-6.6/crypto/asymmetric_keys/
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 …]
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 …]
/kernel/linux/linux-6.6/arch/x86/crypto/
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 …]
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 …]
/kernel/linux/linux-5.10/arch/x86/crypto/
Dsha512-avx-asm.S56 digest = %rdi define
89 # MSG, DIGEST, K_t, W_t are arrays
95 # Output Digest (arg2)
96 #define DIGEST(i) 8*i(digest) macro
274 # Purpose: Updates the SHA512 digest stored at "state" with the message
300 mov DIGEST(0), a_64
301 mov DIGEST(1), b_64
302 mov DIGEST(2), c_64
303 mov DIGEST(3), d_64
304 mov DIGEST(4), e_64
[all …]
Dsha512-ssse3-asm.S56 digest = %rdi define
87 # MSG, DIGEST, K_t, W_t are arrays
93 # Output Digest (arg2)
94 #define DIGEST(i) 8*i(digest) macro
275 # Purpose: Updates the SHA512 digest stored at "state" with the message
302 mov DIGEST(0), a_64
303 mov DIGEST(1), b_64
304 mov DIGEST(2), c_64
305 mov DIGEST(3), d_64
306 mov DIGEST(4), e_64
[all …]
/kernel/linux/linux-5.10/drivers/crypto/inside-secure/
Dsafexcel_hash.c50 u32 digest; member
54 u8 digest_sz; /* output digest size, only set once */
117 * Copy the input digest if needed, and setup the context in safexcel_context_control()
121 if (unlikely(req->digest == CONTEXT_CONTROL_DIGEST_XCM)) { in safexcel_context_control()
144 cdesc->control_data.control0 |= req->digest | in safexcel_context_control()
150 cdesc->control_data.control0 |= req->digest | in safexcel_context_control()
159 /* Hash continuation or HMAC, setup (inner) digest from state */ in safexcel_context_control()
163 /* Compute digest count for hash/HMAC finish operations */ in safexcel_context_control()
164 if ((req->digest == CONTEXT_CONTROL_DIGEST_PRECOMPUTED) || in safexcel_context_control()
180 if ((req->digest == CONTEXT_CONTROL_DIGEST_PRECOMPUTED) || in safexcel_context_control()
[all …]
/kernel/linux/linux-6.6/drivers/crypto/inside-secure/
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 …]
/kernel/linux/linux-6.6/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],
/kernel/linux/linux-6.6/crypto/
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()
/kernel/linux/linux-5.10/crypto/
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()

12345678910>>...27