/kernel/linux/linux-5.10/crypto/ |
D | shash.c | 45 struct shash_alg *shash = crypto_shash_alg(tfm); in shash_setkey_unaligned() local 58 err = shash->setkey(tfm, alignbuffer, keylen); in shash_setkey_unaligned() 72 struct shash_alg *shash = crypto_shash_alg(tfm); in crypto_shash_setkey() local 79 err = shash->setkey(tfm, key, keylen); in crypto_shash_setkey() 82 shash_set_needkey(tfm, shash); in crypto_shash_setkey() 95 struct shash_alg *shash = crypto_shash_alg(tfm); in shash_update_unaligned() local 114 err = shash->update(desc, buf, unaligned_len); in shash_update_unaligned() 118 shash->update(desc, data + unaligned_len, len - unaligned_len); in shash_update_unaligned() 125 struct shash_alg *shash = crypto_shash_alg(tfm); in crypto_shash_update() local 131 return shash->update(desc, data, len); in crypto_shash_update() [all …]
|
D | hmac.c | 51 SHASH_DESC_ON_STACK(shash, hash); in hmac_setkey() 54 shash->tfm = hash; in hmac_setkey() 59 err = crypto_shash_digest(shash, inkey, keylen, ipad); in hmac_setkey() 75 return crypto_shash_init(shash) ?: in hmac_setkey() 76 crypto_shash_update(shash, ipad, bs) ?: in hmac_setkey() 77 crypto_shash_export(shash, ipad) ?: in hmac_setkey() 78 crypto_shash_init(shash) ?: in hmac_setkey() 79 crypto_shash_update(shash, opad, bs) ?: in hmac_setkey() 80 crypto_shash_export(shash, opad); in hmac_setkey()
|
/kernel/linux/linux-5.10/drivers/infiniband/sw/rxe/ |
D | rxe.h | 51 SHASH_DESC_ON_STACK(shash, rxe->tfm); in rxe_crc32() 53 shash->tfm = rxe->tfm; in rxe_crc32() 54 *(u32 *)shash_desc_ctx(shash) = crc; in rxe_crc32() 55 err = crypto_shash_update(shash, next, len); in rxe_crc32() 61 retval = *(u32 *)shash_desc_ctx(shash); in rxe_crc32() 62 barrier_data(shash_desc_ctx(shash)); in rxe_crc32()
|
/kernel/linux/linux-5.10/drivers/crypto/vmx/ |
D | ghash.c | 40 u64 shash[2]; member 50 memset(dctx->shash, 0, GHASH_DIGEST_SIZE); in p8_ghash_init() 82 gcm_ghash_p8(dctx->shash, ctx->htable, in __ghash_block() 88 crypto_xor((u8 *)dctx->shash, dctx->buffer, GHASH_BLOCK_SIZE); in __ghash_block() 89 gf128mul_lle((be128 *)dctx->shash, &ctx->key); in __ghash_block() 101 gcm_ghash_p8(dctx->shash, ctx->htable, in __ghash_blocks() 108 crypto_xor((u8 *)dctx->shash, src, GHASH_BLOCK_SIZE); in __ghash_blocks() 109 gf128mul_lle((be128 *)dctx->shash, &ctx->key); in __ghash_blocks() 164 memcpy(out, dctx->shash, GHASH_DIGEST_SIZE); in p8_ghash_final()
|
/kernel/linux/linux-5.10/net/ipv6/ |
D | seg6_hmac.c | 124 struct shash_desc *shash; in __do_hmac() local 146 shash = *this_cpu_ptr(algo->shashs); in __do_hmac() 147 shash->tfm = tfm; in __do_hmac() 149 ret = crypto_shash_digest(shash, text, psize, output); in __do_hmac() 356 struct shash_desc *shash; in seg6_hmac_init_algo() local 381 shsize = sizeof(*shash) + crypto_shash_descsize(tfm); in seg6_hmac_init_algo() 388 shash = kzalloc_node(shsize, GFP_KERNEL, in seg6_hmac_init_algo() 390 if (!shash) in seg6_hmac_init_algo() 392 *per_cpu_ptr(algo->shashs, cpu) = shash; in seg6_hmac_init_algo() 425 struct shash_desc *shash; in seg6_hmac_exit() local [all …]
|
/kernel/linux/linux-5.10/security/integrity/ima/ |
D | ima_crypto.c | 462 SHASH_DESC_ON_STACK(shash, tfm); in ima_calc_file_hash_tfm() 464 shash->tfm = tfm; in ima_calc_file_hash_tfm() 468 rc = crypto_shash_init(shash); in ima_calc_file_hash_tfm() 495 rc = crypto_shash_update(shash, rbuf, rbuf_len); in ima_calc_file_hash_tfm() 502 rc = crypto_shash_final(shash, hash->digest); in ima_calc_file_hash_tfm() 586 SHASH_DESC_ON_STACK(shash, ima_algo_array[tfm_idx].tfm); in ima_calc_field_array_hash_tfm() 591 shash->tfm = ima_algo_array[tfm_idx].tfm; in ima_calc_field_array_hash_tfm() 593 rc = crypto_shash_init(shash); in ima_calc_field_array_hash_tfm() 605 rc = crypto_shash_update(shash, in ima_calc_field_array_hash_tfm() 615 rc = crypto_shash_update(shash, data_to_hash, datalen); in ima_calc_field_array_hash_tfm() [all …]
|
/kernel/linux/linux-5.10/fs/cifs/ |
D | smb2transport.c | 223 struct shash_desc *shash; in smb2_calc_signature() local 244 shash = &sdesc->shash; in smb2_calc_signature() 247 shash = &server->secmech.sdeschmacsha256->shash; in smb2_calc_signature() 259 rc = crypto_shash_init(shash); in smb2_calc_signature() 274 rc = crypto_shash_update(shash, iov[0].iov_base, in smb2_calc_signature() 286 rc = __cifs_calc_signature(&drqst, server, sigptr, shash); in smb2_calc_signature() 324 rc = crypto_shash_init(&server->secmech.sdeschmacsha256->shash); in generate_key() 330 rc = crypto_shash_update(&server->secmech.sdeschmacsha256->shash, in generate_key() 337 rc = crypto_shash_update(&server->secmech.sdeschmacsha256->shash, in generate_key() 344 rc = crypto_shash_update(&server->secmech.sdeschmacsha256->shash, in generate_key() [all …]
|
D | cifsencrypt.c | 42 struct shash_desc *shash) in __cifs_calc_signature() argument 69 rc = crypto_shash_update(shash, in __cifs_calc_signature() 87 rc = crypto_shash_update(shash, kaddr, len); in __cifs_calc_signature() 98 rc = crypto_shash_final(shash, signature); in __cifs_calc_signature() 125 rc = crypto_shash_init(&server->secmech.sdescmd5->shash); in cifs_calc_signature() 131 rc = crypto_shash_update(&server->secmech.sdescmd5->shash, in cifs_calc_signature() 139 &server->secmech.sdescmd5->shash); in cifs_calc_signature() 521 rc = crypto_shash_init(&ses->server->secmech.sdeschmacmd5->shash); in calc_ntlmv2_hash() 542 rc = crypto_shash_update(&ses->server->secmech.sdeschmacmd5->shash, in calc_ntlmv2_hash() 562 crypto_shash_update(&ses->server->secmech.sdeschmacmd5->shash, in calc_ntlmv2_hash() [all …]
|
D | misc.c | 927 struct crypto_shash **shash, struct sdesc **sdesc) in cifs_alloc_hash() argument 935 *shash = crypto_alloc_shash(name, 0, 0); in cifs_alloc_hash() 936 if (IS_ERR(*shash)) { in cifs_alloc_hash() 938 rc = PTR_ERR(*shash); in cifs_alloc_hash() 939 *shash = NULL; in cifs_alloc_hash() 944 size = sizeof(struct shash_desc) + crypto_shash_descsize(*shash); in cifs_alloc_hash() 948 crypto_free_shash(*shash); in cifs_alloc_hash() 949 *shash = NULL; in cifs_alloc_hash() 953 (*sdesc)->shash.tfm = *shash; in cifs_alloc_hash() 963 cifs_free_hash(struct crypto_shash **shash, struct sdesc **sdesc) in cifs_free_hash() argument [all …]
|
D | smbencrypt.c | 119 rc = crypto_shash_init(&sdescmd4->shash); in mdfour() 124 rc = crypto_shash_update(&sdescmd4->shash, link_str, link_len); in mdfour() 129 rc = crypto_shash_final(&sdescmd4->shash, md4_hash); in mdfour()
|
/kernel/linux/linux-5.10/lib/ |
D | libcrc32c.c | 40 SHASH_DESC_ON_STACK(shash, tfm); in crc32c() 41 u32 ret, *ctx = (u32 *)shash_desc_ctx(shash); in crc32c() 44 shash->tfm = tfm; in crc32c() 47 err = crypto_shash_update(shash, address, length); in crc32c()
|
D | digsig.c | 28 static struct crypto_shash *shash; variable 234 desc = kzalloc(sizeof(*desc) + crypto_shash_descsize(shash), in digsig_verify() 239 desc->tfm = shash; in digsig_verify() 261 shash = crypto_alloc_shash("sha1", 0, 0); in digsig_init() 262 if (IS_ERR(shash)) { in digsig_init() 264 return PTR_ERR(shash); in digsig_init() 273 crypto_free_shash(shash); in digsig_cleanup()
|
D | crc-t10dif.c | 66 struct shash_desc shash; in crc_t10dif_update() member 75 desc.shash.tfm = rcu_dereference(crct10dif_tfm); in crc_t10dif_update() 77 err = crypto_shash_update(&desc.shash, buffer, len); in crc_t10dif_update()
|
/kernel/linux/linux-5.10/fs/ubifs/ |
D | auth.c | 392 SHASH_DESC_ON_STACK(shash, c->hmac_tfm); in ubifs_node_calc_hmac() 399 shash->tfm = c->hmac_tfm; in ubifs_node_calc_hmac() 401 err = crypto_shash_init(shash); in ubifs_node_calc_hmac() 406 err = crypto_shash_update(shash, node + 8, ofs_hmac - 8); in ubifs_node_calc_hmac() 412 err = crypto_shash_update(shash, node + ofs_hmac + hmac_len, in ubifs_node_calc_hmac() 418 return crypto_shash_final(shash, hmac); in ubifs_node_calc_hmac() 512 SHASH_DESC_ON_STACK(shash, c->hmac_tfm); in ubifs_hmac_wkm() 519 shash->tfm = c->hmac_tfm; in ubifs_hmac_wkm() 521 err = crypto_shash_init(shash); in ubifs_hmac_wkm() 525 err = crypto_shash_update(shash, well_known_message, in ubifs_hmac_wkm() [all …]
|
/kernel/linux/linux-5.10/arch/x86/crypto/ |
D | ghash-clmulni-intel_glue.c | 26 void clmul_ghash_mul(char *dst, const u128 *shash); 29 const u128 *shash); 36 u128 shash; member 67 ctx->shash.a = (b << 1) | (a >> 63); in ghash_setkey() 68 ctx->shash.b = (a << 1) | (b >> 63); in ghash_setkey() 71 ctx->shash.b ^= ((u64)0xc2) << 56; in ghash_setkey() 95 clmul_ghash_mul(dst, &ctx->shash); in ghash_update() 98 clmul_ghash_update(dst, src, srclen, &ctx->shash); in ghash_update() 123 clmul_ghash_mul(dst, &ctx->shash); in ghash_flush()
|
/kernel/linux/linux-5.10/tools/perf/util/ |
D | fncache.c | 19 unsigned shash(const unsigned char *s) in shash() function 29 int h = shash((const unsigned char *)name) % FNHSIZE; in lookup_fncache() 44 int h = shash((const unsigned char *)name) % FNHSIZE; in update_fncache()
|
/kernel/linux/linux-5.10/fs/hmdfs/comm/ |
D | crypto.c | 205 struct shash_desc *shash = NULL; in hmac_sha256() local 223 shash = kzalloc(sizeof(*shash) + crypto_shash_descsize(tfm), in hmac_sha256() 225 if (!shash) { in hmac_sha256() 230 shash->tfm = tfm; in hmac_sha256() 232 ret = crypto_shash_digest(shash, info, info_len, output); in hmac_sha256() 234 kfree(shash); in hmac_sha256()
|
/kernel/linux/linux-5.10/security/keys/trusted-keys/ |
D | trusted_tpm1.c | 38 struct shash_desc shash; member 54 sdesc->shash.tfm = alg; in init_sdesc() 70 ret = crypto_shash_digest(&sdesc->shash, data, datalen, digest); in TSS_sha1() 93 ret = crypto_shash_init(&sdesc->shash); in TSS_rawhmac() 107 ret = crypto_shash_update(&sdesc->shash, data, dlen); in TSS_rawhmac() 113 ret = crypto_shash_final(&sdesc->shash, digest); in TSS_rawhmac() 144 ret = crypto_shash_init(&sdesc->shash); in TSS_authhmac() 157 ret = crypto_shash_update(&sdesc->shash, data, dlen); in TSS_authhmac() 163 ret = crypto_shash_final(&sdesc->shash, paramdigest); in TSS_authhmac() 218 ret = crypto_shash_init(&sdesc->shash); in TSS_checkhmac1() [all …]
|
/kernel/linux/linux-5.10/drivers/net/ppp/ |
D | ppp_mppe.c | 174 struct crypto_shash *shash; in mppe_alloc() local 187 shash = crypto_alloc_shash("sha1", 0, 0); in mppe_alloc() 188 if (IS_ERR(shash)) in mppe_alloc() 192 crypto_shash_descsize(shash), in mppe_alloc() 195 crypto_free_shash(shash); in mppe_alloc() 198 state->sha1->tfm = shash; in mppe_alloc() 200 digestsize = crypto_shash_digestsize(shash); in mppe_alloc()
|
/kernel/linux/linux-5.10/security/keys/ |
D | dh.c | 83 struct shash_desc shash; member 110 sdesc->shash.tfm = tfm; in kdf_alloc() 126 if (sdesc->shash.tfm) in kdf_dealloc() 127 crypto_free_shash(sdesc->shash.tfm); in kdf_dealloc() 146 struct shash_desc *desc = &sdesc->shash; in kdf_ctr() 206 crypto_shash_digestsize(sdesc->shash.tfm)); in keyctl_dh_compute_kdf()
|
/kernel/linux/linux-5.10/drivers/crypto/bcm/ |
D | util.c | 189 struct shash_desc shash; member 233 sdesc->shash.tfm = hash; in do_shash() 243 rc = crypto_shash_init(&sdesc->shash); in do_shash() 248 rc = crypto_shash_update(&sdesc->shash, data1, data1_len); in do_shash() 254 rc = crypto_shash_update(&sdesc->shash, data2, data2_len); in do_shash() 260 rc = crypto_shash_final(&sdesc->shash, result); in do_shash()
|
/kernel/linux/linux-5.10/drivers/thunderbolt/ |
D | domain.c | 678 struct shash_desc *shash; in tb_domain_challenge_switch_key() local 702 shash = kzalloc(sizeof(*shash) + crypto_shash_descsize(tfm), in tb_domain_challenge_switch_key() 704 if (!shash) { in tb_domain_challenge_switch_key() 709 shash->tfm = tfm; in tb_domain_challenge_switch_key() 712 ret = crypto_shash_digest(shash, challenge, sizeof(hmac), hmac); in tb_domain_challenge_switch_key() 723 kfree(shash); in tb_domain_challenge_switch_key() 728 kfree(shash); in tb_domain_challenge_switch_key()
|
/kernel/linux/linux-5.10/drivers/crypto/mediatek/ |
D | mtk-sha.c | 99 struct crypto_shash *shash; member 362 SHASH_DESC_ON_STACK(shash, bctx->shash); in mtk_sha_finish_hmac() 364 shash->tfm = bctx->shash; in mtk_sha_finish_hmac() 366 return crypto_shash_init(shash) ?: in mtk_sha_finish_hmac() 367 crypto_shash_update(shash, bctx->opad, ctx->bs) ?: in mtk_sha_finish_hmac() 368 crypto_shash_finup(shash, req->result, ctx->ds, req->result); in mtk_sha_finish_hmac() 804 size_t bs = crypto_shash_blocksize(bctx->shash); in mtk_sha_setkey() 805 size_t ds = crypto_shash_digestsize(bctx->shash); in mtk_sha_setkey() 809 err = crypto_shash_tfm_digest(bctx->shash, key, keylen, in mtk_sha_setkey() 862 bctx->shash = crypto_alloc_shash(alg_base, 0, in mtk_sha_cra_init_alg() [all …]
|
/kernel/linux/linux-5.10/net/bluetooth/ |
D | amp.c | 131 struct shash_desc *shash; in hmac_sha256() local 149 shash = kzalloc(sizeof(*shash) + crypto_shash_descsize(tfm), in hmac_sha256() 151 if (!shash) { in hmac_sha256() 156 shash->tfm = tfm; in hmac_sha256() 158 ret = crypto_shash_digest(shash, plaintext, psize, output); in hmac_sha256() 160 kfree(shash); in hmac_sha256()
|
/kernel/linux/linux-5.10/drivers/crypto/ |
D | sa2ul.c | 416 SHASH_DESC_ON_STACK(shash, data->ctx->shash); in sa_prepare_iopads() 417 int block_size = crypto_shash_blocksize(data->ctx->shash); in sa_prepare_iopads() 418 int digest_size = crypto_shash_digestsize(data->ctx->shash); in sa_prepare_iopads() 422 shash->tfm = data->ctx->shash; in sa_prepare_iopads() 429 crypto_shash_init(shash); in sa_prepare_iopads() 430 crypto_shash_update(shash, k_ipad, block_size); in sa_prepare_iopads() 431 sa_export_shash(shash, block_size, digest_size, ipad); in sa_prepare_iopads() 433 crypto_shash_init(shash); in sa_prepare_iopads() 434 crypto_shash_update(shash, k_opad, block_size); in sa_prepare_iopads() 436 sa_export_shash(shash, block_size, digest_size, opad); in sa_prepare_iopads() [all …]
|