| /linux-6.15/fs/crypto/ |
| H A D | hkdf.c | 54 struct crypto_shash *hmac_tfm; in fscrypt_init_hkdf() local 59 hmac_tfm = crypto_alloc_shash(HKDF_HMAC_ALG, 0, 0); in fscrypt_init_hkdf() 60 if (IS_ERR(hmac_tfm)) { in fscrypt_init_hkdf() 62 PTR_ERR(hmac_tfm)); in fscrypt_init_hkdf() 63 return PTR_ERR(hmac_tfm); in fscrypt_init_hkdf() 76 err = crypto_shash_setkey(hmac_tfm, prk, sizeof(prk)); in fscrypt_init_hkdf() 80 hkdf->hmac_tfm = hmac_tfm; in fscrypt_init_hkdf() 84 crypto_free_shash(hmac_tfm); in fscrypt_init_hkdf() 105 SHASH_DESC_ON_STACK(desc, hkdf->hmac_tfm); in fscrypt_hkdf_expand() 112 desc->tfm = hkdf->hmac_tfm; in fscrypt_hkdf_expand() [all …]
|
| H A D | fscrypt_private.h | 350 struct crypto_shash *hmac_tfm; member
|
| /linux-6.15/fs/ubifs/ |
| H A D | auth.c | 48 return crypto_shash_tfm_digest(c->hmac_tfm, hash, c->hash_len, hmac); in ubifs_hash_calc_hmac() 317 c->hmac_tfm = crypto_alloc_shash(hmac_name, 0, 0); in ubifs_init_authentication() 318 if (IS_ERR(c->hmac_tfm)) { in ubifs_init_authentication() 319 err = PTR_ERR(c->hmac_tfm); in ubifs_init_authentication() 324 c->hmac_desc_len = crypto_shash_digestsize(c->hmac_tfm); in ubifs_init_authentication() 332 err = crypto_shash_setkey(c->hmac_tfm, ukp->data, ukp->datalen); in ubifs_init_authentication() 348 crypto_free_shash(c->hmac_tfm); in ubifs_init_authentication() 370 crypto_free_shash(c->hmac_tfm); in __ubifs_exit_authentication() 390 SHASH_DESC_ON_STACK(shash, c->hmac_tfm); in ubifs_node_calc_hmac() 397 shash->tfm = c->hmac_tfm; in ubifs_node_calc_hmac() [all …]
|
| H A D | replay.c | 617 err = crypto_shash_tfm_digest(c->hmac_tfm, hash, in authenticate_sleb()
|
| H A D | ubifs.h | 1485 struct crypto_shash *hmac_tfm; member
|
| /linux-6.15/crypto/ |
| H A D | hkdf.c | 44 int hkdf_extract(struct crypto_shash *hmac_tfm, const u8 *ikm, in hkdf_extract() argument 50 err = crypto_shash_setkey(hmac_tfm, salt, saltlen); in hkdf_extract() 52 err = crypto_shash_tfm_digest(hmac_tfm, ikm, ikmlen, prk); in hkdf_extract() 74 int hkdf_expand(struct crypto_shash *hmac_tfm, in hkdf_expand() argument 78 SHASH_DESC_ON_STACK(desc, hmac_tfm); in hkdf_expand() 79 unsigned int i, hashlen = crypto_shash_digestsize(hmac_tfm); in hkdf_expand() 88 desc->tfm = hmac_tfm; in hkdf_expand()
|
| /linux-6.15/include/crypto/ |
| H A D | hkdf.h | 14 int hkdf_extract(struct crypto_shash *hmac_tfm, const u8 *ikm, 17 int hkdf_expand(struct crypto_shash *hmac_tfm,
|
| /linux-6.15/drivers/crypto/ccp/ |
| H A D | ccp-crypto-sha.c | 276 struct crypto_shash *shash = ctx->u.sha.hmac_tfm; in ccp_sha_setkey() 335 struct crypto_shash *hmac_tfm; in ccp_hmac_sha_cra_init() local 337 hmac_tfm = crypto_alloc_shash(alg->child_alg, 0, 0); in ccp_hmac_sha_cra_init() 338 if (IS_ERR(hmac_tfm)) { in ccp_hmac_sha_cra_init() 341 return PTR_ERR(hmac_tfm); in ccp_hmac_sha_cra_init() 344 ctx->u.sha.hmac_tfm = hmac_tfm; in ccp_hmac_sha_cra_init() 353 if (ctx->u.sha.hmac_tfm) in ccp_hmac_sha_cra_exit() 354 crypto_free_shash(ctx->u.sha.hmac_tfm); in ccp_hmac_sha_cra_exit()
|
| H A D | ccp-crypto.h | 196 struct crypto_shash *hmac_tfm; member
|
| /linux-6.15/drivers/nvme/common/ |
| H A D | auth.c | 727 struct crypto_shash *hmac_tfm; in nvme_auth_derive_tls_psk() local 748 hmac_tfm = crypto_alloc_shash(hmac_name, 0, 0); in nvme_auth_derive_tls_psk() 749 if (IS_ERR(hmac_tfm)) in nvme_auth_derive_tls_psk() 750 return PTR_ERR(hmac_tfm); in nvme_auth_derive_tls_psk() 752 prk_len = crypto_shash_digestsize(hmac_tfm); in nvme_auth_derive_tls_psk() 763 ret = hkdf_extract(hmac_tfm, psk, psk_len, in nvme_auth_derive_tls_psk() 768 ret = crypto_shash_setkey(hmac_tfm, prk, prk_len); in nvme_auth_derive_tls_psk() 793 ret = hkdf_expand(hmac_tfm, info, info_len, tls_key, psk_len); in nvme_auth_derive_tls_psk() 805 crypto_free_shash(hmac_tfm); in nvme_auth_derive_tls_psk()
|
| /linux-6.15/security/integrity/evm/ |
| H A D | evm_crypto.c | 29 static struct crypto_shash *hmac_tfm; variable 86 tfm = &hmac_tfm; in init_desc()
|
| /linux-6.15/net/ceph/ |
| H A D | messenger_v2.c | 727 con->v2.hmac_tfm = crypto_alloc_shash("hmac(sha256)", 0, 0); in setup_crypto() 729 if (IS_ERR(con->v2.hmac_tfm)) { in setup_crypto() 730 ret = PTR_ERR(con->v2.hmac_tfm); in setup_crypto() 731 con->v2.hmac_tfm = NULL; in setup_crypto() 736 ret = crypto_shash_setkey(con->v2.hmac_tfm, session_key, in setup_crypto() 804 con->v2.hmac_tfm, kvec_cnt); in hmac_sha256() 806 if (!con->v2.hmac_tfm) { in hmac_sha256() 811 desc->tfm = con->v2.hmac_tfm; in hmac_sha256() 3817 if (con->v2.hmac_tfm) { in ceph_con_v2_reset_protocol() 3818 crypto_free_shash(con->v2.hmac_tfm); in ceph_con_v2_reset_protocol() [all …]
|
| /linux-6.15/include/linux/ceph/ |
| H A D | messenger.h | 415 struct crypto_shash *hmac_tfm; /* post-auth signature */ member
|