/linux-6.12.1/fs/ubifs/ |
D | auth.c | 38 * ubifs_hash_calc_hmac - calculate a HMAC from a hash 40 * @hash: the node to calculate a HMAC for 41 * @hmac: the returned HMAC 46 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() 58 * It creates a HMAC from the given input hash and writes it to the node. 80 err = ubifs_hash_calc_hmac(c, hash, auth->hmac); in ubifs_prepare_auth_node() 275 snprintf(hmac_name, CRYPTO_MAX_ALG_NAME, "hmac(%s)", in ubifs_init_authentication() 326 ubifs_err(c, "hmac %s is bigger than maximum allowed hmac size (%d > %d)", in ubifs_init_authentication() 376 * ubifs_node_calc_hmac - calculate the HMAC of a UBIFS node [all …]
|
/linux-6.12.1/net/sctp/ |
D | Kconfig | 53 prompt "Default SCTP cookie HMAC encoding" 56 This option sets the default sctp cookie hmac algorithm 60 bool "Enable optional MD5 hmac cookie generation" 62 Enable optional MD5 hmac based SCTP cookie generation 66 bool "Enable optional SHA1 hmac cookie generation" 68 Enable optional SHA1 hmac based SCTP cookie generation 72 bool "Use no hmac alg in SCTP cookie generation" 74 Use no hmac algorithm in SCTP cookie generation 79 bool "Enable optional MD5 hmac cookie generation" 81 Enable optional MD5 hmac based SCTP cookie generation [all …]
|
/linux-6.12.1/Documentation/ABI/testing/ |
D | evm | 8 HMAC-sha1 value across the extended attributes, storing the 12 an HMAC-sha1 generated locally with a 24 0 Enable HMAC validation and creation 27 runtime. Not supported if HMAC validation and 36 will enable HMAC validation and creation 42 will enable HMAC and digital signature validation and 43 HMAC creation and disable all further modification of policy. 72 Note that once an HMAC key has been loaded, it will no longer 74 HMAC key has been loaded will clear the corresponding flag. 81 Loading an HMAC key is the only way to disable metadata
|
/linux-6.12.1/drivers/crypto/caam/ |
D | caamalg.c | 2140 .cra_name = "authenc(hmac(md5)," 2142 .cra_driver_name = "authenc-hmac-md5-" 2164 .cra_name = "authenc(hmac(sha1)," 2166 .cra_driver_name = "authenc-hmac-sha1-" 2188 .cra_name = "authenc(hmac(sha224)," 2190 .cra_driver_name = "authenc-hmac-sha224-" 2212 .cra_name = "authenc(hmac(sha256)," 2214 .cra_driver_name = "authenc-hmac-sha256-" 2236 .cra_name = "authenc(hmac(sha384)," 2238 .cra_driver_name = "authenc-hmac-sha384-" [all …]
|
D | caamalg_qi.c | 1653 .cra_name = "authenc(hmac(md5),cbc(aes))", 1654 .cra_driver_name = "authenc-hmac-md5-" 1674 .cra_name = "echainiv(authenc(hmac(md5)," 1676 .cra_driver_name = "echainiv-authenc-hmac-md5-" 1697 .cra_name = "authenc(hmac(sha1),cbc(aes))", 1698 .cra_driver_name = "authenc-hmac-sha1-" 1718 .cra_name = "echainiv(authenc(hmac(sha1)," 1721 "hmac-sha1-cbc-aes-caam-qi", 1741 .cra_name = "authenc(hmac(sha224),cbc(aes))", 1742 .cra_driver_name = "authenc-hmac-sha224-" [all …]
|
D | caamalg_qi2.c | 1862 .cra_name = "authenc(hmac(md5),cbc(aes))", 1863 .cra_driver_name = "authenc-hmac-md5-" 1883 .cra_name = "echainiv(authenc(hmac(md5)," 1885 .cra_driver_name = "echainiv-authenc-hmac-md5-" 1906 .cra_name = "authenc(hmac(sha1),cbc(aes))", 1907 .cra_driver_name = "authenc-hmac-sha1-" 1927 .cra_name = "echainiv(authenc(hmac(sha1)," 1930 "hmac-sha1-cbc-aes-caam-qi2", 1950 .cra_name = "authenc(hmac(sha224),cbc(aes))", 1951 .cra_driver_name = "authenc-hmac-sha224-" [all …]
|
/linux-6.12.1/arch/s390/crypto/ |
D | hmac_s390.c | 5 * s390 specific HMAC support. 22 * and the hmac-secret (key). To prevent code duplication, the sizes of all 285 .cra_name = "hmac(sha" #x ")", \ 309 struct s390_hmac_alg *hmac; in _s390_hmac_algs_unregister() local 313 hmac = &s390_hmac_algs[i]; in _s390_hmac_algs_unregister() 314 if (!hmac->registered) in _s390_hmac_algs_unregister() 316 crypto_unregister_shash(&hmac->alg); in _s390_hmac_algs_unregister() 322 struct s390_hmac_alg *hmac; in hmac_s390_init() local 331 hmac = &s390_hmac_algs[i]; in hmac_s390_init() 332 if (!cpacf_query_func(CPACF_KMAC, hmac->fc)) in hmac_s390_init() [all …]
|
/linux-6.12.1/drivers/crypto/intel/keembay/ |
D | keembay-ocs-hcu-core.c | 9 #include <crypto/hmac.h> 30 /* Flag marking a HMAC request. */ 32 /* Flag set when HW HMAC is being used. */ 34 /* Flag set when SW HMAC is being used. */ 40 * @key: The key (used only for HMAC transformations). 43 * @is_hmac_tfm: Whether or not this is a HMAC transformation. 62 * @buffer: Buffer to store: partial block of data and SW HMAC 81 * Buffer is double the block size because we need space for SW HMAC 398 * Prepare IPAD for HMAC. Only done for first block. in prepare_ipad() 399 * HMAC(k,m) = H(k ^ opad || H(k ^ ipad || m)) in prepare_ipad() [all …]
|
/linux-6.12.1/security/integrity/evm/ |
D | Kconfig | 22 Include filesystem UUID for HMAC calculation. 27 WARNING: changing the HMAC calculation method or adding 36 Include additional SMACK xattrs for HMAC calculation. 40 in the HMAC calculation, enabling this option includes newly defined 44 WARNING: changing the HMAC calculation method or adding 53 Allow userland to provide additional xattrs for HMAC calculation.
|
D | evm_main.c | 105 pr_info("HMAC attrs: 0x%x\n", evm_hmac_attrs); in evm_init_config() 115 * errors, based on the ability of EVM to calculate HMACs. If the HMAC key 166 * evm_verify_hmac - calculate and compare the HMAC with the EVM xattr 168 * Compute the HMAC on the dentry's protected set of extended attributes 173 * HMAC.) 412 * Calculate the HMAC for the given dentry and verify it against the stored 414 * previously retrieved to calculate the HMAC. 526 /* Exception if the HMAC is not going to be calculated. */ in evm_protect_xattr() 546 /* Exception if the HMAC is not going to be calculated. */ in evm_protect_xattr() 583 * access to the EVM encrypted key needed to calculate the HMAC, prevent [all …]
|
D | evm_crypto.c | 10 * Using root's kernel master key (kmk), calculate the HMAC 38 static const char evm_hmac[] = "hmac(sha1)"; 41 * evm_set_key() - set EVM HMAC key from the kernel 45 * This function allows setting the EVM HMAC key from the kernel 83 pr_err_once("HMAC key is not set\n"); in init_desc() 161 /* The hmac uid and gid must be encoded in the initial user in hmac_add_misc() 214 * Calculate the HMAC value across the set of protected security xattrs. 217 * the hmac using the requested xattr value. Don't alloc/free memory for 362 * Calculate the hmac and update security.evm xattr 424 * Get the key from the TPM for the SHA1-HMAC
|
/linux-6.12.1/Documentation/networking/ |
D | seg6-sysctl.rst | 20 Define HMAC policy for ingress SR-enabled packets on this interface. 22 * -1 - Ignore HMAC field 23 * 0 - Accept SR packets without HMAC, validate SR packets with HMAC 24 * 1 - Drop SR packets without HMAC, validate SR packets with HMAC
|
/linux-6.12.1/drivers/crypto/inside-secure/ |
D | safexcel_hash.c | 9 #include <crypto/hmac.h> 42 bool hmac; member 161 /* Hash continuation or HMAC, setup (inner) digest from state */ in safexcel_context_control() 165 /* Compute digest count for hash/HMAC finish operations */ in safexcel_context_control() 183 /* Special case: zero length HMAC */ in safexcel_context_control() 185 /* PE HW < 4.4 cannot do HMAC continue, fake using hash */ in safexcel_context_control() 192 /* For zero-len HMAC, don't finalize, already padded! */ in safexcel_context_control() 202 /* Clear zero-length HMAC flag for next operation! */ in safexcel_context_control() 204 } else { /* HMAC */ in safexcel_context_control() 205 /* Need outer digest for HMAC finalization */ in safexcel_context_control() [all …]
|
/linux-6.12.1/drivers/char/tpm/ |
D | tpm2-sessions.c | 7 * authorization HMAC and request response encryption. 9 * The idea is to ensure that every TPM command is HMAC protected by a 36 * The design is all the crypto, hash and hmac gunk is confined in this 55 * calculating the HMAC. In particular, for NV, volatile and 57 * tpm_buf_append_hmac_session() which appends the hmac session to the 61 * command buffer is finalized so it can fill in the correct HMAC 78 #include <crypto/hmac.h> 128 * because several HMAC/KDF schemes use the combination of the 307 * for the HMAC which cannot be computed until the command buffer is 317 * tpm_buf_fill_hmac_session() otherwise the HMAC will be incorrect [all …]
|
/linux-6.12.1/drivers/crypto/allwinner/sun8i-ss/ |
D | sun8i-ss-hash.c | 13 #include <crypto/hmac.h> 491 /* HMAC step: in sun8i_ss_hash_run() 496 int hmac = 0; in sun8i_ss_hash_run() local 570 if (tfmctx->keylen && hmac == 0) { in sun8i_ss_hash_run() 571 hmac = 1; in sun8i_ss_hash_run() 592 if (tfmctx->keylen && hmac == 2) { in sun8i_ss_hash_run() 654 * flow start for hmac = 0 (and HMAC = 1) in sun8i_ss_hash_run() 655 * HMAC = 0 in sun8i_ss_hash_run() 660 * if hmac then hmac = 1 in sun8i_ss_hash_run() 662 * if hmac == 2 in sun8i_ss_hash_run() [all …]
|
/linux-6.12.1/drivers/crypto/ |
D | atmel-sha.c | 1193 /* copy ready hash (+ finalize hmac) */ in atmel_sha_final() 1606 /* hmac functions */ 1688 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); in atmel_sha_hmac_setup() local 1693 hmac->resume = resume; in atmel_sha_hmac_setup() 1725 if (likely(!atmel_sha_hmac_key_get(&hmac->hkey, &key, &keylen))) in atmel_sha_hmac_setup() 1733 memcpy((u8 *)hmac->ipad, key, keylen); in atmel_sha_hmac_setup() 1734 memset((u8 *)hmac->ipad + keylen, 0, bs - keylen); in atmel_sha_hmac_setup() 1749 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); in atmel_sha_hmac_prehash_key_done() local 1757 hmac->ipad[i] = atmel_sha_read(dd, SHA_REG_DIGEST(i)); in atmel_sha_hmac_prehash_key_done() 1758 memset((u8 *)hmac->ipad + ds, 0, bs - ds); in atmel_sha_hmac_prehash_key_done() [all …]
|
D | talitos.c | 1217 /* hmac key */ in ipsec_esp() 1229 /* hmac data */ in ipsec_esp() 1248 * extent is bytes of HMAC postpended to ciphertext, in ipsec_esp() 1816 /* HMAC key */ in common_nonsnoop_hash() 1846 /* hash/HMAC out -or- hash context out */ in common_nonsnoop_hash() 2084 /* When the tfm context has a keylen, it's an HMAC. in ahash_process_req() 2085 * A first or last (ie. not middle) descriptor must request HMAC. in ahash_process_req() 2269 .cra_name = "authenc(hmac(sha1),cbc(aes))", 2270 .cra_driver_name = "authenc-hmac-sha1-" 2291 .cra_name = "authenc(hmac(sha1),cbc(aes))", [all …]
|
/linux-6.12.1/drivers/nvme/common/ |
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_name, in nvme_auth_hmac_id() 138 strlen(hash_map[i].hmac))) in nvme_auth_hmac_id()
|
/linux-6.12.1/Documentation/devicetree/bindings/crypto/ |
D | nvidia,tegra234-se-hash.yaml | 12 HMAC(SHA224), HMAC(SHA256), HMAC(SHA384), HMAC(SHA512)
|
/linux-6.12.1/Documentation/security/tpm/ |
D | tpm-security.rst | 60 The first can be thwarted by always doing HMAC protection of the PCR 62 substituted without producing a detectable HMAC failure in the 72 interception which HMAC protection alone cannot protect against, so 131 All TPM commands the kernel uses allow sessions. HMAC sessions may be 134 HMAC and encryption keys are usually derived from the shared 136 known (and usually empty). Thus, every HMAC session used by the 144 session may also be reused for the in-kernel HMAC, encryption and 150 For every in-kernel operation we use null primary salted HMAC to 189 decryption HMAC session salted to the EK primary (which also does not 193 succeeds and the HMAC verifies on return we know we have a loadable
|
/linux-6.12.1/net/ipv6/ |
D | seg6_hmac.c | 3 * SR-IPv6 implementation -- HMAC functions 76 .name = "hmac(sha1)", 80 .name = "hmac(sha256)", 179 /* Let's build the HMAC text on the ring buffer. The text is composed in seg6_hmac_compute() 185 * 4. HMAC Key ID (32 bits) in seg6_hmac_compute() 203 /* HMAC Key ID */ in seg6_hmac_compute() 231 /* checks if an incoming SR-enabled packet's HMAC status matches 274 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-6.12.1/drivers/crypto/starfive/ |
D | jh7110-hash.c | 3 * Hash function and HMAC support for StarFive driver 74 rctx->csr.hash.hmac = 1; in starfive_hash_hmac_key() 526 return starfive_hash_init_tfm(hash, "hmac(sha224-generic)", in starfive_hmac_sha224_init_tfm() 532 return starfive_hash_init_tfm(hash, "hmac(sha256-generic)", in starfive_hmac_sha256_init_tfm() 538 return starfive_hash_init_tfm(hash, "hmac(sha384-generic)", in starfive_hmac_sha384_init_tfm() 544 return starfive_hash_init_tfm(hash, "hmac(sha512-generic)", in starfive_hmac_sha512_init_tfm() 550 return starfive_hash_init_tfm(hash, "hmac(sm3-generic)", in starfive_hmac_sm3_init_tfm() 598 .cra_name = "hmac(sha224)", 599 .cra_driver_name = "sha224-hmac-starfive", 655 .cra_name = "hmac(sha256)", [all …]
|
/linux-6.12.1/net/mptcp/ |
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()
|
/linux-6.12.1/drivers/crypto/ccree/ |
D | cc_aead.c | 52 struct cc_hmac_s hmac; member 94 } else if (ctx->auth_mode != DRV_HASH_NULL) { /* HMAC auth. */ in cc_aead_exit() 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() [all …]
|
/linux-6.12.1/net/sunrpc/auth_gss/ |
D | gss_krb5_crypto.c | 302 * @cksumout: OUT: a buffer to be filled in with the computed HMAC 304 * Usually expressed as H = HMAC(K, message)[1..h] . 785 struct xdr_netobj hmac; in gss_krb5_aes_encrypt() local 824 hmac.len = kctx->gk5e->cksumlength; in gss_krb5_aes_encrypt() 825 hmac.data = buf->tail[0].iov_base + buf->tail[0].iov_len; in gss_krb5_aes_encrypt() 832 * the hmac. in gss_krb5_aes_encrypt() 838 offset + GSS_KRB5_TOK_HDR_LEN, &hmac); in gss_krb5_aes_encrypt() 849 /* Now update buf to account for HMAC */ in gss_krb5_aes_encrypt() 893 /* Get the packet's hmac value */ in gss_krb5_aes_decrypt() 917 * @cksumout: OUT: a buffer to be filled in with the computed HMAC [all …]
|