Home
last modified time | relevance | path

Searched refs:digest (Results 1 – 17 of 17) sorted by relevance

/security/integrity/ima/
Dima_queue.c56 rc = memcmp(qe->entry->digest, digest_value, TPM_DIGEST_SIZE); in ima_lookup_digest_entry()
87 key = ima_hash_key(entry->digest); in ima_add_digest_entry()
112 u8 digest[TPM_DIGEST_SIZE]; in ima_add_template_entry() local
120 memcpy(digest, entry->digest, sizeof(digest)); in ima_add_template_entry()
121 if (ima_lookup_digest_entry(digest)) { in ima_add_template_entry()
136 memset(digest, 0xff, sizeof(digest)); in ima_add_template_entry()
138 tpmresult = ima_pcr_extend(digest); in ima_add_template_entry()
Dima_template_lib.c160 static int ima_eventdigest_init_common(u8 *digest, u32 digestsize, u8 hash_algo, in ima_eventdigest_init_common() argument
182 if (digest) in ima_eventdigest_init_common()
183 memcpy(buffer + offset, digest, digestsize); in ima_eventdigest_init_common()
204 char digest[IMA_MAX_DIGEST_SIZE]; in ima_eventdigest_init() member
217 cur_digest = event_data->iint->ima_hash->digest; in ima_eventdigest_init()
235 cur_digest = hash.hdr.digest; in ima_eventdigest_init()
254 cur_digest = event_data->iint->ima_hash->digest; in ima_eventdigest_ng_init()
Dima.h89 u8 digest[TPM_DIGEST_SIZE]; /* sha1 or md5 measurement hash */ member
118 void ima_print_digest(struct seq_file *m, u8 *digest, u32 size);
134 static inline unsigned int ima_hash_key(u8 *digest) in ima_hash_key() argument
137 return (digest[0] | digest[1] << 8) % IMA_MEASURE_HTABLE_SIZE; in ima_hash_key()
Dima_api.c98 char digest[TPM_DIGEST_SIZE]; in ima_store_template() member
115 memcpy(entry->digest, hash.hdr.digest, hash.hdr.length); in ima_store_template()
201 char digest[IMA_MAX_DIGEST_SIZE]; in ima_collect_measurement() member
303 hex_byte_pack(hash + (i * 2), iint->ima_hash->digest[i]); in ima_audit_measurement()
Dima_appraise.c149 hash->algo = xattr_value->digest[0]; in ima_get_hash_algo()
155 if (!memcmp(&xattr_value->digest[16], &zero, 4)) in ima_get_hash_algo()
239 rc = memcmp(&xattr_value->digest[hash_start], in ima_appraise_measurement()
240 iint->ima_hash->digest, in ima_appraise_measurement()
255 iint->ima_hash->digest, in ima_appraise_measurement()
Dima_crypto.c334 ahash_request_set_crypt(req, NULL, hash->digest, 0); in ima_calc_file_hash_atfm()
411 rc = crypto_shash_final(shash, hash->digest); in ima_calc_file_hash_tfm()
503 rc = crypto_shash_final(shash, hash->digest); in ima_calc_field_array_hash_tfm()
539 static int __init ima_calc_boot_aggregate_tfm(char *digest, in ima_calc_boot_aggregate_tfm() argument
562 crypto_shash_final(shash, digest); in ima_calc_boot_aggregate_tfm()
576 rc = ima_calc_boot_aggregate_tfm(hash->digest, tfm); in ima_calc_boot_aggregate()
Dima_fs.c143 ima_putc(m, e->digest, TPM_DIGEST_SIZE); in ima_measurements_show()
193 void ima_print_digest(struct seq_file *m, u8 *digest, u32 size) in ima_print_digest() argument
198 seq_printf(m, "%02x", *(digest + i)); in ima_print_digest()
222 ima_print_digest(m, e->digest, TPM_DIGEST_SIZE); in ima_ascii_measurements_show()
Dima_init.c58 char digest[TPM_DIGEST_SIZE]; in ima_add_boot_aggregate() member
/security/integrity/evm/
Devm_crypto.c98 char *digest) in hmac_add_misc() argument
118 crypto_shash_final(desc, digest); in hmac_add_misc()
132 char type, char *digest) in evm_calc_hmac_or_hash() argument
170 hmac_add_misc(desc, inode, digest); in evm_calc_hmac_or_hash()
180 char *digest) in evm_calc_hmac() argument
183 req_xattr_value_len, EVM_XATTR_HMAC, digest); in evm_calc_hmac()
188 char *digest) in evm_calc_hash() argument
191 req_xattr_value_len, IMA_XATTR_DIGEST, digest); in evm_calc_hash()
207 xattr_value_len, xattr_data.digest); in evm_update_evmxattr()
Devm_main.c149 xattr_value_len, calc.digest); in evm_verify_hmac()
152 rc = crypto_memneq(xattr_data->digest, calc.digest, in evm_verify_hmac()
153 sizeof(calc.digest)); in evm_verify_hmac()
159 xattr_value_len, calc.digest); in evm_verify_hmac()
164 calc.digest, sizeof(calc.digest)); in evm_verify_hmac()
462 rc = evm_init_hmac(inode, lsm_xattr, xattr_data->digest); in evm_inode_init_security()
Devm.h45 size_t req_xattr_value_len, char *digest);
48 size_t req_xattr_value_len, char *digest);
/security/keys/encrypted-keys/
Dencrypted.h39 static inline void dump_hmac(const char *str, const u8 *digest, in dump_hmac() argument
44 print_hex_dump(KERN_ERR, "hmac: ", DUMP_PREFIX_NONE, 32, 1, digest, in dump_hmac()
61 static inline void dump_hmac(const char *str, const u8 *digest, in dump_hmac() argument
Dencrypted.c344 static int calc_hmac(u8 *digest, const u8 *key, unsigned int keylen, in calc_hmac() argument
358 ret = crypto_shash_digest(&sdesc->shash, buf, buflen, digest); in calc_hmac()
363 static int calc_hash(u8 *digest, const u8 *buf, unsigned int buflen) in calc_hash() argument
374 ret = crypto_shash_digest(&sdesc->shash, buf, buflen, digest); in calc_hash()
514 u8 *digest; in datablob_hmac_append() local
521 digest = epayload->format + epayload->datablob_len; in datablob_hmac_append()
522 ret = calc_hmac(digest, derived_key, sizeof derived_key, in datablob_hmac_append()
525 dump_hmac(NULL, digest, HASH_SIZE); in datablob_hmac_append()
536 u8 digest[HASH_SIZE]; in datablob_hmac_verify() local
552 ret = calc_hmac(digest, derived_key, sizeof derived_key, p, len); in datablob_hmac_verify()
[all …]
/security/integrity/
Dintegrity.h69 u8 digest[SHA1_DIGEST_SIZE]; member
88 u8 digest[0]; member
135 const char *digest, int digestlen);
143 const char *digest, int digestlen) in integrity_digsig_verify() argument
Ddigsig.c37 const char *digest, int digestlen) in integrity_digsig_verify() argument
57 digest, digestlen); in integrity_digsig_verify()
60 digest, digestlen); in integrity_digsig_verify()
Ddigsig_asymmetric.c93 pks.digest = (u8 *)data; in asymmetric_verify()
/security/keys/
Dtrusted.c60 unsigned char *digest) in TSS_sha1() argument
71 ret = crypto_shash_digest(&sdesc->shash, data, datalen, digest); in TSS_sha1()
76 static int TSS_rawhmac(unsigned char *digest, const unsigned char *key, in TSS_rawhmac() argument
114 ret = crypto_shash_final(&sdesc->shash, digest); in TSS_rawhmac()
123 static int TSS_authhmac(unsigned char *digest, const unsigned char *key, in TSS_authhmac() argument
163 ret = TSS_rawhmac(digest, key, keylen, SHA1_DIGEST_SIZE, in TSS_authhmac()