Home
last modified time | relevance | path

Searched refs:hmac (Results 1 – 25 of 54) sorted by relevance

123

/Linux-v6.6/fs/ubifs/
Dauth.c47 u8 *hmac) in ubifs_hash_calc_hmac() argument
49 return crypto_shash_tfm_digest(c->hmac_tfm, hash, c->hash_len, hmac); in ubifs_hash_calc_hmac()
81 err = ubifs_hash_calc_hmac(c, hash, auth->hmac); in ubifs_prepare_auth_node()
389 int len, int ofs_hmac, void *hmac) in ubifs_node_calc_hmac() argument
417 return crypto_shash_final(shash, hmac); in ubifs_node_calc_hmac()
452 u8 *hmac; in __ubifs_node_verify_hmac() local
455 hmac = kmalloc(hmac_len, GFP_NOFS); in __ubifs_node_verify_hmac()
456 if (!hmac) in __ubifs_node_verify_hmac()
459 err = ubifs_node_calc_hmac(c, node, len, ofs_hmac, hmac); in __ubifs_node_verify_hmac()
461 kfree(hmac); in __ubifs_node_verify_hmac()
[all …]
Dmaster.c28 int hmac_offs = offsetof(struct ubifs_mst_node, hmac); in ubifs_compare_master_node()
135 if (ubifs_hmac_zero(c, c->mst_node->hmac)) { in scan_for_master()
143 offsetof(struct ubifs_mst_node, hmac)); in scan_for_master()
458 offsetof(struct ubifs_mst_node, hmac)); in ubifs_write_master()
470 offsetof(struct ubifs_mst_node, hmac)); in ubifs_write_master()
Dubifs-media.h678 __u8 hmac[UBIFS_MAX_HMAC_LEN]; member
754 __u8 hmac[UBIFS_MAX_HMAC_LEN]; member
781 __u8 hmac[]; member
Dsb.c323 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-v6.6/net/sctp/
DKconfig56 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-v6.6/net/mptcp/
Dcrypto_test.c35 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()
Dcrypto.c44 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()
Dsubflow.c52 void *hmac) in subflow_generate_hmac() argument
59 mptcp_crypto_hmac_sha(key1, key2, msg, 8, hmac); in subflow_generate_hmac()
74 u8 hmac[SHA256_DIGEST_SIZE]; in subflow_req_create_thmac() local
80 subflow_req->remote_nonce, hmac); in subflow_req_create_thmac()
82 subflow_req->thmac = get_unaligned_be64(hmac); in subflow_req_create_thmac()
381 u8 hmac[SHA256_DIGEST_SIZE]; in subflow_thmac_valid() local
386 hmac); in subflow_thmac_valid()
388 thmac = get_unaligned_be64(hmac); in subflow_thmac_valid()
501 u8 hmac[SHA256_DIGEST_SIZE]; in subflow_finish_connect() local
528 hmac); in subflow_finish_connect()
[all …]
Doptions.c148 memcpy(mp_opt->hmac, ptr, MPTCPOPT_HMAC_LEN); in mptcp_parse_option()
509 memcpy(opts->hmac, subflow->hmac, MPTCPOPT_HMAC_LEN); in mptcp_established_options_mp()
625 u8 hmac[SHA256_DIGEST_SIZE]; in add_addr_generate_hmac() local
643 mptcp_crypto_hmac_sha(key1, key2, msg, i, hmac); in add_addr_generate_hmac()
645 return get_unaligned_be64(&hmac[SHA256_DIGEST_SIZE - sizeof(u64)]); in add_addr_generate_hmac()
1096 u64 hmac = 0; in add_addr_hmac_valid() local
1101 hmac = add_addr_generate_hmac(msk->remote_key, in add_addr_hmac_valid()
1106 msk, hmac, mp_opt->ahmac); in add_addr_hmac_valid()
1108 return hmac == mp_opt->ahmac; in add_addr_hmac_valid()
1507 memcpy(ptr, opts->hmac, MPTCPOPT_HMAC_LEN); in mptcp_write_options()
/Linux-v6.6/drivers/nvme/common/
Dauth.c91 const char hmac[15]; member
96 .hmac = "hmac(sha256)",
101 .hmac = "hmac(sha384)",
106 .hmac = "hmac(sha512)",
115 return hash_map[hmac_id].hmac; in nvme_auth_hmac_name()
135 if (!strlen(hash_map[i].hmac)) in nvme_auth_hmac_id()
137 if (!strncmp(hash_map[i].hmac, hmac_name, in nvme_auth_hmac_id()
138 strlen(hash_map[i].hmac))) in nvme_auth_hmac_id()
/Linux-v6.6/drivers/crypto/
Datmel-sha.c1690 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); in atmel_sha_hmac_setup() local
1695 hmac->resume = resume; in atmel_sha_hmac_setup()
1727 if (likely(!atmel_sha_hmac_key_get(&hmac->hkey, &key, &keylen))) in atmel_sha_hmac_setup()
1735 memcpy((u8 *)hmac->ipad, key, keylen); in atmel_sha_hmac_setup()
1736 memset((u8 *)hmac->ipad + keylen, 0, bs - keylen); in atmel_sha_hmac_setup()
1751 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); in atmel_sha_hmac_prehash_key_done() local
1759 hmac->ipad[i] = atmel_sha_read(dd, SHA_REG_DIGEST(i)); in atmel_sha_hmac_prehash_key_done()
1760 memset((u8 *)hmac->ipad + ds, 0, bs - ds); in atmel_sha_hmac_prehash_key_done()
1768 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); in atmel_sha_hmac_compute_ipad_hash() local
1773 unsafe_memcpy(hmac->opad, hmac->ipad, bs, in atmel_sha_hmac_compute_ipad_hash()
[all …]
/Linux-v6.6/drivers/crypto/ccree/
Dcc_aead.c52 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()
100 hmac->ipad_opad_dma_addr); in cc_aead_exit()
102 &hmac->ipad_opad_dma_addr); in cc_aead_exit()
103 hmac->ipad_opad_dma_addr = 0; 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()
[all …]
/Linux-v6.6/tools/testing/selftests/tpm2/
Dtpm2.py252 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-v6.6/net/sunrpc/
DKconfig47 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-v6.6/drivers/thunderbolt/
Ddomain.c704 u8 hmac[TB_SWITCH_KEY_SIZE]; in tb_domain_challenge_switch_key() local
740 memset(hmac, 0, sizeof(hmac)); in tb_domain_challenge_switch_key()
741 ret = crypto_shash_digest(shash, challenge, sizeof(hmac), hmac); in tb_domain_challenge_switch_key()
746 if (memcmp(response, hmac, sizeof(hmac))) { in tb_domain_challenge_switch_key()
/Linux-v6.6/drivers/crypto/allwinner/sun8i-ss/
Dsun8i-ss-hash.c513 int hmac = 0; in sun8i_ss_hash_run() local
587 if (tfmctx->keylen && hmac == 0) { in sun8i_ss_hash_run()
588 hmac = 1; in sun8i_ss_hash_run()
609 if (tfmctx->keylen && hmac == 2) { in sun8i_ss_hash_run()
697 if (hmac > 0) in sun8i_ss_hash_run()
702 if (hmac < 2) in sun8i_ss_hash_run()
705 if (hmac == 1 && !err) { in sun8i_ss_hash_run()
706 hmac = 2; in sun8i_ss_hash_run()
/Linux-v6.6/drivers/crypto/intel/keembay/
DKconfig81 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-v6.6/net/sunrpc/auth_gss/
Dgss_krb5_crypto.c785 struct xdr_netobj hmac; in gss_krb5_aes_encrypt() local
824 hmac.len = kctx->gk5e->cksumlength; in gss_krb5_aes_encrypt()
825 hmac.data = buf->tail[0].iov_base + buf->tail[0].iov_len; in gss_krb5_aes_encrypt()
838 offset + GSS_KRB5_TOK_HDR_LEN, &hmac); in gss_krb5_aes_encrypt()
1017 struct xdr_netobj hmac; in krb5_etm_encrypt() local
1058 hmac.data = buf->tail[0].iov_base + buf->tail[0].iov_len; in krb5_etm_encrypt()
1059 hmac.len = kctx->gk5e->cksumlength; in krb5_etm_encrypt()
1061 buf, offset + GSS_KRB5_TOK_HDR_LEN, &hmac); in krb5_etm_encrypt()
/Linux-v6.6/include/uapi/linux/
Dseg6_hmac.h15 __u8 hmac[SEG6_HMAC_FIELD_LEN]; member
/Linux-v6.6/net/ipv6/
Dseg6_hmac.c272 if (memcmp(hmac_output, tlv->hmac, SEG6_HMAC_FIELD_LEN) != 0) in seg6_hmac_validate_skb()
342 memset(tlv->hmac, 0, SEG6_HMAC_FIELD_LEN); in seg6_push_hmac()
343 err = seg6_hmac_compute(hinfo, srh, saddr, tlv->hmac); in seg6_push_hmac()
/Linux-v6.6/drivers/crypto/inside-secure/
Dsafexcel_hash.c42 bool hmac; member
270 if (sreq->hmac && in safexcel_handle_req_result()
281 sreq->hmac = 0; in safexcel_handle_req_result()
705 (req->finish && req->hmac && in safexcel_ahash_enqueue()
829 } else if (unlikely(req->hmac && in safexcel_ahash_final()
863 } else if (req->hmac) { in safexcel_ahash_final()
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()
[all …]
/Linux-v6.6/security/keys/trusted-keys/
Dtrusted_tpm2.c202 const u8 *hmac, u16 hmac_len) in tpm2_buf_append_auth() argument
214 if (hmac && hmac_len) in tpm2_buf_append_auth()
215 tpm_buf_append(buf, hmac, hmac_len); in tpm2_buf_append_auth()
/Linux-v6.6/drivers/net/wireguard/
Dnoise.c305 static void hmac(u8 *out, const u8 *in, const u8 *key, const size_t inlen, const size_t keylen) in hmac() function
360 hmac(secret, data, chaining_key, data_len, NOISE_HASH_LEN); in kdf()
367 hmac(output, output, secret, 1, BLAKE2S_HASH_SIZE); in kdf()
375 hmac(output, output, secret, BLAKE2S_HASH_SIZE + 1, BLAKE2S_HASH_SIZE); in kdf()
383 hmac(output, output, secret, BLAKE2S_HASH_SIZE + 1, BLAKE2S_HASH_SIZE); in kdf()
/Linux-v6.6/drivers/crypto/cavium/cpt/
Dcptvf_algs.h95 struct fchmac_context hmac; member
/Linux-v6.6/drivers/nvme/target/
Dauth.c37 const char *hmac = nvme_auth_hmac_name(key_hash); in nvmet_auth_set_key() local
39 if (!crypto_has_shash(hmac, 0, 0)) { in nvmet_auth_set_key()
40 pr_err("DH-HMAC-CHAP hash %s unsupported\n", hmac); in nvmet_auth_set_key()

123