/Linux-v6.6/fs/ubifs/ |
D | auth.c | 39 * ubifs_hash_calc_hmac - calculate a HMAC from a hash 41 * @hash: the node to calculate a HMAC for 42 * @hmac: the returned HMAC 47 u8 *hmac) in ubifs_hash_calc_hmac() argument 49 return crypto_shash_tfm_digest(c->hmac_tfm, hash, c->hash_len, hmac); in ubifs_hash_calc_hmac() 59 * It creates a HMAC from the given input hash and writes it to the node. 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() 377 * ubifs_node_calc_hmac - calculate the HMAC of a UBIFS node [all …]
|
/Linux-v6.6/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-v6.6/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-v6.6/drivers/crypto/caam/ |
D | caamalg.c | 2139 .cra_name = "authenc(hmac(md5)," 2141 .cra_driver_name = "authenc-hmac-md5-" 2163 .cra_name = "authenc(hmac(sha1)," 2165 .cra_driver_name = "authenc-hmac-sha1-" 2187 .cra_name = "authenc(hmac(sha224)," 2189 .cra_driver_name = "authenc-hmac-sha224-" 2211 .cra_name = "authenc(hmac(sha256)," 2213 .cra_driver_name = "authenc-hmac-sha256-" 2235 .cra_name = "authenc(hmac(sha384)," 2237 .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 | 1861 .cra_name = "authenc(hmac(md5),cbc(aes))", 1862 .cra_driver_name = "authenc-hmac-md5-" 1882 .cra_name = "echainiv(authenc(hmac(md5)," 1884 .cra_driver_name = "echainiv-authenc-hmac-md5-" 1905 .cra_name = "authenc(hmac(sha1),cbc(aes))", 1906 .cra_driver_name = "authenc-hmac-sha1-" 1926 .cra_name = "echainiv(authenc(hmac(sha1)," 1929 "hmac-sha1-cbc-aes-caam-qi2", 1949 .cra_name = "authenc(hmac(sha224),cbc(aes))", 1950 .cra_driver_name = "authenc-hmac-sha224-" [all …]
|
/Linux-v6.6/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 …]
|
D | Kconfig | 73 sm3, as well as the HMAC variant of these algorithms. 81 bool "Enable sha224 and hmac(sha224) support in Intel Keem Bay OCS HCU" 84 Enables support for sha224 and hmac(sha224) algorithms in the Intel 88 Provides OCS HCU hardware acceleration of sha224 and hmac(224).
|
/Linux-v6.6/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-v6.6/security/integrity/evm/ |
D | Kconfig | 21 Include filesystem UUID for HMAC calculation. 26 WARNING: changing the HMAC calculation method or adding 35 Include additional SMACK xattrs for HMAC calculation. 39 in the HMAC calculation, enabling this option includes newly defined 43 WARNING: changing the HMAC calculation method or adding 52 Allow userland to provide additional xattrs for HMAC calculation.
|
D | evm_main.c | 106 pr_info("HMAC attrs: 0x%x\n", evm_hmac_attrs); in evm_init_config() 116 * errors, based on the ability of EVM to calculate HMACs. If the HMAC key 156 * evm_verify_hmac - calculate and compare the HMAC with the EVM xattr 158 * Compute the HMAC on the dentry's protected set of extended attributes 163 * HMAC.) 395 * Calculate the HMAC for the given dentry and verify it against the stored 397 * previously retrieved to calculate the HMAC. 509 /* Exception if the HMAC is not going to be calculated. */ in evm_protect_xattr() 529 /* Exception if the HMAC is not going to be calculated. */ in evm_protect_xattr() 565 * 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 352 * Calculate the hmac and update security.evm xattr 413 * Get the key from the TPM for the SHA1-HMAC
|
/Linux-v6.6/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-v6.6/drivers/crypto/allwinner/sun8i-ss/ |
D | sun8i-ss-hash.c | 13 #include <crypto/hmac.h> 508 /* HMAC step: in sun8i_ss_hash_run() 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() 672 * HMAC = 0 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() [all …]
|
/Linux-v6.6/drivers/crypto/ |
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->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() 2268 .cra_name = "authenc(hmac(sha1),cbc(aes))", 2269 .cra_driver_name = "authenc-hmac-sha1-" 2290 .cra_name = "authenc(hmac(sha1),cbc(aes))", [all …]
|
/Linux-v6.6/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-v6.6/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 272 if (memcmp(hmac_output, tlv->hmac, SEG6_HMAC_FIELD_LEN) != 0) in seg6_hmac_validate_skb() 342 memset(tlv->hmac, 0, SEG6_HMAC_FIELD_LEN); in seg6_push_hmac() 343 err = seg6_hmac_compute(hinfo, srh, saddr, tlv->hmac); in seg6_push_hmac()
|
/Linux-v6.6/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-v6.6/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-v6.6/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 …]
|
/Linux-v6.6/drivers/crypto/starfive/ |
D | jh7110-hash.c | 3 * Hash function and HMAC support for StarFive driver 67 rctx->csr.hash.hmac = 1; in starfive_hash_hmac_key() 564 return starfive_hash_init_tfm(hash, "hmac(sha224-generic)", in starfive_hmac_sha224_init_tfm() 574 return starfive_hash_init_tfm(hash, "hmac(sha256-generic)", in starfive_hmac_sha256_init_tfm() 584 return starfive_hash_init_tfm(hash, "hmac(sha384-generic)", in starfive_hmac_sha384_init_tfm() 594 return starfive_hash_init_tfm(hash, "hmac(sha512-generic)", in starfive_hmac_sha512_init_tfm() 604 return starfive_hash_init_tfm(hash, "hmac(sm3-generic)", in starfive_hmac_sm3_init_tfm() 653 .cra_name = "hmac(sha224)", 654 .cra_driver_name = "sha224-hmac-starfive", 712 .cra_name = "hmac(sha256)", [all …]
|
/Linux-v6.6/Documentation/crypto/ |
D | architecture.rst | 27 chaining mode, the HMAC mechanism, etc. 50 - hmac(sha1) 52 - authenc(hmac(sha1),cbc(aes)) 377 For example, HMAC(SHA256) is implemented with hmac.c and 389 | (hmac) | ---+ 400 The following call sequence is applicable when a caller triggers an HMAC 403 1. The AHASH API functions are invoked by the caller. The HMAC 406 During initialization of the HMAC cipher, the SHASH cipher type of 410 At one time, the HMAC implementation requires a SHA256 operation 413 2. The HMAC instance now invokes the SHASH API with the SHA256 cipher
|
/Linux-v6.6/net/sunrpc/ |
D | Kconfig | 47 SHA-1 digests. These include aes128-cts-hmac-sha1-96 and 48 aes256-cts-hmac-sha1-96. 72 SHA-2 digests. These include aes128-cts-hmac-sha256-128 and 73 aes256-cts-hmac-sha384-192.
|
/Linux-v6.6/crypto/ |
D | hmac.c | 5 * HMAC: Keyed-Hashing for Message Authentication (RFC2104). 10 * The HMAC implementation is derived from USAGI. 14 #include <crypto/hmac.h> 259 .name = "hmac", 278 MODULE_DESCRIPTION("HMAC hash algorithm"); 279 MODULE_ALIAS_CRYPTO("hmac");
|