Home
last modified time | relevance | path

Searched full:hmac (Results 1 – 25 of 177) sorted by relevance

12345678

/linux/fs/ubifs/
H A Dauth.c38 * 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/net/sctp/
H A DKconfig53 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/Documentation/ABI/testing/
H A Devm8 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/drivers/crypto/caam/
H A Dcaamalg.c2140 .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 …]
H A Dcaamalg_qi.c1653 .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 …]
H A Dcaamalg_qi2.c1862 .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/drivers/crypto/intel/keembay/
H A Dkeembay-ocs-hcu-core.c9 #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 …]
H A DKconfig73 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/security/integrity/evm/
H A DKconfig22 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.
H A Devm_main.c105 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 …]
H A Devm_crypto.c10 * 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/Documentation/networking/
H A Dseg6-sysctl.rst20 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/drivers/crypto/inside-secure/
H A Dsafexcel_hash.c9 #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/drivers/crypto/
H A Datmel-sha.c1193 /* 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 …]
H A Dtalitos.c1217 /* 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/drivers/crypto/allwinner/sun8i-ss/
H A Dsun8i-ss-hash.c13 #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/drivers/nvme/common/
H A Dauth.c91 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/Documentation/devicetree/bindings/crypto/
H A Dnvidia,tegra234-se-hash.yaml12 HMAC(SHA224), HMAC(SHA256), HMAC(SHA384), HMAC(SHA512)
/linux/drivers/crypto/starfive/
H A Djh7110-hash.c3 * 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/net/ipv6/
H A Dseg6_hmac.c3 * 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()
[all...]
/linux/Documentation/security/tpm/
H A Dtpm-security.rst60 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/drivers/crypto/ccree/
H A Dcc_aead.c52 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/net/sunrpc/auth_gss/
H A Dgss_krb5_crypto.c302 * @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/net/mptcp/
H A Dcrypto_test.c35 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/Documentation/crypto/
H A Darchitecture.rst27 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

12345678