Home
last modified time | relevance | path

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

1234567

/linux/include/crypto/
H A Dsha2.h135 * HMAC key and message context structs, shared by HMAC-SHA224 and HMAC-SHA256.
206 * struct hmac_sha224_key - Prepared key for HMAC-SHA224
214 * struct hmac_sha224_ctx - Context for computing HMAC-SHA224 of a message
222 * hmac_sha224_preparekey() - Prepare a key for HMAC-SHA224
224 * @raw_key: the raw HMAC-SHA224 key
236 * hmac_sha224_init() - Initialize an HMAC-SHA224 context for a new message
237 * @ctx: (output) the HMAC context to initialize
238 * @key: the prepared HMAC key
251 * hmac_sha224_init_usingrawkey() - Initialize an HMAC-SHA224 context for a new
253 * @ctx: (output) the HMAC context to initialize
[all …]
H A Dmd5.h92 * struct hmac_md5_key - Prepared key for HMAC-MD5
102 * struct hmac_md5_ctx - Context for computing HMAC-MD5 of a message
112 * hmac_md5_preparekey() - Prepare a key for HMAC-MD5
114 * @raw_key: the raw HMAC-MD5 key
126 * hmac_md5_init() - Initialize an HMAC-MD5 context for a new message
127 * @ctx: (output) the HMAC context to initialize
128 * @key: the prepared HMAC key
137 * hmac_md5_init_usingrawkey() - Initialize an HMAC-MD5 context for a new
139 * @ctx: (output) the HMAC context to initialize
140 * @raw_key: the raw HMAC-MD5 key
[all …]
/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/drivers/crypto/inside-secure/eip93/
H A Deip93-aead.c13 #include <crypto/hmac.h>
272 .cra_name = "authenc(hmac(md5),cbc(aes))",
274 "authenc(hmac(md5-eip93), cbc(aes-eip93))",
300 .cra_name = "authenc(hmac(sha1),cbc(aes))",
302 "authenc(hmac(sha1-eip93),cbc(aes-eip93))",
328 .cra_name = "authenc(hmac(sha224),cbc(aes))",
330 "authenc(hmac(sha224-eip93),cbc(aes-eip93))",
356 .cra_name = "authenc(hmac(sha256),cbc(aes))",
358 "authenc(hmac(sha256-eip93),cbc(aes-eip93))",
385 .cra_name = "authenc(hmac(md5),rfc3686(ctr(aes)))",
[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.c2246 .cra_name = "authenc(hmac(md5),"
2248 .cra_driver_name = "authenc-hmac-md5-"
2270 .cra_name = "authenc(hmac(sha1),"
2272 .cra_driver_name = "authenc-hmac-sha1-"
2294 .cra_name = "authenc(hmac(sha224),"
2296 .cra_driver_name = "authenc-hmac-sha224-"
2318 .cra_name = "authenc(hmac(sha256),"
2320 .cra_driver_name = "authenc-hmac-sha256-"
2342 .cra_name = "authenc(hmac(sha384),"
2344 .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.c1863 .cra_name = "authenc(hmac(md5),cbc(aes))",
1864 .cra_driver_name = "authenc-hmac-md5-"
1884 .cra_name = "echainiv(authenc(hmac(md5),"
1886 .cra_driver_name = "echainiv-authenc-hmac-md5-"
1907 .cra_name = "authenc(hmac(sha1),cbc(aes))",
1908 .cra_driver_name = "authenc-hmac-sha1-"
1928 .cra_name = "echainiv(authenc(hmac(sha1),"
1931 "hmac-sha1-cbc-aes-caam-qi2",
1951 .cra_name = "authenc(hmac(sha224),cbc(aes))",
1952 .cra_driver_name = "authenc-hmac-sha224-"
[all …]
/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 …]
/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/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/crypto/
H A Dsha256.c3 * Crypto API support for SHA-224, SHA-256, HMAC-SHA224, and HMAC-SHA256
182 /* HMAC-SHA224 */
249 /* HMAC-SHA256 */
356 .base.cra_name = "hmac(sha224)",
357 .base.cra_driver_name = "hmac-sha224-lib",
376 .base.cra_name = "hmac(sha256)",
377 .base.cra_driver_name = "hmac-sha256-lib",
410 MODULE_DESCRIPTION("Crypto API support for SHA-224, SHA-256, HMAC-SHA224, and HMAC-SHA256");
416 MODULE_ALIAS_CRYPTO("hmac(sha224)");
417 MODULE_ALIAS_CRYPTO("hmac-sha224-lib");
[all …]
H A Dsha512.c3 * Crypto API support for SHA-384, SHA-512, HMAC-SHA384, and HMAC-SHA512
188 /* HMAC-SHA384 */
255 /* HMAC-SHA512 */
362 .base.cra_name = "hmac(sha384)",
363 .base.cra_driver_name = "hmac-sha384-lib",
382 .base.cra_name = "hmac(sha512)",
383 .base.cra_driver_name = "hmac-sha512-lib",
416 MODULE_DESCRIPTION("Crypto API support for SHA-384, SHA-512, HMAC-SHA384, and HMAC-SHA512");
422 MODULE_ALIAS_CRYPTO("hmac(sha384)");
423 MODULE_ALIAS_CRYPTO("hmac-sha384-lib");
[all …]
/linux/drivers/crypto/
H A Datmel-sha.c1193 /* copy ready hash (+ finalize hmac) */ in atmel_sha_final()
1607 /* hmac functions */
1689 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); in atmel_sha_hmac_setup() local
1694 hmac->resume = resume; in atmel_sha_hmac_setup()
1726 if (likely(!atmel_sha_hmac_key_get(&hmac->hkey, &key, &keylen))) in atmel_sha_hmac_setup()
1734 memcpy((u8 *)hmac->ipad, key, keylen); in atmel_sha_hmac_setup()
1735 memset((u8 *)hmac->ipad + keylen, 0, bs - keylen); in atmel_sha_hmac_setup()
1750 struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm); in atmel_sha_hmac_prehash_key_done() local
1758 hmac->ipad[i] = atmel_sha_read(dd, SHA_REG_DIGEST(i)); in atmel_sha_hmac_prehash_key_done()
1759 memset((u8 *)hmac->ipad + ds, 0, bs - ds); in atmel_sha_hmac_prehash_key_done()
[all …]
/linux/Documentation/translations/zh_CN/filesystems/
H A Dubifs-authentication.rst211 为确保整个索引真实性,UBIFS 主节点存储基于密钥的哈希(HMAC),覆盖自身内容及
249 图3:索引节点哈希与主节点 HMAC 的覆盖范围
264 状态的 HMAC。因此日志可认证至最后一个认证节点。日志尾部无认证节点的部分无法
272 ,. | , . |hmac . |hmac
279 , | , |hmac
292 日志区位置存储于主节点。因为主节点通过 HMAC 认证,所以未经检测无法篡改。日
294 改此值及其他参数,超级块结构添加 HMAC。超级块节点存储在 LEB 0,仅在功能标
311 节点的 HMAC。创建文件系统(`mkfs.ubifs`) 时需提供此密钥以认证超级块节点。
312 挂载文件系统时也需此密钥验证认证节点并为变更生成新 HMAC
334 证密钥的前提下实现。方法是在每个 HMAC 外额外存储数字签名,供应商随文件系统
[all …]
/linux/drivers/crypto/allwinner/sun8i-ss/
H A Dsun8i-ss-hash.c13 #include <crypto/hmac.h>
496 /* HMAC step: in sun8i_ss_hash_run()
501 int hmac = 0; in sun8i_ss_hash_run() local
575 if (tfmctx->keylen && hmac == 0) { in sun8i_ss_hash_run()
576 hmac = 1; in sun8i_ss_hash_run()
597 if (tfmctx->keylen && hmac == 2) { in sun8i_ss_hash_run()
659 * flow start for hmac = 0 (and HMAC = 1) in sun8i_ss_hash_run()
660 * HMAC = 0 in sun8i_ss_hash_run()
665 * if hmac then hmac = 1 in sun8i_ss_hash_run()
667 * if hmac == 2 in sun8i_ss_hash_run()
[all …]
/linux/drivers/char/tpm/
H A Dtpm2-sessions.c7 * 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
50 * calculating the HMAC. In particular, for NV, volatile and
52 * tpm_buf_append_hmac_session() which appends the hmac session to the
56 * command buffer is finalized so it can fill in the correct HMAC
123 * because several HMAC/KDF schemes use the combination of the
347 * for the HMAC which cannot be computed until the command buffer is
357 * tpm_buf_fill_hmac_session() otherwise the HMAC will be incorrect
385 * before computing the HMAC in tpm_buf_append_hmac_session()
[all …]
/linux/net/sunrpc/auth_gss/
H A Dgss_krb5_crypto.c158 * @cksumout: OUT: a buffer to be filled in with the computed HMAC
160 * Usually expressed as H = HMAC(K, message)[1..h] .
586 struct xdr_netobj hmac; in gss_krb5_aes_encrypt() local
625 hmac.len = kctx->gk5e->cksumlength; in gss_krb5_aes_encrypt()
626 hmac.data = buf->tail[0].iov_base + buf->tail[0].iov_len; in gss_krb5_aes_encrypt()
633 * the hmac. in gss_krb5_aes_encrypt()
639 offset + GSS_KRB5_TOK_HDR_LEN, &hmac); in gss_krb5_aes_encrypt()
650 /* Now update buf to account for HMAC */ in gss_krb5_aes_encrypt()
694 /* Get the packet's hmac value */ in gss_krb5_aes_decrypt()
718 * @cksumout: OUT: a buffer to be filled in with the computed HMAC
[all …]
/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()
529 return starfive_hash_init_tfm(hash, "hmac-sha224-lib", in starfive_hmac_sha224_init_tfm()
535 return starfive_hash_init_tfm(hash, "hmac-sha256-lib", in starfive_hmac_sha256_init_tfm()
541 return starfive_hash_init_tfm(hash, "hmac-sha384-lib", in starfive_hmac_sha384_init_tfm()
547 return starfive_hash_init_tfm(hash, "hmac-sha512-lib", in starfive_hmac_sha512_init_tfm()
553 return starfive_hash_init_tfm(hash, "hmac(sm3-generic)", in starfive_hmac_sm3_init_tfm()
601 .cra_name = "hmac(sha224)",
602 .cra_driver_name = "sha224-hmac-starfive",
658 .cra_name = "hmac(sha256)",
[all …]
/linux/drivers/nvme/common/
H A Dauth.c94 const char hmac[15]; member
99 .hmac = "hmac(sha256)",
104 .hmac = "hmac(sha384)",
109 .hmac = "hmac(sha512)",
118 return hash_map[hmac_id].hmac; in nvme_auth_hmac_name()
138 if (!strlen(hash_map[i].hmac)) in nvme_auth_hmac_id()
140 if (!strncmp(hash_map[i].hmac, hmac_name, in nvme_auth_hmac_id()
141 strlen(hash_map[i].hmac))) in nvme_auth_hmac_id()
480 * The generated PSK for TLS shall be computed applying the HMAC function
482 * DH-HMAC-CHAP_Challenge message with the session key KS as key to the
[all …]
/linux/lib/crypto/
H A DKconfig106 The MD5 and HMAC-MD5 library functions. Select this if your module
192 The SHA-1 and HMAC-SHA1 library functions. Select this if your module
209 The SHA-224, SHA-256, HMAC-SHA224, and HMAC-SHA256 library functions.
229 The SHA-384, SHA-512, HMAC-SHA384, and HMAC-SHA512 library functions.
/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/Documentation/devicetree/bindings/crypto/
H A Dnvidia,tegra234-se-hash.yaml12 HMAC(SHA224), HMAC(SHA256), HMAC(SHA384), HMAC(SHA512)
/linux/net/ipv6/
H A Dseg6_hmac.c3 * SR-IPv6 implementation -- HMAC functions
114 /* Let's build the HMAC text on the ring buffer. The text is composed in seg6_hmac_compute()
120 * 4. HMAC Key ID (32 bits) in seg6_hmac_compute()
139 /* HMAC Key ID */ in seg6_hmac_compute()
171 /* checks if an incoming SR-enabled packet's HMAC status matches
216 if (crypto_memneq(hmac_output, tlv->hmac, SEG6_HMAC_FIELD_LEN)) in seg6_hmac_validate_skb()
299 memset(tlv->hmac, 0, SEG6_HMAC_FIELD_LEN); in seg6_push_hmac()
300 err = seg6_hmac_compute(hinfo, srh, saddr, tlv->hmac); in seg6_push_hmac()

1234567