Symbol: hmac
arch/s390/crypto/hmac_s390.c
376
struct s390_hmac_alg *hmac;
arch/s390/crypto/hmac_s390.c
380
hmac = &s390_hmac_algs[i];
arch/s390/crypto/hmac_s390.c
381
if (!hmac->registered)
arch/s390/crypto/hmac_s390.c
383
crypto_unregister_shash(&hmac->alg);
arch/s390/crypto/hmac_s390.c
389
struct s390_hmac_alg *hmac;
arch/s390/crypto/hmac_s390.c
398
hmac = &s390_hmac_algs[i];
arch/s390/crypto/hmac_s390.c
399
if (!cpacf_query_func(CPACF_KMAC, hmac->fc))
arch/s390/crypto/hmac_s390.c
402
rc = crypto_register_shash(&hmac->alg);
arch/s390/crypto/hmac_s390.c
405
hmac->alg.halg.base.cra_name);
arch/s390/crypto/hmac_s390.c
408
hmac->registered = true;
arch/s390/crypto/hmac_s390.c
409
pr_debug("registered %s\n", hmac->alg.halg.base.cra_name);
drivers/char/tpm/tpm2-sessions.c
613
u8 *hmac = NULL;
drivers/char/tpm/tpm2-sessions.c
672
hmac = &buf->data[offset_s];
drivers/char/tpm/tpm2-sessions.c
687
if (!hmac) {
drivers/char/tpm/tpm2-sessions.c
746
hmac_sha256_final(&hctx, hmac);
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c
501
int hmac = 0;
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c
575
if (tfmctx->keylen && hmac == 0) {
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c
576
hmac = 1;
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c
597
if (tfmctx->keylen && hmac == 2) {
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c
685
if (hmac > 0)
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c
690
if (hmac < 2)
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c
693
if (hmac == 1 && !err) {
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c
694
hmac = 2;
drivers/crypto/atmel-sha.c
1681
struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm);
drivers/crypto/atmel-sha.c
1686
hmac->resume = resume;
drivers/crypto/atmel-sha.c
1718
if (likely(!atmel_sha_hmac_key_get(&hmac->hkey, &key, &keylen)))
drivers/crypto/atmel-sha.c
1726
memcpy_and_pad(hmac->ipad, bs, key, keylen, 0);
drivers/crypto/atmel-sha.c
1741
struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm);
drivers/crypto/atmel-sha.c
1749
hmac->ipad[i] = atmel_sha_read(dd, SHA_REG_DIGEST(i));
drivers/crypto/atmel-sha.c
1750
memset((u8 *)hmac->ipad + ds, 0, bs - ds);
drivers/crypto/atmel-sha.c
1758
struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm);
drivers/crypto/atmel-sha.c
1763
unsafe_memcpy(hmac->opad, hmac->ipad, bs,
drivers/crypto/atmel-sha.c
1766
hmac->ipad[i] ^= 0x36363636;
drivers/crypto/atmel-sha.c
1767
hmac->opad[i] ^= 0x5c5c5c5c;
drivers/crypto/atmel-sha.c
1770
return atmel_sha_cpu_hash(dd, hmac->ipad, bs, false,
drivers/crypto/atmel-sha.c
1778
struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm);
drivers/crypto/atmel-sha.c
1785
hmac->ipad[i] = atmel_sha_read(dd, SHA_REG_DIGEST(i));
drivers/crypto/atmel-sha.c
1786
return atmel_sha_cpu_hash(dd, hmac->opad, bs, false,
drivers/crypto/atmel-sha.c
1794
struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm);
drivers/crypto/atmel-sha.c
1800
hmac->opad[i] = atmel_sha_read(dd, SHA_REG_DIGEST(i));
drivers/crypto/atmel-sha.c
1801
atmel_sha_hmac_key_release(&hmac->hkey);
drivers/crypto/atmel-sha.c
1802
return hmac->resume(dd);
drivers/crypto/atmel-sha.c
1844
struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm);
drivers/crypto/atmel-sha.c
1846
return atmel_sha_hmac_key_set(&hmac->hkey, key, keylen);
drivers/crypto/atmel-sha.c
1865
struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm);
drivers/crypto/atmel-sha.c
1873
memcpy(ctx->digest, hmac->ipad, hs);
drivers/crypto/atmel-sha.c
1882
struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm);
drivers/crypto/atmel-sha.c
1899
atmel_sha_write(dd, SHA_REG_DIN(i), hmac->opad[i]);
drivers/crypto/atmel-sha.c
1941
struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm);
drivers/crypto/atmel-sha.c
1977
atmel_sha_write(dd, SHA_REG_DIN(i), hmac->ipad[i]);
drivers/crypto/atmel-sha.c
1981
atmel_sha_write(dd, SHA_REG_DIN(i), hmac->opad[i]);
drivers/crypto/atmel-sha.c
2016
struct atmel_sha_hmac_ctx *hmac = crypto_tfm_ctx(tfm);
drivers/crypto/atmel-sha.c
2020
hmac->base.start = atmel_sha_hmac_start;
drivers/crypto/atmel-sha.c
2021
atmel_sha_hmac_key_init(&hmac->hkey);
drivers/crypto/atmel-sha.c
2028
struct atmel_sha_hmac_ctx *hmac = crypto_tfm_ctx(tfm);
drivers/crypto/atmel-sha.c
2030
atmel_sha_hmac_key_release(&hmac->hkey);
drivers/crypto/atmel-sha.c
2276
struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm);
drivers/crypto/atmel-sha.c
2288
ctx->flags = hmac->base.flags;
drivers/crypto/atmel-sha.c
2299
struct atmel_sha_hmac_ctx *hmac = crypto_ahash_ctx(tfm);
drivers/crypto/atmel-sha.c
2306
atmel_sha_write(dd, SHA_REG_DIN(i), hmac->ipad[i]);
drivers/crypto/atmel-sha.c
2310
atmel_sha_write(dd, SHA_REG_DIN(i), hmac->opad[i]);
drivers/crypto/axis/artpec6_crypto.c
2256
artpec6_crypto_init_hash(struct ahash_request *req, u8 type, int hmac)
drivers/crypto/axis/artpec6_crypto.c
2266
if (hmac)
drivers/crypto/axis/artpec6_crypto.c
2271
oper = hmac ? regk_crypto_hmac_sha1 : regk_crypto_sha1;
drivers/crypto/axis/artpec6_crypto.c
2274
oper = hmac ? regk_crypto_hmac_sha256 : regk_crypto_sha256;
drivers/crypto/cavium/cpt/cptvf_algs.h
95
struct fchmac_context hmac;
drivers/crypto/ccree/cc_aead.c
100
hmac->ipad_opad,
drivers/crypto/ccree/cc_aead.c
1004
ctx->auth_state.hmac.ipad_opad_dma_addr, digest_size,
drivers/crypto/ccree/cc_aead.c
101
hmac->ipad_opad_dma_addr);
drivers/crypto/ccree/cc_aead.c
103
&hmac->ipad_opad_dma_addr);
drivers/crypto/ccree/cc_aead.c
104
hmac->ipad_opad_dma_addr = 0;
drivers/crypto/ccree/cc_aead.c
105
hmac->ipad_opad = NULL;
drivers/crypto/ccree/cc_aead.c
107
if (hmac->padded_authkey) {
drivers/crypto/ccree/cc_aead.c
109
hmac->padded_authkey,
drivers/crypto/ccree/cc_aead.c
110
hmac->padded_authkey_dma_addr);
drivers/crypto/ccree/cc_aead.c
112
&hmac->padded_authkey_dma_addr);
drivers/crypto/ccree/cc_aead.c
113
hmac->padded_authkey_dma_addr = 0;
drivers/crypto/ccree/cc_aead.c
1133
(ctx->auth_state.hmac.ipad_opad_dma_addr + digest_size),
drivers/crypto/ccree/cc_aead.c
114
hmac->padded_authkey = NULL;
drivers/crypto/ccree/cc_aead.c
170
struct cc_hmac_s *hmac = &ctx->auth_state.hmac;
drivers/crypto/ccree/cc_aead.c
172
dma_addr_t *pkey_dma = &hmac->padded_authkey_dma_addr;
drivers/crypto/ccree/cc_aead.c
175
hmac->ipad_opad = dma_alloc_coherent(dev, digest_size,
drivers/crypto/ccree/cc_aead.c
176
&hmac->ipad_opad_dma_addr,
drivers/crypto/ccree/cc_aead.c
179
if (!hmac->ipad_opad) {
drivers/crypto/ccree/cc_aead.c
185
hmac->ipad_opad);
drivers/crypto/ccree/cc_aead.c
187
hmac->padded_authkey = dma_alloc_coherent(dev,
drivers/crypto/ccree/cc_aead.c
192
if (!hmac->padded_authkey) {
drivers/crypto/ccree/cc_aead.c
197
ctx->auth_state.hmac.ipad_opad = NULL;
drivers/crypto/ccree/cc_aead.c
198
ctx->auth_state.hmac.padded_authkey = NULL;
drivers/crypto/ccree/cc_aead.c
302
struct cc_hmac_s *hmac = &ctx->auth_state.hmac;
drivers/crypto/ccree/cc_aead.c
339
hmac->padded_authkey_dma_addr,
drivers/crypto/ccree/cc_aead.c
350
(hmac->ipad_opad_dma_addr + digest_ofs),
drivers/crypto/ccree/cc_aead.c
427
ctx->auth_state.hmac.padded_authkey_dma_addr;
drivers/crypto/ccree/cc_aead.c
53
struct cc_hmac_s hmac;
drivers/crypto/ccree/cc_aead.c
96
struct cc_hmac_s *hmac = &ctx->auth_state.hmac;
drivers/crypto/ccree/cc_aead.c
98
if (hmac->ipad_opad) {
drivers/crypto/inside-secure/safexcel_hash.c
1028
req->hmac = true;
drivers/crypto/inside-secure/safexcel_hash.c
1105
req->hmac = true;
drivers/crypto/inside-secure/safexcel_hash.c
1375
req->hmac = true;
drivers/crypto/inside-secure/safexcel_hash.c
1447
req->hmac = true;
drivers/crypto/inside-secure/safexcel_hash.c
1633
req->hmac = true;
drivers/crypto/inside-secure/safexcel_hash.c
1705
req->hmac = true;
drivers/crypto/inside-secure/safexcel_hash.c
1828
req->hmac = true;
drivers/crypto/inside-secure/safexcel_hash.c
2224
req->hmac = true;
drivers/crypto/inside-secure/safexcel_hash.c
272
if (sreq->hmac &&
drivers/crypto/inside-secure/safexcel_hash.c
2749
req->hmac = true;
drivers/crypto/inside-secure/safexcel_hash.c
2820
req->hmac = true;
drivers/crypto/inside-secure/safexcel_hash.c
283
sreq->hmac = 0;
drivers/crypto/inside-secure/safexcel_hash.c
2891
req->hmac = true;
drivers/crypto/inside-secure/safexcel_hash.c
2962
req->hmac = true;
drivers/crypto/inside-secure/safexcel_hash.c
42
bool hmac;
drivers/crypto/inside-secure/safexcel_hash.c
703
(req->finish && req->hmac &&
drivers/crypto/inside-secure/safexcel_hash.c
827
} else if (unlikely(req->hmac &&
drivers/crypto/inside-secure/safexcel_hash.c
861
} else if (req->hmac) {
drivers/crypto/marvell/octeontx/otx_cptvf_algs.c
108
if (memcmp(rctx->fctx.hmac.s.hmac_calc,
drivers/crypto/marvell/octeontx/otx_cptvf_algs.c
109
rctx->fctx.hmac.s.hmac_recv,
drivers/crypto/marvell/octeontx/otx_cptvf_algs.c
1117
rctx->fctx.hmac.s.hmac_recv, mac_len,
drivers/crypto/marvell/octeontx/otx_cptvf_algs.c
1124
req_info->out[argcnt].vptr = rctx->fctx.hmac.s.hmac_calc;
drivers/crypto/marvell/octeontx/otx_cptvf_algs.c
911
memcpy(fctx->hmac.e.ipad, ctx->ipad, ds);
drivers/crypto/marvell/octeontx/otx_cptvf_algs.c
913
memcpy(fctx->hmac.e.opad, ctx->opad, ds);
drivers/crypto/marvell/octeontx/otx_cptvf_algs.h
126
union otx_cpt_fchmac_ctx hmac;
drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c
1196
rctx->fctx.hmac.s.hmac_recv, mac_len,
drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c
1201
req_info->out[argcnt].vptr = rctx->fctx.hmac.s.hmac_calc;
drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c
93
if (memcmp(rctx->fctx.hmac.s.hmac_calc,
drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c
94
rctx->fctx.hmac.s.hmac_recv,
drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c
997
memcpy(fctx->hmac.e.ipad, ctx->ipad, ds);
drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c
999
memcpy(fctx->hmac.e.opad, ctx->opad, ds);
drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.h
117
union otx2_cpt_fc_hmac_ctx hmac;
drivers/crypto/starfive/jh7110-cryp.h
90
u32 hmac :1;
drivers/crypto/starfive/jh7110-hash.c
74
rctx->csr.hash.hmac = 1;
drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/nvrm/gsp.h
661
NvU8 hmac[32];
drivers/net/ethernet/3com/typhoon.c
1363
u32 hmac;
drivers/net/ethernet/3com/typhoon.c
1399
hmac = le32_to_cpu(fHdr->hmacDigest[0]);
drivers/net/ethernet/3com/typhoon.c
1400
iowrite32(hmac, ioaddr + TYPHOON_REG_DOWNLOAD_HMAC_0);
drivers/net/ethernet/3com/typhoon.c
1401
hmac = le32_to_cpu(fHdr->hmacDigest[1]);
drivers/net/ethernet/3com/typhoon.c
1402
iowrite32(hmac, ioaddr + TYPHOON_REG_DOWNLOAD_HMAC_1);
drivers/net/ethernet/3com/typhoon.c
1403
hmac = le32_to_cpu(fHdr->hmacDigest[2]);
drivers/net/ethernet/3com/typhoon.c
1404
iowrite32(hmac, ioaddr + TYPHOON_REG_DOWNLOAD_HMAC_2);
drivers/net/ethernet/3com/typhoon.c
1405
hmac = le32_to_cpu(fHdr->hmacDigest[3]);
drivers/net/ethernet/3com/typhoon.c
1406
iowrite32(hmac, ioaddr + TYPHOON_REG_DOWNLOAD_HMAC_3);
drivers/net/ethernet/3com/typhoon.c
1407
hmac = le32_to_cpu(fHdr->hmacDigest[4]);
drivers/net/ethernet/3com/typhoon.c
1408
iowrite32(hmac, ioaddr + TYPHOON_REG_DOWNLOAD_HMAC_4);
drivers/net/wireguard/noise.c
360
hmac(secret, data, chaining_key, data_len, NOISE_HASH_LEN);
drivers/net/wireguard/noise.c
367
hmac(output, output, secret, 1, BLAKE2S_HASH_SIZE);
drivers/net/wireguard/noise.c
375
hmac(output, output, secret, BLAKE2S_HASH_SIZE + 1, BLAKE2S_HASH_SIZE);
drivers/net/wireguard/noise.c
383
hmac(output, output, secret, BLAKE2S_HASH_SIZE + 1, BLAKE2S_HASH_SIZE);
drivers/nvme/common/auth.c
103
.hmac = "hmac(sha512)",
drivers/nvme/common/auth.c
111
return hash_map[hmac_id].hmac;
drivers/nvme/common/auth.c
123
if (!strlen(hash_map[i].hmac))
drivers/nvme/common/auth.c
125
if (!strncmp(hash_map[i].hmac, hmac_name,
drivers/nvme/common/auth.c
126
strlen(hash_map[i].hmac)))
drivers/nvme/common/auth.c
231
int nvme_auth_hmac_init(struct nvme_auth_hmac_ctx *hmac, u8 hmac_id,
drivers/nvme/common/auth.c
234
hmac->hmac_id = hmac_id;
drivers/nvme/common/auth.c
237
hmac_sha256_init_usingrawkey(&hmac->sha256, key, key_len);
drivers/nvme/common/auth.c
240
hmac_sha384_init_usingrawkey(&hmac->sha384, key, key_len);
drivers/nvme/common/auth.c
243
hmac_sha512_init_usingrawkey(&hmac->sha512, key, key_len);
drivers/nvme/common/auth.c
251
void nvme_auth_hmac_update(struct nvme_auth_hmac_ctx *hmac, const u8 *data,
drivers/nvme/common/auth.c
254
switch (hmac->hmac_id) {
drivers/nvme/common/auth.c
256
hmac_sha256_update(&hmac->sha256, data, data_len);
drivers/nvme/common/auth.c
259
hmac_sha384_update(&hmac->sha384, data, data_len);
drivers/nvme/common/auth.c
262
hmac_sha512_update(&hmac->sha512, data, data_len);
drivers/nvme/common/auth.c
271
void nvme_auth_hmac_final(struct nvme_auth_hmac_ctx *hmac, u8 *out)
drivers/nvme/common/auth.c
273
switch (hmac->hmac_id) {
drivers/nvme/common/auth.c
275
hmac_sha256_final(&hmac->sha256, out);
drivers/nvme/common/auth.c
278
hmac_sha384_final(&hmac->sha384, out);
drivers/nvme/common/auth.c
281
hmac_sha512_final(&hmac->sha512, out);
drivers/nvme/common/auth.c
292
struct nvme_auth_hmac_ctx hmac;
drivers/nvme/common/auth.c
295
ret = nvme_auth_hmac_init(&hmac, hmac_id, key, key_len);
drivers/nvme/common/auth.c
297
nvme_auth_hmac_update(&hmac, data, data_len);
drivers/nvme/common/auth.c
298
nvme_auth_hmac_final(&hmac, out);
drivers/nvme/common/auth.c
323
struct nvme_auth_hmac_ctx hmac;
drivers/nvme/common/auth.c
338
ret = nvme_auth_hmac_init(&hmac, key->hash, key->key, key->len);
drivers/nvme/common/auth.c
344
memzero_explicit(&hmac, sizeof(hmac));
drivers/nvme/common/auth.c
347
nvme_auth_hmac_update(&hmac, nqn, strlen(nqn));
drivers/nvme/common/auth.c
348
nvme_auth_hmac_update(&hmac, "NVMe-over-Fabrics", 17);
drivers/nvme/common/auth.c
349
nvme_auth_hmac_final(&hmac, transformed_key->key);
drivers/nvme/common/auth.c
541
struct nvme_auth_hmac_ctx hmac;
drivers/nvme/common/auth.c
548
ret = nvme_auth_hmac_init(&hmac, hmac_id, skey, skey_len);
drivers/nvme/common/auth.c
553
memzero_explicit(&hmac, sizeof(hmac));
drivers/nvme/common/auth.c
556
nvme_auth_hmac_update(&hmac, c1, hash_len);
drivers/nvme/common/auth.c
557
nvme_auth_hmac_update(&hmac, c2, hash_len);
drivers/nvme/common/auth.c
558
nvme_auth_hmac_final(&hmac, psk);
drivers/nvme/common/auth.c
604
struct nvme_auth_hmac_ctx hmac;
drivers/nvme/common/auth.c
639
ret = nvme_auth_hmac_init(&hmac, hmac_id, psk, psk_len);
drivers/nvme/common/auth.c
642
nvme_auth_hmac_update(&hmac, hostnqn, strlen(hostnqn));
drivers/nvme/common/auth.c
643
nvme_auth_hmac_update(&hmac, " ", 1);
drivers/nvme/common/auth.c
644
nvme_auth_hmac_update(&hmac, subsysnqn, strlen(subsysnqn));
drivers/nvme/common/auth.c
645
nvme_auth_hmac_update(&hmac, " NVMe-over-Fabrics", 18);
drivers/nvme/common/auth.c
646
nvme_auth_hmac_final(&hmac, digest);
drivers/nvme/common/auth.c
91
char hmac[15];
drivers/nvme/common/auth.c
95
.hmac = "hmac(sha256)",
drivers/nvme/common/auth.c
99
.hmac = "hmac(sha384)",
drivers/nvme/common/keyring.c
105
psk_ver, generated ? 'G' : 'R', hmac, hostnqn, subnqn);
drivers/nvme/common/keyring.c
93
u8 hmac, u8 psk_ver, bool generated)
drivers/nvme/host/auth.c
417
struct nvme_auth_hmac_ctx hmac;
drivers/nvme/host/auth.c
437
ret = nvme_auth_hmac_init(&hmac, chap->hash_id,
drivers/nvme/host/auth.c
458
nvme_auth_hmac_update(&hmac, challenge, chap->hash_len);
drivers/nvme/host/auth.c
461
nvme_auth_hmac_update(&hmac, buf, 4);
drivers/nvme/host/auth.c
464
nvme_auth_hmac_update(&hmac, buf, 2);
drivers/nvme/host/auth.c
467
nvme_auth_hmac_update(&hmac, buf, 1);
drivers/nvme/host/auth.c
468
nvme_auth_hmac_update(&hmac, "HostHost", 8);
drivers/nvme/host/auth.c
469
nvme_auth_hmac_update(&hmac, ctrl->opts->host->nqn,
drivers/nvme/host/auth.c
472
nvme_auth_hmac_update(&hmac, buf, 1);
drivers/nvme/host/auth.c
473
nvme_auth_hmac_update(&hmac, ctrl->opts->subsysnqn,
drivers/nvme/host/auth.c
475
nvme_auth_hmac_final(&hmac, chap->response);
drivers/nvme/host/auth.c
480
memzero_explicit(&hmac, sizeof(hmac));
drivers/nvme/host/auth.c
487
struct nvme_auth_hmac_ctx hmac;
drivers/nvme/host/auth.c
499
ret = nvme_auth_hmac_init(&hmac, chap->hash_id, transformed_key->key,
drivers/nvme/host/auth.c
530
nvme_auth_hmac_update(&hmac, challenge, chap->hash_len);
drivers/nvme/host/auth.c
533
nvme_auth_hmac_update(&hmac, buf, 4);
drivers/nvme/host/auth.c
536
nvme_auth_hmac_update(&hmac, buf, 2);
drivers/nvme/host/auth.c
539
nvme_auth_hmac_update(&hmac, buf, 1);
drivers/nvme/host/auth.c
540
nvme_auth_hmac_update(&hmac, "Controller", 10);
drivers/nvme/host/auth.c
541
nvme_auth_hmac_update(&hmac, ctrl->opts->subsysnqn,
drivers/nvme/host/auth.c
544
nvme_auth_hmac_update(&hmac, buf, 1);
drivers/nvme/host/auth.c
545
nvme_auth_hmac_update(&hmac, ctrl->opts->host->nqn,
drivers/nvme/host/auth.c
547
nvme_auth_hmac_final(&hmac, chap->response);
drivers/nvme/host/auth.c
552
memzero_explicit(&hmac, sizeof(hmac));
drivers/nvme/target/auth.c
283
struct nvme_auth_hmac_ctx hmac;
drivers/nvme/target/auth.c
295
ret = nvme_auth_hmac_init(&hmac, ctrl->shash_id, transformed_key->key,
drivers/nvme/target/auth.c
325
nvme_auth_hmac_update(&hmac, challenge, shash_len);
drivers/nvme/target/auth.c
328
nvme_auth_hmac_update(&hmac, buf, 4);
drivers/nvme/target/auth.c
331
nvme_auth_hmac_update(&hmac, buf, 2);
drivers/nvme/target/auth.c
334
nvme_auth_hmac_update(&hmac, buf, 1);
drivers/nvme/target/auth.c
335
nvme_auth_hmac_update(&hmac, "HostHost", 8);
drivers/nvme/target/auth.c
337
nvme_auth_hmac_update(&hmac, ctrl->hostnqn, strlen(ctrl->hostnqn));
drivers/nvme/target/auth.c
338
nvme_auth_hmac_update(&hmac, buf, 1);
drivers/nvme/target/auth.c
339
nvme_auth_hmac_update(&hmac, ctrl->subsys->subsysnqn,
drivers/nvme/target/auth.c
341
nvme_auth_hmac_final(&hmac, response);
drivers/nvme/target/auth.c
347
memzero_explicit(&hmac, sizeof(hmac));
drivers/nvme/target/auth.c
355
struct nvme_auth_hmac_ctx hmac;
drivers/nvme/target/auth.c
367
ret = nvme_auth_hmac_init(&hmac, ctrl->shash_id, transformed_key->key,
drivers/nvme/target/auth.c
394
nvme_auth_hmac_update(&hmac, challenge, shash_len);
drivers/nvme/target/auth.c
397
nvme_auth_hmac_update(&hmac, buf, 4);
drivers/nvme/target/auth.c
400
nvme_auth_hmac_update(&hmac, buf, 2);
drivers/nvme/target/auth.c
403
nvme_auth_hmac_update(&hmac, buf, 1);
drivers/nvme/target/auth.c
404
nvme_auth_hmac_update(&hmac, "Controller", 10);
drivers/nvme/target/auth.c
405
nvme_auth_hmac_update(&hmac, ctrl->subsys->subsysnqn,
drivers/nvme/target/auth.c
408
nvme_auth_hmac_update(&hmac, buf, 1);
drivers/nvme/target/auth.c
409
nvme_auth_hmac_update(&hmac, ctrl->hostnqn, strlen(ctrl->hostnqn));
drivers/nvme/target/auth.c
410
nvme_auth_hmac_final(&hmac, response);
drivers/nvme/target/auth.c
416
memzero_explicit(&hmac, sizeof(hmac));
drivers/thunderbolt/domain.c
719
u8 hmac[TB_SWITCH_KEY_SIZE];
drivers/thunderbolt/domain.c
736
static_assert(sizeof(hmac) == SHA256_DIGEST_SIZE);
drivers/thunderbolt/domain.c
738
challenge, sizeof(challenge), hmac);
drivers/thunderbolt/domain.c
741
if (crypto_memneq(response, hmac, sizeof(hmac)))
fs/smb/client/cifsencrypt.c
37
else if (ctx->hmac)
fs/smb/client/cifsencrypt.c
38
hmac_sha256_update(ctx->hmac, iter_base, len);
fs/smb/client/cifsencrypt.c
48
else if (ctx->hmac)
fs/smb/client/cifsencrypt.c
49
hmac_sha256_final(ctx->hmac, out);
fs/smb/client/cifsglob.h
2329
struct hmac_sha256_ctx *hmac;
fs/smb/client/smb2transport.c
248
&(struct cifs_calc_sig_ctx){ .hmac = &hmac_ctx });
fs/ubifs/auth.c
388
int len, int ofs_hmac, void *hmac)
fs/ubifs/auth.c
416
return crypto_shash_final(shash, hmac);
fs/ubifs/auth.c
451
u8 *hmac;
fs/ubifs/auth.c
454
hmac = kmalloc(hmac_len, GFP_NOFS);
fs/ubifs/auth.c
455
if (!hmac)
fs/ubifs/auth.c
458
err = ubifs_node_calc_hmac(c, node, len, ofs_hmac, hmac);
fs/ubifs/auth.c
46
u8 *hmac)
fs/ubifs/auth.c
460
kfree(hmac);
fs/ubifs/auth.c
464
err = crypto_memneq(hmac, node + ofs_hmac, hmac_len);
fs/ubifs/auth.c
466
kfree(hmac);
fs/ubifs/auth.c
48
return crypto_shash_tfm_digest(c->hmac_tfm, hash, c->hash_len, hmac);
fs/ubifs/auth.c
508
int ubifs_hmac_wkm(struct ubifs_info *c, u8 *hmac)
fs/ubifs/auth.c
516
sizeof(well_known_message) - 1, hmac);
fs/ubifs/auth.c
527
bool ubifs_hmac_zero(struct ubifs_info *c, const u8 *hmac)
fs/ubifs/auth.c
529
return !memchr_inv(hmac, 0, c->hmac_desc_len);
fs/ubifs/auth.c
80
err = ubifs_hash_calc_hmac(c, hash, auth->hmac);
fs/ubifs/master.c
138
if (ubifs_hmac_zero(c, c->mst_node->hmac)) {
fs/ubifs/master.c
146
offsetof(struct ubifs_mst_node, hmac));
fs/ubifs/master.c
28
int hmac_offs = offsetof(struct ubifs_mst_node, hmac);
fs/ubifs/master.c
461
offsetof(struct ubifs_mst_node, hmac));
fs/ubifs/master.c
473
offsetof(struct ubifs_mst_node, hmac));
fs/ubifs/recovery.c
204
offsetof(struct ubifs_mst_node, hmac), 1);
fs/ubifs/replay.c
600
u8 hmac[UBIFS_HMAC_ARR_SZ];
fs/ubifs/replay.c
617
c->hash_len, hmac);
fs/ubifs/replay.c
621
err = ubifs_check_hmac(c, auth->hmac, hmac);
fs/ubifs/sb.c
323
offsetof(struct ubifs_sb_node, hmac));
fs/ubifs/sb.c
343
offsetof(struct ubifs_mst_node, hmac));
fs/ubifs/sb.c
348
0, offsetof(struct ubifs_mst_node, hmac));
fs/ubifs/sb.c
587
if (ubifs_hmac_zero(c, sup->hmac)) {
fs/ubifs/sb.c
599
hmac));
fs/ubifs/sb.c
621
offsetof(struct ubifs_sb_node, hmac), 1);
fs/ubifs/super.c
1377
if (ubifs_authenticated(c) && ubifs_hmac_zero(c, c->sup_node->hmac)) {
fs/ubifs/ubifs-media.h
678
__u8 hmac[UBIFS_MAX_HMAC_LEN];
fs/ubifs/ubifs-media.h
754
__u8 hmac[UBIFS_MAX_HMAC_LEN];
fs/ubifs/ubifs-media.h
781
__u8 hmac[];
fs/ubifs/ubifs.h
1710
bool ubifs_hmac_zero(struct ubifs_info *c, const u8 *hmac);
fs/ubifs/ubifs.h
1712
int ubifs_hmac_wkm(struct ubifs_info *c, u8 *hmac);
include/linux/nvme-auth.h
34
int nvme_auth_hmac_init(struct nvme_auth_hmac_ctx *hmac, u8 hmac_id,
include/linux/nvme-auth.h
36
void nvme_auth_hmac_update(struct nvme_auth_hmac_ctx *hmac, const u8 *data,
include/linux/nvme-auth.h
38
void nvme_auth_hmac_final(struct nvme_auth_hmac_ctx *hmac, u8 *out);
include/net/mptcp.h
98
u8 hmac[MPTCPOPT_HMAC_LEN];
include/uapi/linux/seg6_hmac.h
15
__u8 hmac[SEG6_HMAC_FIELD_LEN];
net/ceph/crypto.c
442
int buf_len, u8 hmac[SHA256_DIGEST_SIZE])
net/ceph/crypto.c
447
memset(hmac, 0, SHA256_DIGEST_SIZE);
net/ceph/crypto.c
450
hmac_sha256(&key->hmac_key, buf, buf_len, hmac);
net/ceph/crypto.h
45
int buf_len, u8 hmac[SHA256_DIGEST_SIZE]);
net/ceph/messenger_v2.c
2427
u8 hmac[SHA256_DIGEST_SIZE];
net/ceph/messenger_v2.c
2436
hmac);
net/ceph/messenger_v2.c
2439
if (crypto_memneq(p, hmac, SHA256_DIGEST_SIZE)) {
net/ceph/messenger_v2.c
782
u8 hmac[SHA256_DIGEST_SIZE])
net/ceph/messenger_v2.c
791
memset(hmac, 0, SHA256_DIGEST_SIZE);
net/ceph/messenger_v2.c
799
hmac_sha256_final(&ctx, hmac);
net/ipv6/seg6_hmac.c
216
if (crypto_memneq(hmac_output, tlv->hmac, SEG6_HMAC_FIELD_LEN))
net/ipv6/seg6_hmac.c
299
memset(tlv->hmac, 0, SEG6_HMAC_FIELD_LEN);
net/ipv6/seg6_hmac.c
300
err = seg6_hmac_compute(hinfo, srh, saddr, tlv->hmac);
net/mptcp/crypto.c
43
void mptcp_crypto_hmac_sha(u64 key1, u64 key2, u8 *msg, int len, void *hmac)
net/mptcp/crypto.c
47
hmac_sha256_usingrawkey((const u8 *)key, sizeof(key), msg, len, hmac);
net/mptcp/crypto_test.c
35
char hmac[32], hmac_hex[65];
net/mptcp/crypto_test.c
51
mptcp_crypto_hmac_sha(key1, key2, msg, 8, hmac);
net/mptcp/crypto_test.c
53
sprintf(&hmac_hex[j << 1], "%02x", hmac[j] & 0xff);
net/mptcp/options.c
1115
u64 hmac = 0;
net/mptcp/options.c
1120
hmac = add_addr_generate_hmac(READ_ONCE(msk->remote_key),
net/mptcp/options.c
1125
msk, hmac, mp_opt->ahmac);
net/mptcp/options.c
1127
return hmac == mp_opt->ahmac;
net/mptcp/options.c
150
memcpy(mp_opt->hmac, ptr, MPTCPOPT_HMAC_LEN);
net/mptcp/options.c
1558
memcpy(ptr, opts->hmac, MPTCPOPT_HMAC_LEN);
net/mptcp/options.c
515
memcpy(opts->hmac, subflow->hmac, MPTCPOPT_HMAC_LEN);
net/mptcp/options.c
633
u8 hmac[SHA256_DIGEST_SIZE];
net/mptcp/options.c
651
mptcp_crypto_hmac_sha(key1, key2, msg, i, hmac);
net/mptcp/options.c
653
return get_unaligned_be64(&hmac[SHA256_DIGEST_SIZE - sizeof(u64)]);
net/mptcp/protocol.h
1089
void mptcp_crypto_hmac_sha(u64 key1, u64 key2, u8 *msg, int len, void *hmac);
net/mptcp/protocol.h
172
u8 hmac[MPTCPOPT_HMAC_LEN];
net/mptcp/protocol.h
597
u8 hmac[MPTCPOPT_HMAC_LEN]; /* MPJ subflow only */
net/mptcp/subflow.c
416
u8 hmac[SHA256_DIGEST_SIZE];
net/mptcp/subflow.c
421
hmac);
net/mptcp/subflow.c
423
thmac = get_unaligned_be64(hmac);
net/mptcp/subflow.c
51
void *hmac)
net/mptcp/subflow.c
568
u8 hmac[SHA256_DIGEST_SIZE];
net/mptcp/subflow.c
58
mptcp_crypto_hmac_sha(key1, key2, msg, 8, hmac);
net/mptcp/subflow.c
595
hmac);
net/mptcp/subflow.c
596
memcpy(subflow->hmac, hmac, MPTCPOPT_HMAC_LEN);
net/mptcp/subflow.c
73
u8 hmac[SHA256_DIGEST_SIZE];
net/mptcp/subflow.c
757
u8 hmac[SHA256_DIGEST_SIZE];
net/mptcp/subflow.c
762
subflow_req->local_nonce, hmac);
net/mptcp/subflow.c
764
return !crypto_memneq(hmac, mp_opt->hmac, MPTCPOPT_HMAC_LEN);
net/mptcp/subflow.c
80
subflow_req->remote_nonce, hmac);
net/mptcp/subflow.c
82
subflow_req->thmac = get_unaligned_be64(hmac);
net/sctp/sm_statefuns.c
4408
const struct sctp_hmac *hmac;
net/sctp/sm_statefuns.c
4438
hmac = sctp_auth_get_hmac(ntohs(auth_hdr->hmac_id));
net/sctp/sm_statefuns.c
4439
if (sig_len != hmac->hmac_len)
security/keys/encrypted-keys/encrypted.c
660
u8 *hmac;
security/keys/encrypted-keys/encrypted.c
681
hmac = epayload->format + epayload->datablob_len;
security/keys/encrypted-keys/encrypted.c
682
ret = hex2bin(hmac, hex_encoded_data + (encrypted_datalen * 2),
security/keys/trusted-keys/trusted_tpm2.c
207
const u8 *hmac, u16 hmac_len)
security/keys/trusted-keys/trusted_tpm2.c
219
if (hmac && hmac_len)
security/keys/trusted-keys/trusted_tpm2.c
220
tpm_buf_append(buf, hmac, hmac_len);