/kernel/linux/linux-5.10/fs/ubifs/ |
H A D | auth.c | 43 * @hmac: the returned HMAC 48 u8 *hmac) in ubifs_hash_calc_hmac() 50 return crypto_shash_tfm_digest(c->hmac_tfm, hash, c->hash_len, hmac); in ubifs_hash_calc_hmac() 82 err = ubifs_hash_calc_hmac(c, hash, auth->hmac); in ubifs_prepare_auth_node() 277 snprintf(hmac_name, CRYPTO_MAX_ALG_NAME, "hmac(%s)", in ubifs_init_authentication() 328 ubifs_err(c, "hmac %s is bigger than maximum allowed hmac size (%d > %d)", in ubifs_init_authentication() 383 * @hmac: returned HMAC 390 int len, int ofs_hmac, void *hmac) in ubifs_node_calc_hmac() 418 return crypto_shash_final(shash, hmac); in ubifs_node_calc_hmac() 47 ubifs_hash_calc_hmac(const struct ubifs_info *c, const u8 *hash, u8 *hmac) ubifs_hash_calc_hmac() argument 389 ubifs_node_calc_hmac(const struct ubifs_info *c, const void *node, int len, int ofs_hmac, void *hmac) ubifs_node_calc_hmac() argument 453 u8 *hmac; __ubifs_node_verify_hmac() local 510 ubifs_hmac_wkm(struct ubifs_info *c, u8 *hmac) ubifs_hmac_wkm() argument 544 ubifs_hmac_zero(struct ubifs_info *c, const u8 *hmac) ubifs_hmac_zero() argument [all...] |
H A D | master.c | 28 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()
|
/kernel/linux/linux-6.6/fs/ubifs/ |
H A D | auth.c | 42 * @hmac: the returned HMAC 47 u8 *hmac) in ubifs_hash_calc_hmac() 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() 276 snprintf(hmac_name, CRYPTO_MAX_ALG_NAME, "hmac(%s)", in ubifs_init_authentication() 327 ubifs_err(c, "hmac %s is bigger than maximum allowed hmac size (%d > %d)", in ubifs_init_authentication() 382 * @hmac: returned HMAC 389 int len, int ofs_hmac, void *hmac) in ubifs_node_calc_hmac() 417 return crypto_shash_final(shash, hmac); in ubifs_node_calc_hmac() 46 ubifs_hash_calc_hmac(const struct ubifs_info *c, const u8 *hash, u8 *hmac) ubifs_hash_calc_hmac() argument 388 ubifs_node_calc_hmac(const struct ubifs_info *c, const void *node, int len, int ofs_hmac, void *hmac) ubifs_node_calc_hmac() argument 452 u8 *hmac; __ubifs_node_verify_hmac() local 509 ubifs_hmac_wkm(struct ubifs_info *c, u8 *hmac) ubifs_hmac_wkm() argument 543 ubifs_hmac_zero(struct ubifs_info *c, const u8 *hmac) ubifs_hmac_zero() argument [all...] |
H A D | master.c | 28 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()
|
/kernel/linux/linux-5.10/net/mptcp/ |
H A D | crypto_test.c | 35 char hmac[32], hmac_hex[65]; in mptcp_crypto_test_basic() local 42 /* mptcp hmap will convert to be before computing the hmac */ in mptcp_crypto_test_basic() 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 | options.c | 128 memcpy(mp_opt->hmac, ptr, MPTCPOPT_HMAC_LEN); in mptcp_parse_option() 129 pr_debug("MP_JOIN hmac"); in mptcp_parse_option() 446 memcpy(opts->hmac, subflow->hmac, MPTCPOPT_HMAC_LEN); in mptcp_established_options_mp() 548 u8 hmac[SHA256_DIGEST_SIZE]; in add_addr_generate_hmac() local 556 mptcp_crypto_hmac_sha(key1, key2, msg, 7, hmac); in add_addr_generate_hmac() 558 return get_unaligned_be64(&hmac[SHA256_DIGEST_SIZE - sizeof(u64)]); in add_addr_generate_hmac() 565 u8 hmac[SHA256_DIGEST_SIZE]; in add_addr6_generate_hmac() local 573 mptcp_crypto_hmac_sha(key1, key2, msg, 19, hmac); in add_addr6_generate_hmac() 575 return get_unaligned_be64(&hmac[SHA256_DIGEST_SIZ in add_addr6_generate_hmac() 862 u64 hmac = 0; add_addr_hmac_valid() local [all...] |
H A D | subflow.c | 46 void *hmac) in subflow_generate_hmac() 53 mptcp_crypto_hmac_sha(key1, key2, msg, 8, hmac); in subflow_generate_hmac() 62 /* validate received token and create truncated hmac and nonce for SYN-ACK */ 67 u8 hmac[SHA256_DIGEST_SIZE]; in subflow_token_join_request() local 88 subflow_req->remote_nonce, hmac); in subflow_token_join_request() 90 subflow_req->thmac = get_unaligned_be64(hmac); in subflow_token_join_request() 254 /* validate received truncated hmac and create hmac for third ACK */ 257 u8 hmac[SHA256_DIGEST_SIZE]; in subflow_thmac_valid() local 262 hmac); in subflow_thmac_valid() 45 subflow_generate_hmac(u64 key1, u64 key2, u32 nonce1, u32 nonce2, void *hmac) subflow_generate_hmac() argument 324 u8 hmac[SHA256_DIGEST_SIZE]; subflow_finish_connect() local 445 u8 hmac[SHA256_DIGEST_SIZE]; subflow_hmac_valid() local [all...] |
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 71 /* Prepare second part of hmac */ in mptcp_crypto_hmac_sha() 78 sha256(input, SHA256_BLOCK_SIZE + SHA256_DIGEST_SIZE, hmac); in mptcp_crypto_hmac_sha()
|
/kernel/linux/linux-6.6/net/mptcp/ |
H A D | crypto_test.c | 35 char hmac[32], hmac_hex[65]; in mptcp_crypto_test_basic() local 42 /* mptcp hmap will convert to be before computing the hmac */ in mptcp_crypto_test_basic() 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 71 /* Prepare second part of hmac */ in mptcp_crypto_hmac_sha() 78 sha256(input, SHA256_BLOCK_SIZE + SHA256_DIGEST_SIZE, hmac); in mptcp_crypto_hmac_sha()
|
H A D | subflow.c | 52 void *hmac) in subflow_generate_hmac() 59 mptcp_crypto_hmac_sha(key1, key2, msg, 8, hmac); in subflow_generate_hmac() 70 /* validate received token and create truncated hmac and nonce for SYN-ACK */ 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() 378 /* validate received truncated hmac and create hmac for third ACK */ 381 u8 hmac[SHA256_DIGEST_SIZE]; in subflow_thmac_valid() local 386 hmac); in subflow_thmac_valid() 51 subflow_generate_hmac(u64 key1, u64 key2, u32 nonce1, u32 nonce2, void *hmac) subflow_generate_hmac() argument 528 u8 hmac[SHA256_DIGEST_SIZE]; subflow_finish_connect() local 709 u8 hmac[SHA256_DIGEST_SIZE]; subflow_hmac_valid() local [all...] |
/kernel/linux/linux-5.10/drivers/crypto/ |
H A D | atmel-sha.c | 1193 /* copy ready hash (+ finalize hmac) */ in atmel_sha_final() 1608 /* hmac functions */ 1690 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 in atmel_sha_hmac_prehash_key_done() 1768 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 1999 struct atmel_sha_hmac_ctx *hmac = crypto_tfm_ctx(tfm); atmel_sha_hmac_cra_init() local 2011 struct atmel_sha_hmac_ctx *hmac = crypto_tfm_ctx(tfm); atmel_sha_hmac_cra_exit() local 2259 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); atmel_sha_authenc_init() local 2282 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); atmel_sha_authenc_init2() local [all...] |
/kernel/linux/linux-6.6/drivers/crypto/ |
H A D | atmel-sha.c | 1193 /* copy ready hash (+ finalize hmac) */ in atmel_sha_final() 1608 /* hmac functions */ 1690 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 in atmel_sha_hmac_prehash_key_done() 1768 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); atmel_sha_hmac_compute_ipad_hash() local 1788 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); atmel_sha_hmac_compute_opad_hash() local 1804 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); atmel_sha_hmac_setup_done() local 1854 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); atmel_sha_hmac_setkey() local 1875 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); atmel_sha_hmac_init_done() local 1892 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); atmel_sha_hmac_final() local 1951 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); atmel_sha_hmac_digest2() local 2026 struct atmel_sha_hmac_ctx *hmac = crypto_tfm_ctx(tfm); atmel_sha_hmac_cra_init() local 2038 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...] |
/kernel/linux/linux-6.6/drivers/nvme/common/ |
H A D | auth.c | 91 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_nam in nvme_auth_hmac_id() [all...] |
/kernel/linux/linux-5.10/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() 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 in cc_aead_exit() 169 struct cc_hmac_s *hmac = &ctx->auth_state.hmac; cc_aead_init() local 301 struct cc_hmac_s *hmac = &ctx->auth_state.hmac; hmac_setkey() local [all...] |
/kernel/linux/linux-6.6/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() 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 in cc_aead_exit() 169 struct cc_hmac_s *hmac = &ctx->auth_state.hmac; cc_aead_init() local 301 struct cc_hmac_s *hmac = &ctx->auth_state.hmac; hmac_setkey() local [all...] |
/kernel/linux/linux-5.10/tools/testing/selftests/tpm2/ |
H A D | tpm2.py | 251 session_attributes=0, hmac=bytes()): 255 self.hmac = hmac 258 fmt = '>I H%us B H%us' % (len(self.nonce), len(self.hmac)) 260 self.nonce, self.session_attributes, len(self.hmac), 261 self.hmac) 264 fmt = '>I H%us B H%us' % (len(self.nonce), len(self.hmac)) 650 auth_cmd = AuthCommand(session_handle=policy_handle, hmac=auth_value) 652 auth_cmd = AuthCommand(hmac=auth_value)
|
/kernel/linux/linux-5.10/drivers/thunderbolt/ |
H A D | domain.c | 675 u8 hmac[TB_SWITCH_KEY_SIZE]; in tb_domain_challenge_switch_key() local 694 tfm = crypto_alloc_shash("hmac(sha256)", 0, 0); in tb_domain_challenge_switch_key() 711 memset(hmac, 0, sizeof(hmac)); in tb_domain_challenge_switch_key() 712 ret = crypto_shash_digest(shash, challenge, sizeof(hmac), hmac); in tb_domain_challenge_switch_key() 717 if (memcmp(response, hmac, sizeof(hmac))) { in tb_domain_challenge_switch_key()
|
/kernel/linux/linux-6.6/drivers/thunderbolt/ |
H A D | domain.c | 704 u8 hmac[TB_SWITCH_KEY_SIZE]; in tb_domain_challenge_switch_key() local 723 tfm = crypto_alloc_shash("hmac(sha256)", 0, 0); in tb_domain_challenge_switch_key() 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()
|
/kernel/linux/linux-6.6/drivers/crypto/allwinner/sun8i-ss/ |
H A D | sun8i-ss-hash.c | 13 #include <crypto/hmac.h> 513 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() 671 * flow start for hmac = 0 (and HMAC = 1) in sun8i_ss_hash_run() 677 * if hmac then hmac = 1 in sun8i_ss_hash_run() 679 * if hmac == 2 in sun8i_ss_hash_run() 685 * if hmac in sun8i_ss_hash_run() [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/tpm2/ |
H A D | tpm2.py | 252 session_attributes=0, hmac=bytes()): 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)
|
/kernel/linux/linux-5.10/drivers/crypto/qce/ |
H A D | sha.c | 171 const u32 *state, const u8 *buffer, bool hmac) in qce_import_common() 192 if (hmac) in qce_import_common() 209 bool hmac; in qce_ahash_import() local 218 hmac = IS_SHA_HMAC(flags); in qce_ahash_import() 224 state->buffer, hmac); in qce_ahash_import() 229 state->buf, hmac); in qce_ahash_import() 467 .name = "hmac(sha1)", 468 .drv_name = "hmac-sha1-qce", 476 .name = "hmac(sha256)", 477 .drv_name = "hmac 170 qce_import_common(struct ahash_request *req, u64 in_count, const u32 *state, const u8 *buffer, bool hmac) qce_import_common() argument [all...] |
/kernel/linux/linux-5.10/include/uapi/linux/ |
H A D | seg6_hmac.h | 15 __u8 hmac[SEG6_HMAC_FIELD_LEN]; member
|
/kernel/linux/linux-6.6/include/uapi/linux/ |
H A D | seg6_hmac.h | 15 __u8 hmac[SEG6_HMAC_FIELD_LEN]; member
|
/kernel/linux/patches/linux-6.6/prebuilts/usr/include/linux/ |
H A D | seg6_hmac.h | 29 __u8 hmac[SEG6_HMAC_FIELD_LEN]; member
|