| /linux/security/ipe/ | 
| H A D | digest.c | 6 #include "digest.h" 9  * ipe_digest_parse() - parse a digest in IPE's policy. 15  * Use this function to create a property to parse the digest 16  * consistently. The parsed digest will be saved in @value in IPE's 27 	u8 *digest = NULL;  in ipe_digest_parse()  local 51 	digest = kzalloc(info->digest_len, GFP_KERNEL);  in ipe_digest_parse() 52 	if (!digest) {  in ipe_digest_parse() 57 	rc = hex2bin(digest, raw_digest, info->digest_len);  in ipe_digest_parse() 64 	info->digest = digest;  in ipe_digest_parse() 69 	kfree(digest);  in ipe_digest_parse() [all …] 
 | 
| H A D | hooks.c | 16 #include "digest.h" 241 	const struct dm_verity_digest *digest = NULL;  in ipe_bdev_setintegrity()  local 260 	digest = value;  in ipe_bdev_setintegrity() 266 	info->digest = kmemdup(digest->digest, digest->digest_len, GFP_KERNEL);  in ipe_bdev_setintegrity() 267 	if (!info->digest)  in ipe_bdev_setintegrity() 270 	info->alg = kstrdup(digest->alg, GFP_KERNEL);  in ipe_bdev_setintegrity() 274 	info->digest_len = digest->digest_len;  in ipe_bdev_setintegrity()
  | 
| H A D | audit.c | 16 #include "digest.h" 69  * @rh: Supplies a pointer to the digest structure. 78  * audit_fsv_digest() - audit the digest of a fsverity_digest property. 80  * @d: Supplies a pointer to the digest structure. 185 	u8 digest[SHA256_DIGEST_SIZE]; in audit_policy()  187 	sha256(p->pkcs7, p->pkcs7len, digest); in audit_policy()   local  192 	audit_log_n_hex(ab, digest, sizeof(digest)); in audit_policy() 
  | 
| /linux/lib/crypto/tests/ | 
| H A D | md5-testvecs.h | 6 	u8 digest[MD5_DIGEST_SIZE];  member 10 		.digest = { 17 		.digest = { 24 		.digest = { 31 		.digest = { 38 		.digest = { 45 		.digest = { 52 		.digest = { 59 		.digest = { 66 		.digest = { [all …] 
 | 
| H A D | poly1305-testvecs.h | 6 	u8 digest[POLY1305_DIGEST_SIZE];  member 10 		.digest = { 17 		.digest = { 24 		.digest = { 31 		.digest = { 38 		.digest = { 45 		.digest = { 52 		.digest = { 59 		.digest = { 66 		.digest = { [all …] 
 | 
| H A D | sha1-testvecs.h | 6 	u8 digest[SHA1_DIGEST_SIZE];  member 10 		.digest = { 18 		.digest = { 26 		.digest = { 34 		.digest = { 42 		.digest = { 50 		.digest = { 58 		.digest = { 66 		.digest = { 74 		.digest = { [all …] 
 | 
| H A D | sha224-testvecs.h | 6 	u8 digest[SHA224_DIGEST_SIZE];  member 10 		.digest = { 19 		.digest = { 28 		.digest = { 37 		.digest = { 46 		.digest = { 55 		.digest = { 64 		.digest = { 73 		.digest = { 82 		.digest = { [all …] 
 | 
| H A D | sha256-testvecs.h | 6 	u8 digest[SHA256_DIGEST_SIZE];  member 10 		.digest = { 19 		.digest = { 28 		.digest = { 37 		.digest = { 46 		.digest = { 55 		.digest = { 64 		.digest = { 73 		.digest = { 82 		.digest = { [all …] 
 | 
| H A D | blake2s-testvecs.h | 6 	u8 digest[BLAKE2S_HASH_SIZE];  member 10 		.digest = { 19 		.digest = { 28 		.digest = { 37 		.digest = { 46 		.digest = { 55 		.digest = { 64 		.digest = { 73 		.digest = { 82 		.digest = { [all …] 
 | 
| H A D | sha384-testvecs.h | 6 	u8 digest[SHA384_DIGEST_SIZE];  member 10 		.digest = { 21 		.digest = { 32 		.digest = { 43 		.digest = { 54 		.digest = { 65 		.digest = { 76 		.digest = { 87 		.digest = { 98 		.digest = { [all …] 
 | 
| H A D | sha512-testvecs.h | 6 	u8 digest[SHA512_DIGEST_SIZE];  member 10 		.digest = { 23 		.digest = { 36 		.digest = { 49 		.digest = { 62 		.digest = { 75 		.digest = { 88 		.digest = { 101 		.digest = { 114 		.digest = { [all …] 
 | 
| /linux/fs/verity/ | 
| H A D | measure.c | 3  * Ioctl to get a verity file's digest 16  * fsverity_ioctl_measure() - get a verity file's digest 17  * @filp: file to get digest of 20  * Retrieve the file digest that the kernel is enforcing for reads from a verity 41 	 * return the digest if it fits in the available space.  We write back  in fsverity_ioctl_measure() 57 	if (copy_to_user(uarg->digest, vi->file_digest, hash_alg->digest_size))  in fsverity_ioctl_measure() 65  * fsverity_get_digest() - get a verity file's digest 66  * @inode: inode to get digest of 67  * @raw_digest: (out) the raw file digest 68  * @alg: (out) the digest's algorithm, as a FS_VERITY_HASH_ALG_* value [all …] 
 | 
| /linux/security/integrity/ima/ | 
| H A D | ima_template_lib.c | 289 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 …] 
 | 
| /linux/lib/crypto/x86/ | 
| H A D | sha512-ssse3-asm.S | 56 digest =	%rdi  define 83 # MSG, DIGEST, K_t, W_t are arrays 89 # Output Digest (arg2) 90 #define DIGEST(i) 8*i(digest)  macro 270 # Purpose: Updates the SHA512 digest stored at "state" with the message 294 	mov	DIGEST(0), a_64 295 	mov	DIGEST(1), b_64 296 	mov	DIGEST(2), c_64 297 	mov	DIGEST(3), d_64 298 	mov	DIGEST(4), e_64 [all …] 
 | 
| H A D | sha512-avx-asm.S | 56 digest	= %rdi  define 85 # MSG, DIGEST, K_t, W_t are arrays 91 # Output Digest (arg2) 92 #define DIGEST(i) 8*i(digest)  macro 271 # Purpose: Updates the SHA512 digest stored at "state" with the message 295 	mov     DIGEST(0), a_64 296 	mov     DIGEST(1), b_64 297 	mov     DIGEST(2), c_64 298 	mov     DIGEST(3), d_64 299 	mov     DIGEST(4), e_64 [all …] 
 | 
| /linux/crypto/asymmetric_keys/ | 
| H A D | verify_pefile.c | 242  * 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 …] 
 | 
| /linux/tools/testing/selftests/arm64/fp/ | 
| H A D | kernel-test.c | 28 static char *digest;  variable 195 	digest = malloc(digest_len);  in create_socket() 196 	if (!digest) {  in create_socket() 197 		printf("Failed to allocate %d byte digest\n", digest_len);  in create_socket() 234 		printf("No digest returned\n");  in compute_digest() 240 		printf("Failed to get digest: %s (%d)\n",  in compute_digest() 300 	 * Compute a reference digest we hope is repeatable, we do  in main() 305 		printf("Failed to compute reference digest\n");  in main() 312 		if (!compute_digest(digest)) {  in main() 313 			printf("Failed to compute digest, iter=%d\n", iter);  in main() [all …] 
 | 
| /linux/lib/crypto/ | 
| H A D | sha1.c | 75  * @digest: 160 bit digest to update 80  * 160-bit internal state (@digest) with a single 512-bit data block (@data). 90 void sha1_transform(__u32 *digest, const char *data, __u32 *array)  in sha1_transform()  argument 95 	A = digest[0];  in sha1_transform() 96 	B = digest[1];  in sha1_transform() 97 	C = digest[2];  in sha1_transform() 98 	D = digest[3];  in sha1_transform() 99 	E = digest[4];  in sha1_transform() 121 	digest[0] += A;  in sha1_transform() 122 	digest[1] += B;  in sha1_transform() [all …] 
 | 
| /linux/Documentation/security/ | 
| H A 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/include/crypto/ | 
| H A D | kdf_sp800108.h | 17  * @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
  | 
| /linux/tools/testing/selftests/bpf/progs/ | 
| H A D | test_fsverity.c | 18 char digest[SIZEOF_STRUCT_FSVERITY_DIGEST + SHA256_DIGEST_SIZE];  variable 35 	bpf_dynptr_from_mem(digest, sizeof(digest), 0, &digest_ptr);  in BPF_PROG() 41 	for (i = 0; i < (int)sizeof(digest); i++) {  in BPF_PROG() 42 		if (digest[i] != expected_digest[i])  in BPF_PROG()
  | 
| H A D | test_sig_in_xattr.c | 34  * sets, for example, fsverity_digest or only the digest[] part of it. 38 char digest[MAGIC_SIZE + SIZEOF_STRUCT_FSVERITY_DIGEST + SHA256_DIGEST_SIZE];  variable 58 	bpf_dynptr_from_mem(digest + MAGIC_SIZE, sizeof(digest) - MAGIC_SIZE, 0, &digest_ptr);  in BPF_PROG() 66 	bpf_dynptr_from_mem(digest, sizeof(digest), 0, &digest_ptr);  in BPF_PROG()
  | 
| /linux/security/integrity/ | 
| H A D | integrity.h | 46 	u8 digest[SHA1_DIGEST_SIZE];  member 68 	u8 digest[];  member 70 static_assert(offsetof(struct ima_digest_data, digest) == sizeof(struct ima_digest_data_hdr), 79 	u8 digest[HASH_MAX_DIGESTSIZE];  member 95 	uint8_t	hash_algo;	/* Digest algorithm [enum hash_algo] */ 104  * containing either the fsverity_descriptor struct digest or, in the 111 	__u8 hash_algorithm;	/* Digest algorithm [enum hash_algo] */ 131 			    const char *digest, int digestlen); 142 					  const char *digest, int digestlen)  in integrity_digsig_verify()  argument
  | 
| /linux/scripts/crypto/ | 
| H A D | gen-hash-testvecs.py | 49     def digest(self):  member in Poly1305 64     return ctx.digest() 96     print(f'\tu8 digest[{alg_digest_size_const(alg)}];') 102         print_c_struct_u8_array_field('digest', compute_hash(alg, data)) 121         mac = hmac.digest(key, data[:data_len], alg) 125             ctx.digest()) 136             hashes += h.digest() 148             data += ctx.digest() 151             Poly1305(key).update(data).digest())
  | 
| /linux/drivers/md/ | 
| H A D | dm-verity.h | 43 	u8 *root_digest;	/* digest of the root block */ 46 	u8 *zero_digest;	/* digest for a zero block */ 48 	u8 *root_digest_sig;	/* signature of the root digest */ 49 	unsigned int sig_size;	/* root digest signature size */ 62 	unsigned int digest_size;	/* digest size for the current hash algorithm */ 121 		       const u8 *data, size_t len, u8 *digest); 124 				 sector_t block, u8 *digest, bool *is_zero);
  |