Home
last modified time | relevance | path

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

12

/linux/fs/ubifs/
H A Dauth.c46 u8 *hmac) in ubifs_hash_calc_hmac() argument
48 return crypto_shash_tfm_digest(c->hmac_tfm, hash, c->hash_len, hmac); in ubifs_hash_calc_hmac()
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()
458 err = ubifs_node_calc_hmac(c, node, len, ofs_hmac, hmac); in __ubifs_node_verify_hmac()
460 kfree(hmac); in __ubifs_node_verify_hmac()
[all …]
H A Dmaster.c28 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 Dubifs-media.h678 __u8 hmac[UBIFS_MAX_HMAC_LEN]; member
754 __u8 hmac[UBIFS_MAX_HMAC_LEN]; member
781 __u8 hmac[]; member
H A 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/drivers/crypto/
H A Datmel-sha.c1186 /* copy ready hash (+ finalize hmac) */ in atmel_sha_final()
1600 /* hmac functions */ in atmel_sha_cpu_hash()
1682 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm);
1687 hmac->resume = resume; in atmel_sha_hmac_setup()
1719 if (likely(!atmel_sha_hmac_key_get(&hmac->hkey, &key, &keylen))) in atmel_sha_hmac_setup()
1727 memcpy((u8 *)hmac->ipad, key, keylen); in atmel_sha_hmac_setup()
1728 memset((u8 *)hmac->ipad + keylen, 0, bs - keylen); in atmel_sha_hmac_setup()
1743 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); in atmel_sha_hmac_prehash_key()
1751 hmac->ipad[i] = atmel_sha_read(dd, SHA_REG_DIGEST(i)); in atmel_sha_hmac_prehash_key_done()
1752 memset((u8 *)hmac in atmel_sha_hmac_prehash_key_done()
1689 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); atmel_sha_hmac_setup() local
1750 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); atmel_sha_hmac_prehash_key_done() local
1767 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); atmel_sha_hmac_compute_ipad_hash() local
1787 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); atmel_sha_hmac_compute_opad_hash() local
1803 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); atmel_sha_hmac_setup_done() local
1853 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); atmel_sha_hmac_setkey() local
1874 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); atmel_sha_hmac_init_done() local
1891 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); atmel_sha_hmac_final() local
1950 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); atmel_sha_hmac_digest2() local
2025 struct atmel_sha_hmac_ctx *hmac = crypto_tfm_ctx(tfm); atmel_sha_hmac_cra_init() local
2037 struct atmel_sha_hmac_ctx *hmac = crypto_tfm_ctx(tfm); atmel_sha_hmac_cra_exit() local
2285 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); atmel_sha_authenc_init() local
2308 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); atmel_sha_authenc_init2() local
[all...]
/linux/net/mptcp/
H A 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()
H A Dsubflow.c51 void *hmac) in subflow_generate_hmac() argument
58 mptcp_crypto_hmac_sha(key1, key2, msg, 8, hmac); in subflow_generate_hmac()
69 /* validate received token and create truncated hmac and nonce for SYN-ACK */
73 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()
413 /* validate received truncated hmac and create hmac for third ACK */
416 u8 hmac[SHA256_DIGEST_SIZE]; in subflow_thmac_valid() local
421 hmac); in subflow_thmac_valid()
568 u8 hmac[SHA256_DIGEST_SIZE]; subflow_finish_connect() local
757 u8 hmac[SHA256_DIGEST_SIZE]; subflow_hmac_valid() local
[all...]
H A Doptions.c150 memcpy(mp_opt->hmac, ptr, MPTCPOPT_HMAC_LEN); in mptcp_parse_option()
151 pr_debug("MP_JOIN hmac\n"); in mptcp_parse_option()
516 memcpy(opts->hmac, subflow->hmac, MPTCPOPT_HMAC_LEN); in mptcp_established_options_mp()
631 u8 hmac[SHA256_DIGEST_SIZE]; in add_addr_generate_hmac() local
649 mptcp_crypto_hmac_sha(key1, key2, msg, i, hmac); in add_addr_generate_hmac()
651 return get_unaligned_be64(&hmac[SHA256_DIGEST_SIZE - sizeof(u64)]); in add_addr_generate_hmac()
696 * to avoid appending the hmac even for ADD_ADDR echo in mptcp_established_options_add_addr()
1145 u64 hmac = 0; in add_addr_hmac_valid()
1150 hmac in add_addr_hmac_valid()
1144 u64 hmac = 0; add_addr_hmac_valid() local
[all...]
/linux/tools/testing/selftests/tpm2/
H A 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/scripts/crypto/
H A Dgen-fips-testvecs.py13 import hmac
35 ctx = hmac.new(fips_test_key, digestmod=alg)
H A Dgen-hash-testvecs.py13 import hmac
229 ctx = hmac.new(rand_bytes(32), digestmod=alg)
235 mac = hmac.digest(key, data[:data_len], alg)
/linux/drivers/nvme/common/
H A Dauth.c91 char hmac[15];
95 .hmac = "hmac(sha256)",
99 .hmac = "hmac(sha384)",
103 .hmac = "hmac(sha512)",
111 return hash_map[hmac_id].hmac;
123 if (!strlen(hash_map[i].hmac)) in nvme_auth_digest_name()
125 if (!strncmp(hash_map[i].hmac, hmac_nam in nvme_auth_digest_name()
94 const char hmac[15]; global() member
[all...]
H A Dkeyring.c93 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/net/sunrpc/auth_gss/
H A Dgss_krb5_crypto.c586 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/drivers/crypto/allwinner/sun8i-ss/
H A Dsun8i-ss-hash.c501 int hmac = 0; in sun8i_ss_hash_run() local
575 if (tfmctx->keylen && hmac == 0) { in sun8i_ss_hash_run()
576 hmac = 1; in sun8i_ss_hash_run()
597 if (tfmctx->keylen && hmac == 2) { in sun8i_ss_hash_run()
685 if (hmac > 0) in sun8i_ss_hash_run()
690 if (hmac < 2) in sun8i_ss_hash_run()
693 if (hmac == 1 && !err) { in sun8i_ss_hash_run()
694 hmac = 2; in sun8i_ss_hash_run()
/linux/net/sunrpc/
H A 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/Documentation/translations/zh_CN/filesystems/
H A Dubifs-authentication.rst272 ,. | , . |hmac . |hmac
279 , | , |hmac
/linux/net/ipv6/
H A Dseg6_hmac.c216 if (crypto_memneq(hmac_output, tlv->hmac, SEG6_HMAC_FIELD_LEN)) in seg6_hmac_validate_skb()
299 memset(tlv->hmac, 0, SEG6_HMAC_FIELD_LEN); in seg6_push_hmac()
300 err = seg6_hmac_compute(hinfo, srh, saddr, tlv->hmac); in seg6_push_hmac()
/linux/drivers/crypto/intel/keembay/
H A 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/fs/smb/client/
H A Dcifsencrypt.c36 if (ctx->hmac) { in cifs_sig_update()
37 hmac_sha256_update(ctx->hmac, data, len); in cifs_sig_update()
49 if (ctx->hmac) { in cifs_sig_final()
50 hmac_sha256_final(ctx->hmac, out); in cifs_sig_final()
/linux/drivers/thunderbolt/
H A Ddomain.c716 u8 hmac[TB_SWITCH_KEY_SIZE]; in tb_domain_challenge_switch_key() local
733 static_assert(sizeof(hmac) == SHA256_DIGEST_SIZE); in tb_domain_challenge_switch_key()
735 challenge, sizeof(challenge), hmac); in tb_domain_challenge_switch_key()
738 if (crypto_memneq(response, hmac, sizeof(hmac))) in tb_domain_challenge_switch_key()
/linux/include/uapi/linux/
H A Dseg6_hmac.h15 __u8 hmac[SEG6_HMAC_FIELD_LEN]; member
/linux/drivers/crypto/inside-secure/
H A Dsafexcel_hash.c42 bool hmac; member
272 if (sreq->hmac && in safexcel_handle_req_result()
283 sreq->hmac = 0; in safexcel_handle_req_result()
703 (req->finish && req->hmac && in safexcel_ahash_enqueue()
827 } else if (unlikely(req->hmac && in safexcel_ahash_final()
861 } else if (req->hmac) { in safexcel_ahash_final()
1028 req->hmac = true; in safexcel_hmac_sha1_init()
1105 req->hmac = true; in safexcel_hmac_init_iv()
1375 req->hmac = true; in safexcel_hmac_sha224_init()
1447 req->hmac = true; in safexcel_hmac_sha256_init()
[all …]
/linux/net/ceph/
H A Dcrypto.c442 int buf_len, u8 hmac[SHA256_DIGEST_SIZE]) in ceph_hmac_sha256()
447 memset(hmac, 0, SHA256_DIGEST_SIZE); in ceph_hmac_sha256()
450 hmac_sha256(&key->hmac_key, buf, buf_len, hmac); in ceph_hmac_sha256()
/linux/drivers/net/wireguard/
H A 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()

12