Home
last modified time | relevance | path

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

12

/Linux-v5.4/net/sctp/
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 …]
Dsm_make_chunk.c1668 if (sctp_sk(ep->base.sk)->hmac) { in sctp_pack_cookie()
1669 SHASH_DESC_ON_STACK(desc, sctp_sk(ep->base.sk)->hmac); in sctp_pack_cookie()
1673 desc->tfm = sctp_sk(ep->base.sk)->hmac; in sctp_pack_cookie()
1735 if (!sctp_sk(ep->base.sk)->hmac) in sctp_unpack_cookie()
1740 SHASH_DESC_ON_STACK(desc, sctp_sk(ep->base.sk)->hmac); in sctp_unpack_cookie()
1743 desc->tfm = sctp_sk(ep->base.sk)->hmac; in sctp_unpack_cookie()
/Linux-v5.4/fs/ubifs/
Dauth.c54 u8 *hmac) in ubifs_hash_calc_hmac() argument
61 err = crypto_shash_digest(shash, hash, c->hash_len, hmac); in ubifs_hash_calc_hmac()
100 err = ubifs_hash_calc_hmac(c, hash, auth->hmac); in ubifs_prepare_auth_node()
411 int len, int ofs_hmac, void *hmac) in ubifs_node_calc_hmac() argument
439 return crypto_shash_final(shash, hmac); in ubifs_node_calc_hmac()
474 u8 *hmac; in __ubifs_node_verify_hmac() local
477 hmac = kmalloc(hmac_len, GFP_NOFS); in __ubifs_node_verify_hmac()
478 if (!hmac) in __ubifs_node_verify_hmac()
481 err = ubifs_node_calc_hmac(c, node, len, ofs_hmac, hmac); in __ubifs_node_verify_hmac()
483 kfree(hmac); in __ubifs_node_verify_hmac()
[all …]
Dreplay.c572 static int authenticate_sleb_hmac(struct ubifs_info *c, u8 *hash, u8 *hmac) in authenticate_sleb_hmac() argument
578 return crypto_shash_digest(hmac_desc, hash, c->hash_len, hmac); in authenticate_sleb_hmac()
604 u8 *hash, *hmac; in authenticate_sleb() local
610 hmac = kmalloc(c->hmac_desc_len, GFP_NOFS); in authenticate_sleb()
611 if (!hash || !hmac) { in authenticate_sleb()
627 err = authenticate_sleb_hmac(c, hash, hmac); in authenticate_sleb()
631 err = ubifs_check_hmac(c, auth->hmac, hmac); in authenticate_sleb()
666 kfree(hmac); in authenticate_sleb()
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()
Dubifs-media.h678 __u8 hmac[UBIFS_MAX_HMAC_LEN]; member
754 __u8 hmac[UBIFS_MAX_HMAC_LEN]; member
781 __u8 hmac[]; member
Dsb.c322 offsetof(struct ubifs_sb_node, hmac)); in create_default_filesystem()
342 offsetof(struct ubifs_mst_node, hmac)); in create_default_filesystem()
347 0, offsetof(struct ubifs_mst_node, hmac)); in create_default_filesystem()
586 if (ubifs_hmac_zero(c, sup->hmac)) { in authenticate_sb_node()
598 hmac)); in authenticate_sb_node()
620 offsetof(struct ubifs_sb_node, hmac), 1); in ubifs_write_sb_node()
/Linux-v5.4/net/sunrpc/auth_gss/
Dgss_krb5_crypto.c737 struct xdr_netobj hmac; in gss_krb5_aes_encrypt() local
783 hmac.len = GSS_KRB5_MAX_CKSUM_LEN; in gss_krb5_aes_encrypt()
784 hmac.data = buf->tail[0].iov_base + buf->tail[0].iov_len; in gss_krb5_aes_encrypt()
798 cksumkey, usage, &hmac); in gss_krb5_aes_encrypt()
955 struct crypto_shash *hmac; in krb5_rc4_setup_seq_key() local
963 hmac = crypto_alloc_shash(kctx->gk5e->cksum_name, 0, 0); in krb5_rc4_setup_seq_key()
964 if (IS_ERR(hmac)) { in krb5_rc4_setup_seq_key()
966 __func__, PTR_ERR(hmac), kctx->gk5e->cksum_name); in krb5_rc4_setup_seq_key()
967 return PTR_ERR(hmac); in krb5_rc4_setup_seq_key()
970 desc = kmalloc(sizeof(*desc) + crypto_shash_descsize(hmac), in krb5_rc4_setup_seq_key()
[all …]
Dgss_krb5_mech.c409 struct crypto_shash *hmac; in context_derive_keys_rc4() local
419 hmac = crypto_alloc_shash(ctx->gk5e->cksum_name, 0, 0); in context_derive_keys_rc4()
420 if (IS_ERR(hmac)) { in context_derive_keys_rc4()
422 __func__, PTR_ERR(hmac), ctx->gk5e->cksum_name); in context_derive_keys_rc4()
423 err = PTR_ERR(hmac); in context_derive_keys_rc4()
427 err = crypto_shash_setkey(hmac, ctx->Ksess, ctx->gk5e->keylength); in context_derive_keys_rc4()
432 desc = kmalloc(sizeof(*desc) + crypto_shash_descsize(hmac), GFP_NOFS); in context_derive_keys_rc4()
440 desc->tfm = hmac; in context_derive_keys_rc4()
467 crypto_free_shash(hmac); in context_derive_keys_rc4()
/Linux-v5.4/drivers/crypto/
Datmel-sha.c1756 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); in atmel_sha_hmac_setup() local
1761 hmac->resume = resume; in atmel_sha_hmac_setup()
1793 if (likely(!atmel_sha_hmac_key_get(&hmac->hkey, &key, &keylen))) in atmel_sha_hmac_setup()
1801 memcpy((u8 *)hmac->ipad, key, keylen); in atmel_sha_hmac_setup()
1802 memset((u8 *)hmac->ipad + keylen, 0, bs - keylen); in atmel_sha_hmac_setup()
1817 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); in atmel_sha_hmac_prehash_key_done() local
1825 hmac->ipad[i] = atmel_sha_read(dd, SHA_REG_DIGEST(i)); in atmel_sha_hmac_prehash_key_done()
1826 memset((u8 *)hmac->ipad + ds, 0, bs - ds); in atmel_sha_hmac_prehash_key_done()
1834 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); in atmel_sha_hmac_compute_ipad_hash() local
1839 memcpy(hmac->opad, hmac->ipad, bs); in atmel_sha_hmac_compute_ipad_hash()
[all …]
Dn2_core.c1349 struct n2_hmac_alg *hmac, *hmac_tmp; in __n2_unregister_algs() local
1356 list_for_each_entry_safe(hmac, hmac_tmp, &hmac_algs, derived.entry) { in __n2_unregister_algs()
1357 crypto_unregister_ahash(&hmac->derived.alg); in __n2_unregister_algs()
1358 list_del(&hmac->derived.entry); in __n2_unregister_algs()
1359 kfree(hmac); in __n2_unregister_algs()
/Linux-v5.4/tools/testing/selftests/tpm2/
Dtpm2.py251 hmac=''): 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))
629 auth_cmd = AuthCommand(session_handle=policy_handle, hmac=auth_value)
631 auth_cmd = AuthCommand(hmac=auth_value)
/Linux-v5.4/drivers/crypto/ccree/
Dcc_aead.c51 struct cc_hmac_s hmac; member
99 struct cc_hmac_s *hmac = &ctx->auth_state.hmac; in cc_aead_exit() local
101 if (hmac->ipad_opad) { in cc_aead_exit()
103 hmac->ipad_opad, in cc_aead_exit()
104 hmac->ipad_opad_dma_addr); in cc_aead_exit()
106 &hmac->ipad_opad_dma_addr); in cc_aead_exit()
107 hmac->ipad_opad_dma_addr = 0; in cc_aead_exit()
108 hmac->ipad_opad = NULL; in cc_aead_exit()
110 if (hmac->padded_authkey) { in cc_aead_exit()
112 hmac->padded_authkey, in cc_aead_exit()
[all …]
/Linux-v5.4/drivers/thunderbolt/
Ddomain.c646 u8 hmac[TB_SWITCH_KEY_SIZE]; in tb_domain_challenge_switch_key() local
682 memset(hmac, 0, sizeof(hmac)); in tb_domain_challenge_switch_key()
683 ret = crypto_shash_digest(shash, challenge, sizeof(hmac), hmac); in tb_domain_challenge_switch_key()
688 if (memcmp(response, hmac, sizeof(hmac))) { in tb_domain_challenge_switch_key()
/Linux-v5.4/include/uapi/linux/
Dseg6_hmac.h15 __u8 hmac[SEG6_HMAC_FIELD_LEN]; member
/Linux-v5.4/net/ipv6/
Dseg6_hmac.c274 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-v5.4/drivers/crypto/qce/
Dsha.c170 const u32 *state, const u8 *buffer, bool hmac) in qce_import_common() argument
191 if (hmac) in qce_import_common()
208 bool hmac = IS_SHA_HMAC(flags); in qce_ahash_import() local
215 state->buffer, hmac); in qce_ahash_import()
220 state->buf, hmac); in qce_ahash_import()
/Linux-v5.4/drivers/crypto/inside-secure/
Dsafexcel_hash.c30 bool hmac; member
220 if (sreq->hmac && in safexcel_handle_req_result()
231 sreq->hmac = 0; in safexcel_handle_req_result()
696 } else if (unlikely(req->hmac && in safexcel_ahash_final()
730 } else if (req->hmac) { in safexcel_ahash_final()
893 req->hmac = true; in safexcel_hmac_sha1_init()
992 req->hmac = true; in safexcel_hmac_init_iv()
1252 req->hmac = true; in safexcel_hmac_sha224_init()
1322 req->hmac = true; in safexcel_hmac_sha256_init()
1502 req->hmac = true; in safexcel_hmac_sha512_init()
[all …]
/Linux-v5.4/drivers/crypto/cavium/cpt/
Dcptvf_algs.h95 struct fchmac_context hmac; member
/Linux-v5.4/drivers/net/ethernet/3com/
Dtyphoon.c1346 u32 hmac; in typhoon_download_firmware() local
1382 hmac = le32_to_cpu(fHdr->hmacDigest[0]); in typhoon_download_firmware()
1383 iowrite32(hmac, ioaddr + TYPHOON_REG_DOWNLOAD_HMAC_0); in typhoon_download_firmware()
1384 hmac = le32_to_cpu(fHdr->hmacDigest[1]); in typhoon_download_firmware()
1385 iowrite32(hmac, ioaddr + TYPHOON_REG_DOWNLOAD_HMAC_1); in typhoon_download_firmware()
1386 hmac = le32_to_cpu(fHdr->hmacDigest[2]); in typhoon_download_firmware()
1387 iowrite32(hmac, ioaddr + TYPHOON_REG_DOWNLOAD_HMAC_2); in typhoon_download_firmware()
1388 hmac = le32_to_cpu(fHdr->hmacDigest[3]); in typhoon_download_firmware()
1389 iowrite32(hmac, ioaddr + TYPHOON_REG_DOWNLOAD_HMAC_3); in typhoon_download_firmware()
1390 hmac = le32_to_cpu(fHdr->hmacDigest[4]); in typhoon_download_firmware()
[all …]
/Linux-v5.4/Documentation/admin-guide/device-mapper/
Ddm-integrity.rst131 You can also use a hmac algorithm (for example
132 "hmac(sha256):0123456789abcdef"), in this mode it will provide
159 hmac algorithm with a key.
230 64-byte value. It is used to store hmac of sector
/Linux-v5.4/drivers/char/tpm/
Dtpm2-cmd.c394 const u8 *hmac, u16 hmac_len) in tpm2_buf_append_auth() argument
406 if (hmac && hmac_len) in tpm2_buf_append_auth()
407 tpm_buf_append(buf, hmac, hmac_len); in tpm2_buf_append_auth()
/Linux-v5.4/Documentation/crypto/
Darchitecture.rst50 - hmac(sha1)
52 - authenc(hmac(sha1),cbc(aes))
381 For example, HMAC(SHA256) is implemented with hmac.c and
393 | (hmac) | ---+
/Linux-v5.4/security/keys/encrypted-keys/
Dencrypted.c673 u8 *hmac; in encrypted_key_decrypt() local
694 hmac = epayload->format + epayload->datablob_len; in encrypted_key_decrypt()
695 ret = hex2bin(hmac, hex_encoded_data + (encrypted_datalen * 2), in encrypted_key_decrypt()
/Linux-v5.4/include/linux/
Dsctp.h721 __u8 hmac[0]; member

12