Home
last modified time | relevance | path

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

12345678910>>...13

/kernel/linux/linux-5.10/fs/ubifs/
Dauth.c40 * ubifs_hash_calc_hmac - calculate a HMAC from a hash
42 * @hash: the node to calculate a HMAC for
43 * @hmac: the returned HMAC
48 u8 *hmac) in ubifs_hash_calc_hmac() argument
50 return crypto_shash_tfm_digest(c->hmac_tfm, hash, c->hash_len, hmac); in ubifs_hash_calc_hmac()
60 * It creates a HMAC from the given input hash and writes it to the node.
82 err = ubifs_hash_calc_hmac(c, hash, auth->hmac); in ubifs_prepare_auth_node()
277 snprintf(hmac_name, CRYPTO_MAX_ALG_NAME, "hmac(%s)", in ubifs_init_authentication()
328 ubifs_err(c, "hmac %s is bigger than maximum allowed hmac size (%d > %d)", in ubifs_init_authentication()
378 * ubifs_node_calc_hmac - calculate the HMAC of a UBIFS node
[all …]
/kernel/linux/linux-6.6/fs/ubifs/
Dauth.c39 * 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 …]
/kernel/linux/linux-6.6/net/sctp/
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 …]
/kernel/linux/linux-5.10/net/sctp/
DKconfig52 prompt "Default SCTP cookie HMAC encoding"
55 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
[all …]
/kernel/linux/linux-5.10/Documentation/ABI/testing/
Devm7 HMAC-sha1 value across the extended attributes, storing the
11 an HMAC-sha1 generated locally with a
23 0 Enable HMAC validation and creation
26 runtime. Not supported if HMAC validation and
35 will enable HMAC validation and creation
41 will enable HMAC and digital signature validation and
42 HMAC creation and disable all further modification of policy.
65 Note that once an HMAC key has been loaded, it will no longer
67 HMAC key has been loaded will clear the corresponding flag.
74 Loading an HMAC key is the only way to disable metadata
/kernel/linux/linux-6.6/Documentation/ABI/testing/
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
/kernel/linux/linux-5.10/Documentation/networking/
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
/kernel/linux/linux-5.10/drivers/crypto/caam/
Dcaamalg.c2078 .cra_name = "authenc(hmac(md5),"
2080 .cra_driver_name = "authenc-hmac-md5-"
2099 .cra_name = "authenc(hmac(sha1),"
2101 .cra_driver_name = "authenc-hmac-sha1-"
2120 .cra_name = "authenc(hmac(sha224),"
2122 .cra_driver_name = "authenc-hmac-sha224-"
2141 .cra_name = "authenc(hmac(sha256),"
2143 .cra_driver_name = "authenc-hmac-sha256-"
2162 .cra_name = "authenc(hmac(sha384),"
2164 .cra_driver_name = "authenc-hmac-sha384-"
[all …]
Dcaamalg_qi.c1637 .cra_name = "authenc(hmac(md5),cbc(aes))",
1638 .cra_driver_name = "authenc-hmac-md5-"
1658 .cra_name = "echainiv(authenc(hmac(md5),"
1660 .cra_driver_name = "echainiv-authenc-hmac-md5-"
1681 .cra_name = "authenc(hmac(sha1),cbc(aes))",
1682 .cra_driver_name = "authenc-hmac-sha1-"
1702 .cra_name = "echainiv(authenc(hmac(sha1),"
1705 "hmac-sha1-cbc-aes-caam-qi",
1725 .cra_name = "authenc(hmac(sha224),cbc(aes))",
1726 .cra_driver_name = "authenc-hmac-sha224-"
[all …]
/kernel/linux/linux-6.6/drivers/crypto/caam/
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 …]
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 …]
/kernel/linux/linux-5.10/security/integrity/evm/
DKconfig21 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.
Devm_main.c85 pr_info("HMAC attrs: 0x%x\n", evm_hmac_attrs); in evm_init_config()
117 * evm_verify_hmac - calculate and compare the HMAC with the EVM xattr
119 * Compute the HMAC on the dentry's protected set of extended attributes
124 * HMAC.)
264 * Calculate the HMAC for the given dentry and verify it against the stored
266 * previously retrieved to calculate the HMAC.
374 * access to the EVM encrypted key needed to calculate the HMAC, prevent
375 * userspace from writing HMAC value. Writing 'security.evm' requires
384 * there's no HMAC key loaded in evm_inode_setxattr()
411 * there's no HMAC key loaded in evm_inode_removexattr()
[all …]
Devm_crypto.c10 * Using root's kernel master key (kmk), calculate the HMAC
36 static const char evm_hmac[] = "hmac(sha1)";
39 * evm_set_key() - set EVM HMAC key from the kernel
43 * This function allows setting the EVM HMAC key from the kernel
81 pr_err_once("HMAC key is not set\n"); in init_desc()
159 /* The hmac uid and gid must be encoded in the initial user in hmac_add_misc()
178 * Calculate the HMAC value across the set of protected security xattrs.
181 * the hmac using the requested xattr value. Don't alloc/free memory for
296 * Calculate the hmac and update security.evm xattr
349 * Get the key from the TPM for the SHA1-HMAC
/kernel/linux/linux-6.6/security/integrity/evm/
DKconfig21 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.
Devm_main.c106 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 …]
/kernel/linux/linux-6.6/Documentation/networking/
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
/kernel/linux/linux-6.6/drivers/crypto/intel/keembay/
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 …]
/kernel/linux/linux-5.10/drivers/crypto/inside-secure/
Dsafexcel_hash.c9 #include <crypto/hmac.h>
40 bool hmac; member
159 /* Hash continuation or HMAC, setup (inner) digest from state */ in safexcel_context_control()
163 /* Compute digest count for hash/HMAC finish operations */ in safexcel_context_control()
181 /* Special case: zero length HMAC */ in safexcel_context_control()
183 /* PE HW < 4.4 cannot do HMAC continue, fake using hash */ in safexcel_context_control()
190 /* For zero-len HMAC, don't finalize, already padded! */ in safexcel_context_control()
200 /* Clear zero-length HMAC flag for next operation! */ in safexcel_context_control()
202 } else { /* HMAC */ in safexcel_context_control()
203 /* Need outer digest for HMAC finalization */ in safexcel_context_control()
[all …]
/kernel/linux/linux-6.6/drivers/crypto/inside-secure/
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 …]
/kernel/linux/linux-6.6/drivers/crypto/allwinner/sun8i-ss/
Dsun8i-ss-hash.c13 #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 …]
/kernel/linux/linux-5.10/drivers/crypto/
Datmel-sha.c1193 /* 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 …]
/kernel/linux/linux-6.6/drivers/crypto/
Datmel-sha.c1193 /* 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 …]
/kernel/linux/linux-6.6/drivers/nvme/common/
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()
/kernel/linux/linux-5.10/security/keys/trusted-keys/
Dtrusted_tpm2.c31 * @hmac: the session HMAC or password, may be NULL if not used
32 * @hmac_len: the session HMAC or password length, maybe 0 if not used
37 const u8 *hmac, u16 hmac_len) in tpm2_buf_append_auth() argument
49 if (hmac && hmac_len) in tpm2_buf_append_auth()
50 tpm_buf_append(buf, hmac, hmac_len); in tpm2_buf_append_auth()
96 options->keyauth /* hmac */, in tpm2_seal_trusted()
213 options->keyauth /* hmac */, in tpm2_load_cmd()
269 options->blobauth /* hmac */, in tpm2_unseal_cmd()

12345678910>>...13