Home
last modified time | relevance | path

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

1234

/OK3568_Linux_fs/kernel/fs/ubifs/
H A Dauth.c48 u8 *hmac) in ubifs_hash_calc_hmac() argument
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()
390 int len, int ofs_hmac, void *hmac) in ubifs_node_calc_hmac() argument
418 return crypto_shash_final(shash, hmac); in ubifs_node_calc_hmac()
453 u8 *hmac; in __ubifs_node_verify_hmac() local
456 hmac = kmalloc(hmac_len, GFP_NOFS); in __ubifs_node_verify_hmac()
457 if (!hmac) in __ubifs_node_verify_hmac()
460 err = ubifs_node_calc_hmac(c, node, len, ofs_hmac, hmac); in __ubifs_node_verify_hmac()
462 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()
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()
H A Dubifs-media.h678 __u8 hmac[UBIFS_MAX_HMAC_LEN]; member
754 __u8 hmac[UBIFS_MAX_HMAC_LEN]; member
781 __u8 hmac[]; member
/OK3568_Linux_fs/kernel/net/sctp/
H A DKconfig55 This option sets the default sctp cookie hmac algorithm
59 bool "Enable optional MD5 hmac cookie generation"
61 Enable optional MD5 hmac based SCTP cookie generation
65 bool "Enable optional SHA1 hmac cookie generation"
67 Enable optional SHA1 hmac based SCTP cookie generation
71 bool "Use no hmac alg in SCTP cookie generation"
73 Use no hmac algorithm in SCTP cookie generation
78 bool "Enable optional MD5 hmac cookie generation"
80 Enable optional MD5 hmac based SCTP cookie generation
85 bool "Enable optional SHA1 hmac cookie generation"
[all …]
/OK3568_Linux_fs/kernel/crypto/
H A Dfips140_gen_hmac.c117 static void hmac_section(HMAC_CTX *hmac, const char *start, const char *end) in hmac_section() argument
122 HMAC_Update(hmac, start_addr, end_addr - start_addr); in hmac_section()
132 HMAC_CTX *hmac; in main() local
184 hmac = HMAC_CTX_new(); in main()
185 HMAC_Init_ex(hmac, hmac_key, strlen(hmac_key), EVP_sha256(), NULL); in main()
187 hmac_section(hmac, "__fips140_text_start", "__fips140_text_end"); in main()
188 hmac_section(hmac, "__fips140_rodata_start", "__fips140_rodata_end"); in main()
190 HMAC_Final(hmac, dg, &dglen); in main()
/OK3568_Linux_fs/buildroot/package/azure-iot-sdk-c/
H A D0001-hmac-c-fix-mismatching-function-prototype.patch4 Subject: [PATCH] hmac.c: fix mismatching function prototype (#537)
20 src/hmac.c | 2 +-
23 diff --git a/src/hmac.c b/src/hmac.c
25 --- a/c-utility/src/hmac.c
26 +++ b/c-utility/src/hmac.c
/OK3568_Linux_fs/kernel/drivers/crypto/
H A 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 memcpy(hmac->opad, hmac->ipad, bs); in atmel_sha_hmac_compute_ipad_hash()
[all …]
/OK3568_Linux_fs/kernel/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 Doptions.c127 memcpy(mp_opt->hmac, ptr, MPTCPOPT_HMAC_LEN); in mptcp_parse_option()
445 memcpy(opts->hmac, subflow->hmac, MPTCPOPT_HMAC_LEN); in mptcp_established_options_mp()
547 u8 hmac[SHA256_DIGEST_SIZE]; in add_addr_generate_hmac() local
555 mptcp_crypto_hmac_sha(key1, key2, msg, 7, hmac); in add_addr_generate_hmac()
557 return get_unaligned_be64(&hmac[SHA256_DIGEST_SIZE - sizeof(u64)]); in add_addr_generate_hmac()
564 u8 hmac[SHA256_DIGEST_SIZE]; in add_addr6_generate_hmac() local
572 mptcp_crypto_hmac_sha(key1, key2, msg, 19, hmac); in add_addr6_generate_hmac()
574 return get_unaligned_be64(&hmac[SHA256_DIGEST_SIZE - sizeof(u64)]); in add_addr6_generate_hmac()
861 u64 hmac = 0; in add_addr_hmac_valid() local
867 hmac = add_addr_generate_hmac(msk->remote_key, in add_addr_hmac_valid()
[all …]
H A Dsubflow.c47 void *hmac) in subflow_generate_hmac() argument
54 mptcp_crypto_hmac_sha(key1, key2, msg, 8, hmac); in subflow_generate_hmac()
68 u8 hmac[SHA256_DIGEST_SIZE]; in subflow_token_join_request() local
89 subflow_req->remote_nonce, hmac); in subflow_token_join_request()
91 subflow_req->thmac = get_unaligned_be64(hmac); in subflow_token_join_request()
258 u8 hmac[SHA256_DIGEST_SIZE]; in subflow_thmac_valid() local
263 hmac); in subflow_thmac_valid()
265 thmac = get_unaligned_be64(hmac); in subflow_thmac_valid()
326 u8 hmac[SHA256_DIGEST_SIZE]; in subflow_finish_connect() local
347 hmac); in subflow_finish_connect()
[all …]
H A 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()
/OK3568_Linux_fs/u-boot/board/gdsys/p1022/
H A Dcontrolcenterd-id.c734 static int check_hmac(struct key_program *hmac, in check_hmac() argument
740 type = get_unaligned_be32(hmac->code); in check_hmac()
751 return memcmp(computed_hmac, hmac->code + 4, 20); in check_hmac()
773 struct key_program *result = NULL, *hmac = NULL; in load_sd_key_program() local
827 hmac = malloc(sizeof(struct key_program) + header.code_size); in load_sd_key_program()
828 if (!hmac) in load_sd_key_program()
830 *hmac = header; in load_sd_key_program()
832 if (ccdm_mmc_read(mmc, code_offset, hmac->code, in load_sd_key_program()
833 hmac->code_size) < 0) in load_sd_key_program()
835 if (verify_program(hmac)) in load_sd_key_program()
[all …]
/OK3568_Linux_fs/kernel/drivers/crypto/ccree/
H A 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 …]
/OK3568_Linux_fs/kernel/tools/testing/selftests/tpm2/
H A Dtpm2.py251 session_attributes=0, hmac=bytes()): argument
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)
/OK3568_Linux_fs/u-boot/board/gdsys/a38x/
H A Dkeyprogram.c108 struct key_program *result = NULL, *hmac = NULL; in parse_and_check_keyprog() local
117 if (extract_subprogram(&progdata, MAGIC_HMAC, &hmac)) in parse_and_check_keyprog()
120 free(hmac); in parse_and_check_keyprog()
/OK3568_Linux_fs/kernel/drivers/thunderbolt/
H A Ddomain.c675 u8 hmac[TB_SWITCH_KEY_SIZE]; in tb_domain_challenge_switch_key() local
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()
/OK3568_Linux_fs/kernel/drivers/crypto/qce/
H A Dsha.c171 const u32 *state, const u8 *buffer, bool hmac) in qce_import_common() argument
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()
/OK3568_Linux_fs/yocto/meta-openembedded/meta-oe/recipes-crypto/libkcapi/
H A Dlibkcapi_1.4.0.bb24 rm -f ${D}${bindir}/.*.hmac
25 rm -f ${D}${libdir}/.*.hmac
/OK3568_Linux_fs/yocto/poky/meta/recipes-connectivity/openssh/openssh/
H A Dssh_config41 # MACs hmac-md5,hmac-sha1,umac-64@openssh.com
/OK3568_Linux_fs/kernel/security/keys/trusted-keys/
H A Dtrusted_tpm2.c37 const u8 *hmac, u16 hmac_len) in tpm2_buf_append_auth() argument
49 if (hmac && hmac_len) in tpm2_buf_append_auth()
50 tpm_buf_append(buf, hmac, hmac_len); in tpm2_buf_append_auth()
/OK3568_Linux_fs/kernel/tools/crypto/
H A Dgen_fips140_testvecs.py16 import hmac
112 h = hmac.new(hmac_key, message, alg.removeprefix('hmac_'))
/OK3568_Linux_fs/kernel/net/ipv6/
H A Dseg6_hmac.c273 if (memcmp(hmac_output, tlv->hmac, SEG6_HMAC_FIELD_LEN) != 0) in seg6_hmac_validate_skb()
343 memset(tlv->hmac, 0, SEG6_HMAC_FIELD_LEN); in seg6_push_hmac()
344 err = seg6_hmac_compute(hinfo, srh, saddr, tlv->hmac); in seg6_push_hmac()
/OK3568_Linux_fs/buildroot/package/beecrypt/
H A D0001-cppglue.cxx-cplusplus-only.patch19 …lkp.c dlpk.c dlsvdp-dh.c dsa.c elgamal.c endianness.c entropy.c fips186.c hmac.c hmacmd5.c hmacsha…
20 …lkp.c dlpk.c dlsvdp-dh.c dsa.c elgamal.c endianness.c entropy.c fips186.c hmac.c hmacmd5.c hmacsha…
/OK3568_Linux_fs/u-boot/drivers/crypto/rockchip/
H A DKconfig34 bool "Enable rockchip hmac support"
42 bool "Enable rockchip hmac support in spl"
/OK3568_Linux_fs/kernel/drivers/crypto/inside-secure/
H A Dsafexcel_hash.c41 bool hmac; member
269 if (sreq->hmac && in safexcel_handle_req_result()
280 sreq->hmac = 0; in safexcel_handle_req_result()
704 (req->finish && req->hmac && in safexcel_ahash_enqueue()
828 } else if (unlikely(req->hmac && in safexcel_ahash_final()
862 } else if (req->hmac) { in safexcel_ahash_final()
1029 req->hmac = true; in safexcel_hmac_sha1_init()
1127 req->hmac = true; in safexcel_hmac_init_iv()
1402 req->hmac = true; in safexcel_hmac_sha224_init()
1474 req->hmac = true; in safexcel_hmac_sha256_init()
[all …]

1234