Home
last modified time | relevance | path

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

12

/Linux-v4.19/net/sctp/
DKconfig54 This option sets the default sctp cookie hmac algorithm
58 bool "Enable optional MD5 hmac cookie generation"
60 Enable optional MD5 hmac based SCTP cookie generation
64 bool "Enable optional SHA1 hmac cookie generation"
66 Enable optional SHA1 hmac based SCTP cookie generation
70 bool "Use no hmac alg in SCTP cookie generation"
72 Use no hmac algorithm in SCTP cookie generation
77 bool "Enable optional MD5 hmac cookie generation"
79 Enable optional MD5 hmac based SCTP cookie generation
84 bool "Enable optional SHA1 hmac cookie generation"
[all …]
Dsm_make_chunk.c1676 if (sctp_sk(ep->base.sk)->hmac) { in sctp_pack_cookie()
1677 SHASH_DESC_ON_STACK(desc, sctp_sk(ep->base.sk)->hmac); in sctp_pack_cookie()
1681 desc->tfm = sctp_sk(ep->base.sk)->hmac; in sctp_pack_cookie()
1744 if (!sctp_sk(ep->base.sk)->hmac) in sctp_unpack_cookie()
1749 SHASH_DESC_ON_STACK(desc, sctp_sk(ep->base.sk)->hmac); in sctp_unpack_cookie()
1752 desc->tfm = sctp_sk(ep->base.sk)->hmac; in sctp_unpack_cookie()
Dauth.c761 digest = auth->auth_hdr.hmac; in sctp_auth_calculate_hmac()
Dsm_statefuns.c4189 struct sctp_hmac *hmac; in sctp_sf_authenticate() local
4219 hmac = sctp_auth_get_hmac(ntohs(auth_hdr->hmac_id)); in sctp_sf_authenticate()
4220 if (sig_len != hmac->hmac_len) in sctp_sf_authenticate()
4230 digest = auth_hdr->hmac; in sctp_sf_authenticate()
/Linux-v4.19/net/sunrpc/auth_gss/
Dgss_krb5_crypto.c735 struct xdr_netobj hmac; in gss_krb5_aes_encrypt() local
781 hmac.len = GSS_KRB5_MAX_CKSUM_LEN; in gss_krb5_aes_encrypt()
782 hmac.data = buf->tail[0].iov_base + buf->tail[0].iov_len; in gss_krb5_aes_encrypt()
796 cksumkey, usage, &hmac); in gss_krb5_aes_encrypt()
952 struct crypto_shash *hmac; in krb5_rc4_setup_seq_key() local
960 hmac = crypto_alloc_shash(kctx->gk5e->cksum_name, 0, 0); in krb5_rc4_setup_seq_key()
961 if (IS_ERR(hmac)) { in krb5_rc4_setup_seq_key()
963 __func__, PTR_ERR(hmac), kctx->gk5e->cksum_name); in krb5_rc4_setup_seq_key()
964 return PTR_ERR(hmac); in krb5_rc4_setup_seq_key()
967 desc = kmalloc(sizeof(*desc) + crypto_shash_descsize(hmac), in krb5_rc4_setup_seq_key()
[all …]
Dgss_krb5_mech.c431 struct crypto_shash *hmac; in context_derive_keys_rc4() local
441 hmac = crypto_alloc_shash(ctx->gk5e->cksum_name, 0, 0); in context_derive_keys_rc4()
442 if (IS_ERR(hmac)) { in context_derive_keys_rc4()
444 __func__, PTR_ERR(hmac), ctx->gk5e->cksum_name); in context_derive_keys_rc4()
445 err = PTR_ERR(hmac); in context_derive_keys_rc4()
449 err = crypto_shash_setkey(hmac, ctx->Ksess, ctx->gk5e->keylength); in context_derive_keys_rc4()
454 desc = kmalloc(sizeof(*desc) + crypto_shash_descsize(hmac), GFP_NOFS); in context_derive_keys_rc4()
462 desc->tfm = hmac; in context_derive_keys_rc4()
492 crypto_free_shash(hmac); in context_derive_keys_rc4()
/Linux-v4.19/drivers/crypto/
Datmel-sha.c1759 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); in atmel_sha_hmac_setup() local
1764 hmac->resume = resume; in atmel_sha_hmac_setup()
1796 if (likely(!atmel_sha_hmac_key_get(&hmac->hkey, &key, &keylen))) in atmel_sha_hmac_setup()
1804 memcpy((u8 *)hmac->ipad, key, keylen); in atmel_sha_hmac_setup()
1805 memset((u8 *)hmac->ipad + keylen, 0, bs - keylen); in atmel_sha_hmac_setup()
1820 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); in atmel_sha_hmac_prehash_key_done() local
1828 hmac->ipad[i] = atmel_sha_read(dd, SHA_REG_DIGEST(i)); in atmel_sha_hmac_prehash_key_done()
1829 memset((u8 *)hmac->ipad + ds, 0, bs - ds); in atmel_sha_hmac_prehash_key_done()
1837 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); in atmel_sha_hmac_compute_ipad_hash() local
1842 memcpy(hmac->opad, hmac->ipad, bs); in atmel_sha_hmac_compute_ipad_hash()
[all …]
Dn2_core.c1357 struct n2_hmac_alg *hmac, *hmac_tmp; in __n2_unregister_algs() local
1364 list_for_each_entry_safe(hmac, hmac_tmp, &hmac_algs, derived.entry) { in __n2_unregister_algs()
1365 crypto_unregister_ahash(&hmac->derived.alg); in __n2_unregister_algs()
1366 list_del(&hmac->derived.entry); in __n2_unregister_algs()
1367 kfree(hmac); in __n2_unregister_algs()
/Linux-v4.19/drivers/crypto/ccree/
Dcc_aead.c55 struct cc_hmac_s hmac; member
102 struct cc_hmac_s *hmac = &ctx->auth_state.hmac; in cc_aead_exit() local
104 if (hmac->ipad_opad) { in cc_aead_exit()
106 hmac->ipad_opad, in cc_aead_exit()
107 hmac->ipad_opad_dma_addr); in cc_aead_exit()
109 &hmac->ipad_opad_dma_addr); in cc_aead_exit()
110 hmac->ipad_opad_dma_addr = 0; in cc_aead_exit()
111 hmac->ipad_opad = NULL; in cc_aead_exit()
113 if (hmac->padded_authkey) { in cc_aead_exit()
115 hmac->padded_authkey, in cc_aead_exit()
[all …]
/Linux-v4.19/drivers/thunderbolt/
Ddomain.c632 u8 hmac[TB_SWITCH_KEY_SIZE]; in tb_domain_challenge_switch_key() local
669 memset(hmac, 0, sizeof(hmac)); in tb_domain_challenge_switch_key()
670 ret = crypto_shash_digest(shash, challenge, sizeof(hmac), hmac); in tb_domain_challenge_switch_key()
675 if (memcmp(response, hmac, sizeof(hmac))) { in tb_domain_challenge_switch_key()
/Linux-v4.19/include/uapi/linux/
Dseg6_hmac.h15 __u8 hmac[SEG6_HMAC_FIELD_LEN]; member
/Linux-v4.19/net/ipv6/
Dseg6_hmac.c279 if (memcmp(hmac_output, tlv->hmac, SEG6_HMAC_FIELD_LEN) != 0) in seg6_hmac_validate_skb()
349 memset(tlv->hmac, 0, SEG6_HMAC_FIELD_LEN); in seg6_push_hmac()
350 err = seg6_hmac_compute(hinfo, srh, saddr, tlv->hmac); in seg6_push_hmac()
/Linux-v4.19/drivers/crypto/qce/
Dsha.c178 const u32 *state, const u8 *buffer, bool hmac) in qce_import_common() argument
199 if (hmac) in qce_import_common()
216 bool hmac = IS_SHA_HMAC(flags); in qce_ahash_import() local
223 state->buffer, hmac); in qce_ahash_import()
228 state->buf, hmac); in qce_ahash_import()
/Linux-v4.19/drivers/crypto/cavium/cpt/
Dcptvf_algs.h98 struct fchmac_context hmac; member
/Linux-v4.19/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-v4.19/Documentation/device-mapper/
Ddm-integrity.txt108 You can also use a hmac algorithm (for example
109 "hmac(sha256):0123456789abcdef"), in this mode it will provide
136 hmac algorithm with a key.
181 64-byte value. It is used to store hmac of sector
Ddm-crypt.txt35 capi:authenc(hmac(sha256),xts(aes))-random
/Linux-v4.19/drivers/char/tpm/
Dtpm2-cmd.c393 const u8 *hmac, u16 hmac_len) in tpm2_buf_append_auth() argument
405 if (hmac && hmac_len) in tpm2_buf_append_auth()
406 tpm_buf_append(buf, hmac, hmac_len); in tpm2_buf_append_auth()
/Linux-v4.19/security/keys/encrypted-keys/
Dencrypted.c666 u8 *hmac; in encrypted_key_decrypt() local
687 hmac = epayload->format + epayload->datablob_len; in encrypted_key_decrypt()
688 ret = hex2bin(hmac, hex_encoded_data + (encrypted_datalen * 2), in encrypted_key_decrypt()
/Linux-v4.19/Documentation/crypto/
Darchitecture.rst50 - hmac(sha1)
52 - authenc(hmac(sha1),cbc(aes))
404 For example, HMAC(SHA256) is implemented with hmac.c and
416 | (hmac) | ---+
/Linux-v4.19/include/linux/
Dsctp.h736 __u8 hmac[0]; member
/Linux-v4.19/drivers/crypto/axis/
Dartpec6_crypto.c2250 artpec6_crypto_init_hash(struct ahash_request *req, u8 type, int hmac) in artpec6_crypto_init_hash() argument
2260 if (hmac) in artpec6_crypto_init_hash()
2265 oper = hmac ? regk_crypto_hmac_sha1 : regk_crypto_sha1; in artpec6_crypto_init_hash()
2268 oper = hmac ? regk_crypto_hmac_sha256 : regk_crypto_sha256; in artpec6_crypto_init_hash()
2271 oper = hmac ? regk_crypto_hmac_sha384 : regk_crypto_sha384; in artpec6_crypto_init_hash()
2274 oper = hmac ? regk_crypto_hmac_sha512 : regk_crypto_sha512; in artpec6_crypto_init_hash()
/Linux-v4.19/crypto/
DMakefile58 obj-$(CONFIG_CRYPTO_HMAC) += hmac.o
/Linux-v4.19/Documentation/filesystems/pohmelfs/
Ddesign_notes.txt67 (hmac or digest). It is also possible to use both or neither (default). Crypto configuration
/Linux-v4.19/drivers/crypto/inside-secure/
Dsafexcel_hash.c30 bool hmac; member
620 if (req->hmac) in safexcel_ahash_update()
918 req->hmac = true; in safexcel_hmac_init_iv()

12