Home
last modified time | relevance | path

Searched refs:tctx (Results 1 – 21 of 21) sorted by relevance

/kernel/linux/linux-5.10/crypto/
Dtgr192.c462 static void tgr192_transform(struct tgr192_ctx *tctx, const u8 * data) in tgr192_transform() argument
472 a = aa = tctx->a; in tgr192_transform()
473 b = bb = tctx->b; in tgr192_transform()
474 c = cc = tctx->c; in tgr192_transform()
488 tctx->a = a; in tgr192_transform()
489 tctx->b = b; in tgr192_transform()
490 tctx->c = c; in tgr192_transform()
495 struct tgr192_ctx *tctx = shash_desc_ctx(desc); in tgr192_init() local
497 tctx->a = 0x0123456789abcdefULL; in tgr192_init()
498 tctx->b = 0xfedcba9876543210ULL; in tgr192_init()
[all …]
Dessiv.c68 struct essiv_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in essiv_skcipher_setkey() local
72 crypto_skcipher_clear_flags(tctx->u.skcipher, CRYPTO_TFM_REQ_MASK); in essiv_skcipher_setkey()
73 crypto_skcipher_set_flags(tctx->u.skcipher, in essiv_skcipher_setkey()
76 err = crypto_skcipher_setkey(tctx->u.skcipher, key, keylen); in essiv_skcipher_setkey()
80 err = crypto_shash_tfm_digest(tctx->hash, key, keylen, salt); in essiv_skcipher_setkey()
84 crypto_cipher_clear_flags(tctx->essiv_cipher, CRYPTO_TFM_REQ_MASK); in essiv_skcipher_setkey()
85 crypto_cipher_set_flags(tctx->essiv_cipher, in essiv_skcipher_setkey()
88 return crypto_cipher_setkey(tctx->essiv_cipher, salt, in essiv_skcipher_setkey()
89 crypto_shash_digestsize(tctx->hash)); in essiv_skcipher_setkey()
95 struct essiv_tfm_ctx *tctx = crypto_aead_ctx(tfm); in essiv_aead_setkey() local
[all …]
Dadiantum.c119 struct adiantum_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in adiantum_setkey() local
131 crypto_skcipher_clear_flags(tctx->streamcipher, CRYPTO_TFM_REQ_MASK); in adiantum_setkey()
132 crypto_skcipher_set_flags(tctx->streamcipher, in adiantum_setkey()
135 err = crypto_skcipher_setkey(tctx->streamcipher, key, keylen); in adiantum_setkey()
141 crypto_skcipher_reqsize(tctx->streamcipher), GFP_KERNEL); in adiantum_setkey()
147 skcipher_request_set_tfm(&data->req, tctx->streamcipher); in adiantum_setkey()
159 crypto_cipher_clear_flags(tctx->blockcipher, CRYPTO_TFM_REQ_MASK); in adiantum_setkey()
160 crypto_cipher_set_flags(tctx->blockcipher, in adiantum_setkey()
163 err = crypto_cipher_setkey(tctx->blockcipher, keyp, in adiantum_setkey()
170 poly1305_core_setkey(&tctx->header_hash_key, keyp); in adiantum_setkey()
[all …]
Dvmac.c398 static void vhash_blocks(const struct vmac_tfm_ctx *tctx, in vhash_blocks() argument
402 const u64 *kptr = tctx->nhkey; in vhash_blocks()
403 const u64 pkh = tctx->polykey[0]; in vhash_blocks()
404 const u64 pkl = tctx->polykey[1]; in vhash_blocks()
432 struct vmac_tfm_ctx *tctx = crypto_shash_ctx(tfm); in vmac_setkey() local
441 err = crypto_cipher_setkey(tctx->cipher, key, keylen); in vmac_setkey()
447 for (i = 0; i < ARRAY_SIZE(tctx->nhkey); i += 2) { in vmac_setkey()
448 crypto_cipher_encrypt_one(tctx->cipher, (u8 *)out, in); in vmac_setkey()
449 tctx->nhkey[i] = be64_to_cpu(out[0]); in vmac_setkey()
450 tctx->nhkey[i+1] = be64_to_cpu(out[1]); in vmac_setkey()
[all …]
Dxxhash_generic.c23 struct xxhash64_tfm_ctx *tctx = crypto_shash_ctx(tfm); in xxhash64_setkey() local
25 if (keylen != sizeof(tctx->seed)) in xxhash64_setkey()
27 tctx->seed = get_unaligned_le64(key); in xxhash64_setkey()
33 struct xxhash64_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in xxhash64_init() local
36 xxh64_reset(&dctx->xxhstate, tctx->seed); in xxhash64_init()
63 struct xxhash64_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in xxhash64_digest() local
65 put_unaligned_le64(xxh64(data, length, tctx->seed), out); in xxhash64_digest()
Dblake2s_generic.c18 struct blake2s_tfm_ctx *tctx = crypto_shash_ctx(tfm); in crypto_blake2s_setkey() local
23 memcpy(tctx->key, key, keylen); in crypto_blake2s_setkey()
24 tctx->keylen = keylen; in crypto_blake2s_setkey()
31 struct blake2s_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in crypto_blake2s_init() local
35 if (tctx->keylen) in crypto_blake2s_init()
36 blake2s_init_key(state, outlen, tctx->key, tctx->keylen); in crypto_blake2s_init()
Dblake2b_generic.c150 struct blake2b_tfm_ctx *tctx = crypto_shash_ctx(tfm); in blake2b_setkey() local
155 memcpy(tctx->key, key, keylen); in blake2b_setkey()
156 tctx->keylen = keylen; in blake2b_setkey()
163 struct blake2b_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in blake2b_init() local
171 state->h[0] ^= 0x01010000 | tctx->keylen << 8 | digestsize; in blake2b_init()
173 if (tctx->keylen) { in blake2b_init()
178 memcpy(state->buf, tctx->key, tctx->keylen); in blake2b_init()
Dxcbc.c89 struct xcbc_tfm_ctx *tctx = crypto_shash_ctx(parent); in crypto_xcbc_digest_update() local
91 struct crypto_cipher *tfm = tctx->child; in crypto_xcbc_digest_update()
135 struct xcbc_tfm_ctx *tctx = crypto_shash_ctx(parent); in crypto_xcbc_digest_final() local
137 struct crypto_cipher *tfm = tctx->child; in crypto_xcbc_digest_final()
139 u8 *consts = PTR_ALIGN(&tctx->ctx[0], alignmask + 1); in crypto_xcbc_digest_final()
Dcmac.c122 struct cmac_tfm_ctx *tctx = crypto_shash_ctx(parent); in crypto_cmac_digest_update() local
124 struct crypto_cipher *tfm = tctx->child; in crypto_cmac_digest_update()
168 struct cmac_tfm_ctx *tctx = crypto_shash_ctx(parent); in crypto_cmac_digest_final() local
170 struct crypto_cipher *tfm = tctx->child; in crypto_cmac_digest_final()
172 u8 *consts = PTR_ALIGN((void *)tctx->ctx, in crypto_cmac_digest_final()
Dccm.c801 struct cbcmac_tfm_ctx *tctx = crypto_shash_ctx(parent); in crypto_cbcmac_digest_update() local
803 struct crypto_cipher *tfm = tctx->child; in crypto_cbcmac_digest_update()
827 struct cbcmac_tfm_ctx *tctx = crypto_shash_ctx(parent); in crypto_cbcmac_digest_final() local
829 struct crypto_cipher *tfm = tctx->child; in crypto_cbcmac_digest_final()
/kernel/linux/linux-5.10/drivers/crypto/
Dgeode-aes.c69 geode_aes_crypt(const struct geode_aes_tfm_ctx *tctx, const void *src, in geode_aes_crypt() argument
96 _writefield(AES_WRITEKEY0_REG, tctx->key); in geode_aes_crypt()
112 struct geode_aes_tfm_ctx *tctx = crypto_tfm_ctx(tfm); in geode_setkey_cip() local
114 tctx->keylen = len; in geode_setkey_cip()
117 memcpy(tctx->key, key, len); in geode_setkey_cip()
128 tctx->fallback.cip->base.crt_flags &= ~CRYPTO_TFM_REQ_MASK; in geode_setkey_cip()
129 tctx->fallback.cip->base.crt_flags |= in geode_setkey_cip()
132 return crypto_cipher_setkey(tctx->fallback.cip, key, len); in geode_setkey_cip()
138 struct geode_aes_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in geode_setkey_skcipher() local
140 tctx->keylen = len; in geode_setkey_skcipher()
[all …]
Domap-sham.c309 struct omap_sham_ctx *tctx = crypto_ahash_ctx(tfm); in omap_sham_copy_hash_omap4() local
310 struct omap_sham_hmac_ctx *bctx = tctx->base; in omap_sham_copy_hash_omap4()
474 struct omap_sham_ctx *tctx = crypto_ahash_ctx(tfm); in omap_sham_write_ctrl_omap4() local
475 struct omap_sham_hmac_ctx *bctx = tctx->base; in omap_sham_write_ctrl_omap4()
964 struct omap_sham_ctx *tctx = crypto_ahash_ctx(tfm); in omap_sham_init() local
1013 if (tctx->flags & BIT(FLAGS_HMAC)) { in omap_sham_init()
1015 struct omap_sham_hmac_ctx *bctx = tctx->base; in omap_sham_init()
1117 struct omap_sham_ctx *tctx = crypto_tfm_ctx(req->base.tfm); in omap_sham_finish_hmac() local
1118 struct omap_sham_hmac_ctx *bctx = tctx->base; in omap_sham_finish_hmac()
1233 struct omap_sham_ctx *tctx = crypto_tfm_ctx(req->base.tfm); in omap_sham_final_shash() local
[all …]
Ds5p-sss.c1491 struct s5p_hash_ctx *tctx = crypto_tfm_ctx(req->base.tfm); in s5p_hash_enqueue() local
1495 return s5p_hash_handle_queue(tctx->dd, req); in s5p_hash_enqueue()
1556 struct s5p_hash_ctx *tctx = crypto_tfm_ctx(req->base.tfm); in s5p_hash_final() local
1558 return crypto_shash_tfm_digest(tctx->fallback, ctx->buffer, in s5p_hash_final()
1602 struct s5p_hash_ctx *tctx = crypto_ahash_ctx(tfm); in s5p_hash_init() local
1604 ctx->dd = tctx->dd; in s5p_hash_init()
1612 dev_dbg(tctx->dd->dev, "init: digest size: %d\n", in s5p_hash_init()
1653 struct s5p_hash_ctx *tctx = crypto_tfm_ctx(tfm); in s5p_hash_cra_init_alg() local
1656 tctx->dd = s5p_dev; in s5p_hash_cra_init_alg()
1658 tctx->fallback = crypto_alloc_shash(alg_name, 0, in s5p_hash_cra_init_alg()
[all …]
Dimg-hash.c620 struct img_hash_ctx *tctx = crypto_ahash_ctx(tfm); in img_hash_digest() local
627 if (!tctx->hdev) { in img_hash_digest()
632 tctx->hdev = hdev; in img_hash_digest()
635 hdev = tctx->hdev; in img_hash_digest()
668 err = img_hash_handle_queue(tctx->hdev, req); in img_hash_digest()
718 struct img_hash_ctx *tctx = crypto_tfm_ctx(tfm); in img_hash_cra_exit() local
720 crypto_free_ahash(tctx->fallback); in img_hash_cra_exit()
Datmel-sha.c404 static struct atmel_sha_dev *atmel_sha_find_dev(struct atmel_sha_ctx *tctx) in atmel_sha_find_dev() argument
410 if (!tctx->dd) { in atmel_sha_find_dev()
415 tctx->dd = dd; in atmel_sha_find_dev()
417 dd = tctx->dd; in atmel_sha_find_dev()
428 struct atmel_sha_ctx *tctx = crypto_ahash_ctx(tfm); in atmel_sha_init() local
430 struct atmel_sha_dev *dd = atmel_sha_find_dev(tctx); in atmel_sha_init()
1153 struct atmel_sha_ctx *tctx = crypto_tfm_ctx(req->base.tfm); in atmel_sha_enqueue() local
1154 struct atmel_sha_dev *dd = tctx->dd; in atmel_sha_enqueue()
2146 struct atmel_sha_ctx *tctx; in atmel_sha_authenc_spawn() local
2180 tctx = crypto_ahash_ctx(tfm); in atmel_sha_authenc_spawn()
[all …]
/kernel/linux/linux-5.10/drivers/crypto/rockchip/
Drk3288_crypto_ahash.c167 struct rk_ahash_ctx *tctx = crypto_tfm_ctx(req->base.tfm); in rk_ahash_digest() local
168 struct rk_crypto_info *dev = tctx->dev; in rk_ahash_digest()
275 struct rk_ahash_ctx *tctx = crypto_tfm_ctx(tfm); in rk_cra_hash_init() local
283 tctx->dev = algt->dev; in rk_cra_hash_init()
284 tctx->dev->addr_vir = (void *)__get_free_page(GFP_KERNEL); in rk_cra_hash_init()
285 if (!tctx->dev->addr_vir) { in rk_cra_hash_init()
286 dev_err(tctx->dev->dev, "failed to kmalloc for addr_vir\n"); in rk_cra_hash_init()
289 tctx->dev->start = rk_ahash_start; in rk_cra_hash_init()
290 tctx->dev->update = rk_ahash_crypto_rx; in rk_cra_hash_init()
291 tctx->dev->complete = rk_ahash_crypto_complete; in rk_cra_hash_init()
[all …]
/kernel/linux/linux-5.10/arch/x86/crypto/
Dblake2s-glue.c64 struct blake2s_tfm_ctx *tctx = crypto_shash_ctx(tfm); in crypto_blake2s_setkey() local
69 memcpy(tctx->key, key, keylen); in crypto_blake2s_setkey()
70 tctx->keylen = keylen; in crypto_blake2s_setkey()
77 struct blake2s_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in crypto_blake2s_init() local
81 if (tctx->keylen) in crypto_blake2s_init()
82 blake2s_init_key(state, outlen, tctx->key, tctx->keylen); in crypto_blake2s_init()
/kernel/linux/linux-5.10/drivers/crypto/mediatek/
Dmtk-sha.c153 static struct mtk_cryp *mtk_sha_find_dev(struct mtk_sha_ctx *tctx) in mtk_sha_find_dev() argument
159 if (!tctx->cryp) { in mtk_sha_find_dev()
164 tctx->cryp = cryp; in mtk_sha_find_dev()
166 cryp = tctx->cryp; in mtk_sha_find_dev()
173 tctx->id = cryp->rec; in mtk_sha_find_dev()
358 struct mtk_sha_ctx *tctx = crypto_tfm_ctx(req->base.tfm); in mtk_sha_finish_hmac() local
359 struct mtk_sha_hmac_ctx *bctx = tctx->base; in mtk_sha_finish_hmac()
375 struct mtk_sha_ctx *tctx = crypto_ahash_ctx(tfm); in mtk_sha_init() local
408 ctx->buffer = tctx->buf; in mtk_sha_init()
410 if (tctx->flags & SHA_FLAGS_HMAC) { in mtk_sha_init()
[all …]
/kernel/linux/linux-5.10/fs/
Dio_uring.c1166 struct io_uring_task *tctx = req->task->io_uring; in io_req_init_async() local
1174 req->work.identity = tctx->identity; in io_req_init_async()
1175 if (tctx->identity != &tctx->__identity) in io_req_init_async()
1276 static void io_put_identity(struct io_uring_task *tctx, struct io_kiocb *req) in io_put_identity() argument
1278 if (req->work.identity == &tctx->__identity) in io_put_identity()
1328 struct io_uring_task *tctx = req->task->io_uring; in io_identity_cow() local
1355 if (tctx->identity != &tctx->__identity && in io_identity_cow()
1356 refcount_dec_and_test(&tctx->identity->count)) in io_identity_cow()
1357 kfree(tctx->identity); in io_identity_cow()
1358 if (req->work.identity != &tctx->__identity && in io_identity_cow()
[all …]
/kernel/linux/linux-5.10/arch/arm64/crypto/
Daes-glue.c882 struct mac_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in mac_update() local
895 mac_do_update(&tctx->key, p, blocks, ctx->dg, in mac_update()
922 struct mac_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in cbcmac_final() local
925 mac_do_update(&tctx->key, NULL, 0, ctx->dg, (ctx->len != 0), 0); in cbcmac_final()
934 struct mac_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in cmac_final() local
936 u8 *consts = tctx->consts; in cmac_final()
943 mac_do_update(&tctx->key, consts, 1, ctx->dg, 0, 1); in cmac_final()
/kernel/linux/linux-5.10/drivers/gpu/drm/amd/amdgpu/
Damdgpu_uvd.c516 struct ttm_operation_ctx tctx = { false, false }; in amdgpu_uvd_cs_pass1() local
539 r = ttm_bo_validate(&bo->tbo, &bo->placement, &tctx); in amdgpu_uvd_cs_pass1()