Home
last modified time | relevance | path

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

1234567891011

/linux/security/ipe/
H A Ddigest.c6 #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 …]
/linux/lib/crypto/tests/
H A Dmd5-testvecs.h6 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 Dpoly1305-testvecs.h6 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 Dpolyval-testvecs.h6 u8 digest[POLYVAL_DIGEST_SIZE]; member
10 .digest = {
17 .digest = {
24 .digest = {
31 .digest = {
38 .digest = {
45 .digest = {
52 .digest = {
59 .digest = {
66 .digest = {
[all …]
H A Dsha1-testvecs.h6 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 Dsha224-testvecs.h6 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 Dsha256-testvecs.h6 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 Dblake2s-testvecs.h6 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 Dsha3-testvecs.h8 u8 digest[SHA3_256_DIGEST_SIZE]; member
12 .digest = {
21 .digest = {
30 .digest = {
39 .digest = {
48 .digest = {
57 .digest = {
66 .digest = {
75 .digest = {
84 .digest = {
[all …]
H A Dsha384-testvecs.h6 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 Dsha512-testvecs.h6 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 …]
H A Dblake2b-testvecs.h6 u8 digest[BLAKE2B_HASH_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 Dmeasure.c3 * 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/include/crypto/
H A Dsha3.h61 u8 digest_size; /* Digests only: the digest size in bytes */
112 * This begins a new SHA3-224 message digest computation.
128 * This begins a new SHA3-256 message digest computation.
144 * This begins a new SHA3-384 message digest computation.
160 * This begins a new SHA3-512 message digest computation.
173 * sha3_update() - Update a SHA-3 digest context with input data
179 * SHA3-384, or SHA3-512 digest (depending on which init function was called).
190 * sha3_final() - Finish computing a SHA-3 message digest
193 * message digest, matching the init function that was called. Note that
265 * sha3_224() - Compute SHA3-224 digest in one shot
[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
/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 …]
/linux/scripts/crypto/
H A Dgen-hash-testvecs.py49 def digest(self): member in Poly1305
79 def digest(self): member in Polyval
95 return ctx.digest()
127 print(f'\tu8 digest[{alg_digest_size_const(alg)}];')
133 print_c_struct_u8_array_field('digest', compute_hash(alg, data))
152 out = hashlib.new(alg, data=in_data[:in_len]).digest(out_len)
155 ctx.digest())
164 mac = hmac.digest(key, data[:data_len], alg)
168 ctx.digest())
182 hashes += h.digest()
[all …]
/linux/lib/crypto/x86/
H A Dsha512-ssse3-asm.S56 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 Dsha512-avx-asm.S56 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 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 …]
/linux/drivers/nvme/common/
H A Dauth.c95 const char digest[8]; member
100 .digest = "sha256",
105 .digest = "sha384",
110 .digest = "sha512",
126 return hash_map[hmac_id].digest; in nvme_auth_digest_name()
315 pr_debug("%s: failed to get digest for %d\n", __func__, in nvme_auth_hash_skey()
325 pr_debug("%s: Failed to hash digest len %zu\n", __func__, in nvme_auth_hash_skey()
553 * nvme_auth_generate_digest - Generate TLS PSK digest
559 * @ret_digest: Pointer to the returned digest
561 * Generate a TLS PSK digest as specified in TP8018 Section 3.6.1.3:
[all …]
/linux/tools/testing/selftests/arm64/fp/
H A Dkernel-test.c28 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/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],
/linux/tools/testing/selftests/bpf/progs/
H A Dtest_fsverity.c18 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()
/linux/lib/crypto/
H A Dsha1.c76 * @digest: 160 bit digest to update
81 * 160-bit internal state (@digest) with a single 512-bit data block (@data).
91 void sha1_transform(__u32 *digest, const char *data, __u32 *array) in sha1_transform() argument
96 A = digest[0]; in sha1_transform()
97 B = digest[1]; in sha1_transform()
98 C = digest[2]; in sha1_transform()
99 D = digest[3]; in sha1_transform()
100 E = digest[4]; in sha1_transform()
122 digest[0] += A; in sha1_transform()
123 digest[1] += B; in sha1_transform()
[all …]

1234567891011