Home
last modified time | relevance | path

Searched refs:hash_algo (Results 1 – 25 of 68) sorted by relevance

123

/openbmc/u-boot/common/
H A Dhash.c204 static struct hash_algo hash_algo[] = { variable
322 for (i = 0; i < ARRAY_SIZE(hash_algo); i++) { in hash_lookup_algo()
323 if (!strcmp(algo_name, hash_algo[i].name)) { in hash_lookup_algo()
324 *algop = &hash_algo[i]; in hash_lookup_algo()
334 struct hash_algo **algop) in hash_progressive_lookup_algo()
338 for (i = 0; i < ARRAY_SIZE(hash_algo); i++) { in hash_progressive_lookup_algo()
340 if (hash_algo[i].hash_init) { in hash_progressive_lookup_algo()
341 *algop = &hash_algo[i]; in hash_progressive_lookup_algo()
354 struct hash_algo *algo; in hash_parse_string()
375 struct hash_algo *algo; in hash_block()
[all …]
/openbmc/u-boot/include/
H A Dhash.h24 struct hash_algo { struct
48 int (*hash_init)(struct hash_algo *algo, void **ctxp); argument
61 int (*hash_update)(struct hash_algo *algo, void *ctx, const void *buf, argument
75 int (*hash_finish)(struct hash_algo *algo, void *ctx, void *dest_buf, argument
130 int hash_lookup_algo(const char *algo_name, struct hash_algo **algop);
144 struct hash_algo **algop);
H A Dhw_sha.h70 int hw_sha_init(struct hash_algo *algo, void **ctxp);
84 int hw_sha_update(struct hash_algo *algo, void *ctx, const void *buf,
98 int hw_sha_finish(struct hash_algo *algo, void *ctx, void *dest_buf,
/openbmc/linux/crypto/asymmetric_keys/
H A Dpublic_key.c86 if (!hash_algo) { in software_key_determine_akcipher()
93 pkey->pkey_algo, hash_algo); in software_key_determine_akcipher()
103 if (hash_algo) in software_key_determine_akcipher()
116 if (!hash_algo) in software_key_determine_akcipher()
118 if (strcmp(hash_algo, "sha1") != 0 && in software_key_determine_akcipher()
122 strcmp(hash_algo, "sha512") != 0) in software_key_determine_akcipher()
127 if (!hash_algo) in software_key_determine_akcipher()
129 if (strcmp(hash_algo, "sm3") != 0) in software_key_determine_akcipher()
134 if (!hash_algo) in software_key_determine_akcipher()
169 params->hash_algo, alg_name, in software_key_query()
[all …]
H A Dx509_cert_parser.c204 ctx->cert->sig->hash_algo = "md4"; in x509_note_sig_algo()
208 ctx->cert->sig->hash_algo = "sha1"; in x509_note_sig_algo()
212 ctx->cert->sig->hash_algo = "sha256"; in x509_note_sig_algo()
216 ctx->cert->sig->hash_algo = "sha384"; in x509_note_sig_algo()
220 ctx->cert->sig->hash_algo = "sha512"; in x509_note_sig_algo()
224 ctx->cert->sig->hash_algo = "sha224"; in x509_note_sig_algo()
228 ctx->cert->sig->hash_algo = "sha1"; in x509_note_sig_algo()
232 ctx->cert->sig->hash_algo = "sha224"; in x509_note_sig_algo()
236 ctx->cert->sig->hash_algo = "sha256"; in x509_note_sig_algo()
240 ctx->cert->sig->hash_algo = "sha384"; in x509_note_sig_algo()
[all …]
H A Dpkcs7_verify.c31 kenter(",%u,%s", sinfo->index, sinfo->sig->hash_algo); in pkcs7_digest()
37 if (!sinfo->sig->hash_algo) in pkcs7_digest()
43 tfm = crypto_alloc_shash(sinfo->sig->hash_algo, 0, 0); in pkcs7_digest()
126 enum hash_algo *hash_algo) in pkcs7_get_digest() argument
145 sinfo->sig->hash_algo); in pkcs7_get_digest()
147 *hash_algo = i; in pkcs7_get_digest()
H A Dpkcs7_parser.c231 ctx->sinfo->sig->hash_algo = "md4"; in pkcs7_sig_note_digest_algo()
234 ctx->sinfo->sig->hash_algo = "md5"; in pkcs7_sig_note_digest_algo()
237 ctx->sinfo->sig->hash_algo = "sha1"; in pkcs7_sig_note_digest_algo()
240 ctx->sinfo->sig->hash_algo = "sha256"; in pkcs7_sig_note_digest_algo()
243 ctx->sinfo->sig->hash_algo = "sha384"; in pkcs7_sig_note_digest_algo()
246 ctx->sinfo->sig->hash_algo = "sha512"; in pkcs7_sig_note_digest_algo()
249 ctx->sinfo->sig->hash_algo = "sha224"; in pkcs7_sig_note_digest_algo()
252 ctx->sinfo->sig->hash_algo = "sm3"; in pkcs7_sig_note_digest_algo()
255 ctx->sinfo->sig->hash_algo = "streebog256"; in pkcs7_sig_note_digest_algo()
258 ctx->sinfo->sig->hash_algo = "streebog512"; in pkcs7_sig_note_digest_algo()
H A Dx509_public_key.c44 tfm = crypto_alloc_shash(sig->hash_algo, 0, 0); in x509_get_sig_params()
68 ret = strcmp(sig->hash_algo, "sm3") != 0 ? -EINVAL : in x509_get_sig_params()
187 cert->sig->pkey_algo, cert->sig->hash_algo); in x509_key_preparse()
/openbmc/linux/security/integrity/ima/
H A Dima_modsig.c21 enum hash_algo hash_algo; member
83 hdr->hash_algo = HASH_ALGO__LAST; in ima_read_modsig()
116 &modsig->digest_size, &modsig->hash_algo); in ima_collect_modsig()
125 int ima_get_modsig_digest(const struct modsig *modsig, enum hash_algo *algo, in ima_get_modsig_digest()
128 *algo = modsig->hash_algo; in ima_get_modsig_digest()
H A Dima_template_lib.c290 u8 digest_type, u8 hash_algo, in ima_eventdigest_init_common() argument
314 hash_algo_name[hash_algo]); in ima_eventdigest_init_common()
315 } else if (hash_algo < HASH_ALGO__LAST) { in ima_eventdigest_init_common()
318 hash_algo_name[hash_algo]); in ima_eventdigest_init_common()
329 offset += hash_digest_size[hash_algo]; in ima_eventdigest_init_common()
412 hash_algo = event_data->iint->ima_hash->algo; in ima_eventdigest_ng_init()
415 DIGEST_TYPE__LAST, hash_algo, in ima_eventdigest_ng_init()
441 digest_type, hash_algo, in ima_eventdigest_ngv2_init()
452 enum hash_algo hash_algo; in ima_eventdigest_modsig_init() local
461 hash_algo = HASH_ALGO_SHA1; in ima_eventdigest_modsig_init()
[all …]
H A Dima_appraise.c180 enum hash_algo ima_get_hash_algo(const struct evm_ima_xattr_data *xattr_value, in ima_get_hash_algo()
184 enum hash_algo ret; in ima_get_hash_algo()
194 sig->hash_algo >= HASH_ALGO__LAST) in ima_get_hash_algo()
196 return sig->hash_algo; in ima_get_hash_algo()
200 || sig->hash_algo >= HASH_ALGO__LAST) in ima_get_hash_algo()
202 return sig->hash_algo; in ima_get_hash_algo()
254 enum hash_algo algo, const u8 *digest, in calc_file_id_hash()
449 enum hash_algo hash_algo; in ima_check_blacklist() local
458 ima_get_modsig_digest(modsig, &hash_algo, &digest, &digestsize); in ima_check_blacklist()
710 enum hash_algo xattr_hash_algo; in validate_hash_algo()
H A Dima_main.c79 enum hash_algo ima_get_current_hash_algo(void) in ima_get_current_hash_algo()
223 enum hash_algo hash_algo; in process_measurement() local
357 hash_algo = ima_get_hash_algo(xattr_value, xattr_len); in process_measurement()
359 rc = ima_collect_measurement(iint, file, buf, size, hash_algo, modsig); in process_measurement()
391 (allowed_algos & (1U << hash_algo)) == 0) { in process_measurement()
567 int rc, hash_algo; in __ima_inode_hash() local
615 hash_algo = iint->ima_hash->algo; in __ima_inode_hash()
621 return hash_algo; in __ima_inode_hash()
H A Dima.h266 enum hash_algo algo, struct modsig *modsig);
327 enum hash_algo ima_get_hash_algo(const struct evm_ima_xattr_data *xattr_value,
369 static inline enum hash_algo
388 int ima_get_modsig_digest(const struct modsig *modsig, enum hash_algo *algo,
406 enum hash_algo *algo, const u8 **digest, in ima_get_modsig_digest()
/openbmc/linux/drivers/net/ethernet/hisilicon/hns3/hns3_common/
H A Dhclge_comm_rss.c121 u8 hash_algo; in hclge_comm_set_rss_hash_key() local
124 ret = hclge_comm_parse_rss_hfunc(rss_cfg, hfunc, &hash_algo); in hclge_comm_set_rss_hash_key()
130 ret = hclge_comm_set_rss_algo_key(hw, hash_algo, key); in hclge_comm_set_rss_hash_key()
137 ret = hclge_comm_set_rss_algo_key(hw, hash_algo, in hclge_comm_set_rss_hash_key()
142 rss_cfg->rss_algo = hash_algo; in hclge_comm_set_rss_hash_key()
195 const u8 hfunc, u8 *hash_algo) in hclge_comm_parse_rss_hfunc() argument
199 *hash_algo = HCLGE_COMM_RSS_HASH_ALGO_TOEPLITZ; in hclge_comm_parse_rss_hfunc()
202 *hash_algo = HCLGE_COMM_RSS_HASH_ALGO_SIMPLE; in hclge_comm_parse_rss_hfunc()
205 *hash_algo = rss_cfg->rss_algo; in hclge_comm_parse_rss_hfunc()
/openbmc/u-boot/drivers/crypto/fsl/
H A Dfsl_hash.c45 static enum caam_hash_algos get_hash_type(struct hash_algo *algo) in get_hash_type()
215 int hw_sha_init(struct hash_algo *algo, void **ctxp) in hw_sha_init()
220 int hw_sha_update(struct hash_algo *algo, void *ctx, const void *buf, in hw_sha_update()
226 int hw_sha_finish(struct hash_algo *algo, void *ctx, void *dest_buf, in hw_sha_finish()
/openbmc/linux/include/crypto/
H A Dpkcs7.h45 u32 *len, enum hash_algo *hash_algo);
/openbmc/linux/security/integrity/
H A Ddigsig_asymmetric.c99 if (hdr->hash_algo >= HASH_ALGO__LAST) in asymmetric_verify()
108 pks.hash_algo = hash_algo_name[hdr->hash_algo]; in asymmetric_verify()
/openbmc/linux/scripts/
H A Dsign-file.c219 char *hash_algo = NULL; in main() local
272 hash_algo = argv[1]; in main()
274 hash_algo = argv[0]; in main()
289 if (strcmp(hash_algo, "sha1") != 0) { in main()
310 digest_algo = EVP_get_digestbyname(hash_algo); in main()
/openbmc/u-boot/drivers/crypto/
H A Daspeed_hace_v1.c158 int hw_sha_init(struct hash_algo *algo, void **ctxp) in hw_sha_init()
196 int hw_sha_update(struct hash_algo *algo, void *hash_ctx, const void *buf, in hw_sha_update()
219 int hw_sha_finish(struct hash_algo *algo, void *hash_ctx, void *dest_buf, int size) in hw_sha_finish()
/openbmc/linux/fs/ubifs/
H A Dsb.c185 sup->hash_algo = cpu_to_le16(c->auth_hash_algo); in create_default_filesystem()
190 sup->hash_algo = cpu_to_le16(0xffff); in create_default_filesystem()
546 int hash_algo; in authenticate_sb_node() local
568 hash_algo = le16_to_cpu(sup->hash_algo); in authenticate_sb_node()
569 if (hash_algo >= HASH_ALGO__LAST) { in authenticate_sb_node()
571 hash_algo); in authenticate_sb_node()
575 if (strcmp(hash_algo_name[hash_algo], c->auth_hash_name)) { in authenticate_sb_node()
577 " but %s is specified", hash_algo_name[hash_algo], in authenticate_sb_node()
/openbmc/linux/include/linux/
H A Dfsverity.h147 u8 *alg, enum hash_algo *halg);
201 u8 *alg, enum hash_algo *halg) in fsverity_get_digest()
H A Dkeyctl.h32 const char *hash_algo; /* Digest algorithm used (eg. "sha1") or NULL if N/A */ member
/openbmc/linux/security/integrity/evm/
H A Devm_crypto.c74 static struct shash_desc *init_desc(char type, uint8_t hash_algo) in init_desc() argument
89 if (hash_algo >= HASH_ALGO__LAST) in init_desc()
92 tfm = &evm_tfm[hash_algo]; in init_desc()
93 algo = hash_algo_name[hash_algo]; in init_desc()
/openbmc/linux/include/uapi/linux/
H A Dhash_info.h17 enum hash_algo { enum
/openbmc/linux/drivers/crypto/virtio/
H A Dvirtio_crypto_core.c358 u32 hash_algo = 0; in virtcrypto_probe() local
407 hash_algo, &hash_algo); in virtcrypto_probe()
441 vcrypto->hash_algo = hash_algo; in virtcrypto_probe()

123