| /linux-6.15/fs/ubifs/ |
| H A D | auth.c | 46 u8 *hmac) in ubifs_hash_calc_hmac() argument 80 err = ubifs_hash_calc_hmac(c, hash, auth->hmac); in ubifs_prepare_auth_node() 388 int len, int ofs_hmac, void *hmac) in ubifs_node_calc_hmac() argument 416 return crypto_shash_final(shash, hmac); in ubifs_node_calc_hmac() 451 u8 *hmac; in __ubifs_node_verify_hmac() local 454 hmac = kmalloc(hmac_len, GFP_NOFS); in __ubifs_node_verify_hmac() 455 if (!hmac) in __ubifs_node_verify_hmac() 460 kfree(hmac); in __ubifs_node_verify_hmac() 466 kfree(hmac); in __ubifs_node_verify_hmac() 516 sizeof(well_known_message) - 1, hmac); in ubifs_hmac_wkm() [all …]
|
| H A D | master.c | 28 int hmac_offs = offsetof(struct ubifs_mst_node, hmac); in ubifs_compare_master_node() 138 if (ubifs_hmac_zero(c, c->mst_node->hmac)) { in scan_for_master() 146 offsetof(struct ubifs_mst_node, hmac)); in scan_for_master() 461 offsetof(struct ubifs_mst_node, hmac)); in ubifs_write_master() 473 offsetof(struct ubifs_mst_node, hmac)); in ubifs_write_master()
|
| H A D | ubifs-media.h | 678 __u8 hmac[UBIFS_MAX_HMAC_LEN]; member 754 __u8 hmac[UBIFS_MAX_HMAC_LEN]; member 781 __u8 hmac[]; member
|
| H A D | sb.c | 323 offsetof(struct ubifs_sb_node, hmac)); in create_default_filesystem() 343 offsetof(struct ubifs_mst_node, hmac)); in create_default_filesystem() 348 0, offsetof(struct ubifs_mst_node, hmac)); in create_default_filesystem() 587 if (ubifs_hmac_zero(c, sup->hmac)) { in authenticate_sb_node() 599 hmac)); in authenticate_sb_node() 621 offsetof(struct ubifs_sb_node, hmac), 1); in ubifs_write_sb_node()
|
| /linux-6.15/net/sctp/ |
| H A D | Kconfig | 56 This option sets the default sctp cookie hmac algorithm 60 bool "Enable optional MD5 hmac cookie generation" 62 Enable optional MD5 hmac based SCTP cookie generation 66 bool "Enable optional SHA1 hmac cookie generation" 68 Enable optional SHA1 hmac based SCTP cookie generation 72 bool "Use no hmac alg in SCTP cookie generation" 74 Use no hmac algorithm in SCTP cookie generation 79 bool "Enable optional MD5 hmac cookie generation" 81 Enable optional MD5 hmac based SCTP cookie generation 86 bool "Enable optional SHA1 hmac cookie generation" [all …]
|
| /linux-6.15/arch/s390/crypto/ |
| H A D | hmac_s390.c | 309 struct s390_hmac_alg *hmac; in _s390_hmac_algs_unregister() local 313 hmac = &s390_hmac_algs[i]; in _s390_hmac_algs_unregister() 314 if (!hmac->registered) in _s390_hmac_algs_unregister() 316 crypto_unregister_shash(&hmac->alg); in _s390_hmac_algs_unregister() 322 struct s390_hmac_alg *hmac; in hmac_s390_init() local 331 hmac = &s390_hmac_algs[i]; in hmac_s390_init() 332 if (!cpacf_query_func(CPACF_KMAC, hmac->fc)) in hmac_s390_init() 335 rc = crypto_register_shash(&hmac->alg); in hmac_s390_init() 338 hmac->alg.halg.base.cra_name); in hmac_s390_init() 341 hmac->registered = true; in hmac_s390_init() [all …]
|
| /linux-6.15/net/mptcp/ |
| H A D | crypto_test.c | 35 char hmac[32], hmac_hex[65]; in mptcp_crypto_test_basic() local 51 mptcp_crypto_hmac_sha(key1, key2, msg, 8, hmac); in mptcp_crypto_test_basic() 53 sprintf(&hmac_hex[j << 1], "%02x", hmac[j] & 0xff); in mptcp_crypto_test_basic()
|
| H A D | crypto.c | 44 void mptcp_crypto_hmac_sha(u64 key1, u64 key2, u8 *msg, int len, void *hmac) in mptcp_crypto_hmac_sha() argument 78 sha256(input, SHA256_BLOCK_SIZE + SHA256_DIGEST_SIZE, hmac); in mptcp_crypto_hmac_sha()
|
| H A D | subflow.c | 51 void *hmac) in subflow_generate_hmac() argument 73 u8 hmac[SHA256_DIGEST_SIZE]; in subflow_req_create_thmac() local 80 subflow_req->remote_nonce, hmac); in subflow_req_create_thmac() 415 u8 hmac[SHA256_DIGEST_SIZE]; in subflow_thmac_valid() local 420 hmac); in subflow_thmac_valid() 422 thmac = get_unaligned_be64(hmac); in subflow_thmac_valid() 563 u8 hmac[SHA256_DIGEST_SIZE]; in subflow_finish_connect() local 590 hmac); in subflow_finish_connect() 591 memcpy(subflow->hmac, hmac, MPTCPOPT_HMAC_LEN); in subflow_finish_connect() 752 u8 hmac[SHA256_DIGEST_SIZE]; in subflow_hmac_valid() local [all …]
|
| H A D | options.c | 150 memcpy(mp_opt->hmac, ptr, MPTCPOPT_HMAC_LEN); in mptcp_parse_option() 506 memcpy(opts->hmac, subflow->hmac, MPTCPOPT_HMAC_LEN); in mptcp_established_options_mp() 621 u8 hmac[SHA256_DIGEST_SIZE]; in add_addr_generate_hmac() local 639 mptcp_crypto_hmac_sha(key1, key2, msg, i, hmac); in add_addr_generate_hmac() 641 return get_unaligned_be64(&hmac[SHA256_DIGEST_SIZE - sizeof(u64)]); in add_addr_generate_hmac() 1104 u64 hmac = 0; in add_addr_hmac_valid() local 1109 hmac = add_addr_generate_hmac(READ_ONCE(msk->remote_key), in add_addr_hmac_valid() 1114 msk, hmac, mp_opt->ahmac); in add_addr_hmac_valid() 1116 return hmac == mp_opt->ahmac; in add_addr_hmac_valid() 1518 memcpy(ptr, opts->hmac, MPTCPOPT_HMAC_LEN); in mptcp_write_options()
|
| /linux-6.15/drivers/crypto/ |
| H A D | atmel-sha.c | 1693 hmac->resume = resume; in atmel_sha_hmac_setup() 1733 memcpy((u8 *)hmac->ipad, key, keylen); in atmel_sha_hmac_setup() 1771 unsafe_memcpy(hmac->opad, hmac->ipad, bs, in atmel_sha_hmac_compute_ipad_hash() 1774 hmac->ipad[i] ^= 0x36363636; in atmel_sha_hmac_compute_ipad_hash() 1775 hmac->opad[i] ^= 0x5c5c5c5c; in atmel_sha_hmac_compute_ipad_hash() 1809 atmel_sha_hmac_key_release(&hmac->hkey); in atmel_sha_hmac_setup_done() 1810 return hmac->resume(dd); in atmel_sha_hmac_setup_done() 1881 memcpy(ctx->digest, hmac->ipad, hs); in atmel_sha_hmac_init_done() 2028 hmac->base.start = atmel_sha_hmac_start; in atmel_sha_hmac_cra_init() 2029 atmel_sha_hmac_key_init(&hmac->hkey); in atmel_sha_hmac_cra_init() [all …]
|
| /linux-6.15/drivers/crypto/ccree/ |
| H A D | cc_aead.c | 52 struct cc_hmac_s hmac; member 95 struct cc_hmac_s *hmac = &ctx->auth_state.hmac; in cc_aead_exit() local 97 if (hmac->ipad_opad) { in cc_aead_exit() 99 hmac->ipad_opad, in cc_aead_exit() 104 hmac->ipad_opad = NULL; in cc_aead_exit() 106 if (hmac->padded_authkey) { in cc_aead_exit() 108 hmac->padded_authkey, in cc_aead_exit() 169 struct cc_hmac_s *hmac = &ctx->auth_state.hmac; in cc_aead_init() local 178 if (!hmac->ipad_opad) { in cc_aead_init() 184 hmac->ipad_opad); in cc_aead_init() [all …]
|
| /linux-6.15/tools/testing/selftests/tpm2/ |
| H A D | tpm2.py | 252 session_attributes=0, hmac=bytes()): argument 256 self.hmac = hmac 259 fmt = '>I H%us B H%us' % (len(self.nonce), len(self.hmac)) 261 self.nonce, self.session_attributes, len(self.hmac), 262 self.hmac) 265 fmt = '>I H%us B H%us' % (len(self.nonce), len(self.hmac)) 651 auth_cmd = AuthCommand(session_handle=policy_handle, hmac=auth_value) 653 auth_cmd = AuthCommand(hmac=auth_value)
|
| /linux-6.15/drivers/nvme/common/ |
| H A D | auth.c | 94 const char hmac[15]; member 99 .hmac = "hmac(sha256)", 104 .hmac = "hmac(sha384)", 109 .hmac = "hmac(sha512)", 118 return hash_map[hmac_id].hmac; in nvme_auth_hmac_name() 138 if (!strlen(hash_map[i].hmac)) in nvme_auth_hmac_id() 140 if (!strncmp(hash_map[i].hmac, hmac_name, in nvme_auth_hmac_id() 141 strlen(hash_map[i].hmac))) in nvme_auth_hmac_id()
|
| H A D | keyring.c | 93 u8 hmac, u8 psk_ver, bool generated) in nvme_tls_psk_lookup() argument 105 psk_ver, generated ? 'G' : 'R', hmac, hostnqn, subnqn); in nvme_tls_psk_lookup()
|
| /linux-6.15/net/sunrpc/ |
| H A D | Kconfig | 47 SHA-1 digests. These include aes128-cts-hmac-sha1-96 and 48 aes256-cts-hmac-sha1-96. 72 SHA-2 digests. These include aes128-cts-hmac-sha256-128 and 73 aes256-cts-hmac-sha384-192.
|
| /linux-6.15/net/sunrpc/auth_gss/ |
| H A D | gss_krb5_crypto.c | 586 struct xdr_netobj hmac; in gss_krb5_aes_encrypt() local 625 hmac.len = kctx->gk5e->cksumlength; in gss_krb5_aes_encrypt() 626 hmac.data = buf->tail[0].iov_base + buf->tail[0].iov_len; in gss_krb5_aes_encrypt() 639 offset + GSS_KRB5_TOK_HDR_LEN, &hmac); in gss_krb5_aes_encrypt() 818 struct xdr_netobj hmac; in krb5_etm_encrypt() local 859 hmac.data = buf->tail[0].iov_base + buf->tail[0].iov_len; in krb5_etm_encrypt() 860 hmac.len = kctx->gk5e->cksumlength; in krb5_etm_encrypt() 862 buf, offset + GSS_KRB5_TOK_HDR_LEN, &hmac); in krb5_etm_encrypt()
|
| /linux-6.15/drivers/crypto/allwinner/sun8i-ss/ |
| H A D | sun8i-ss-hash.c | 496 int hmac = 0; in sun8i_ss_hash_run() local 570 if (tfmctx->keylen && hmac == 0) { in sun8i_ss_hash_run() 571 hmac = 1; in sun8i_ss_hash_run() 592 if (tfmctx->keylen && hmac == 2) { in sun8i_ss_hash_run() 680 if (hmac > 0) in sun8i_ss_hash_run() 685 if (hmac < 2) in sun8i_ss_hash_run() 688 if (hmac == 1 && !err) { in sun8i_ss_hash_run() 689 hmac = 2; in sun8i_ss_hash_run()
|
| /linux-6.15/drivers/thunderbolt/ |
| H A D | domain.c | 709 u8 hmac[TB_SWITCH_KEY_SIZE]; in tb_domain_challenge_switch_key() local 745 memset(hmac, 0, sizeof(hmac)); in tb_domain_challenge_switch_key() 746 ret = crypto_shash_digest(shash, challenge, sizeof(hmac), hmac); in tb_domain_challenge_switch_key() 751 if (memcmp(response, hmac, sizeof(hmac))) { in tb_domain_challenge_switch_key()
|
| /linux-6.15/drivers/crypto/intel/keembay/ |
| H A D | Kconfig | 81 bool "Enable sha224 and hmac(sha224) support in Intel Keem Bay OCS HCU" 84 Enables support for sha224 and hmac(sha224) algorithms in the Intel 88 Provides OCS HCU hardware acceleration of sha224 and hmac(224).
|
| /linux-6.15/include/uapi/linux/ |
| H A D | seg6_hmac.h | 15 __u8 hmac[SEG6_HMAC_FIELD_LEN]; member
|
| /linux-6.15/drivers/gpu/drm/nouveau/include/nvrm/535.113.01/nvidia/arch/nvalloc/common/inc/gsp/ |
| H A D | gsp_fw_sr_meta.h | 60 NvU8 hmac[32]; member
|
| /linux-6.15/net/ipv6/ |
| H A D | seg6_hmac.c | 274 if (memcmp(hmac_output, tlv->hmac, SEG6_HMAC_FIELD_LEN) != 0) in seg6_hmac_validate_skb() 344 memset(tlv->hmac, 0, SEG6_HMAC_FIELD_LEN); in seg6_push_hmac() 345 err = seg6_hmac_compute(hinfo, srh, saddr, tlv->hmac); in seg6_push_hmac()
|
| /linux-6.15/drivers/crypto/inside-secure/ |
| H A D | safexcel_hash.c | 42 bool hmac; member 270 if (sreq->hmac && in safexcel_handle_req_result() 281 sreq->hmac = 0; in safexcel_handle_req_result() 1030 req->hmac = true; in safexcel_hmac_sha1_init() 1107 req->hmac = true; in safexcel_hmac_init_iv() 1377 req->hmac = true; in safexcel_hmac_sha224_init() 1449 req->hmac = true; in safexcel_hmac_sha256_init() 1635 req->hmac = true; in safexcel_hmac_sha512_init() 1707 req->hmac = true; in safexcel_hmac_sha384_init() 1830 req->hmac = true; in safexcel_hmac_md5_init() [all …]
|
| /linux-6.15/drivers/crypto/inside-secure/eip93/ |
| H A D | Kconfig | 20 Also provide AEAD authenc(hmac(x), cipher(y)) for supported algo.
|