Home
last modified time | relevance | path

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

/drivers/crypto/keembay/
Dkeembay-ocs-aes-core.c122 static struct ocs_aes_dev *kmb_ocs_aes_find_dev(struct ocs_aes_tctx *tctx) in kmb_ocs_aes_find_dev() argument
128 if (tctx->aes_dev) { in kmb_ocs_aes_find_dev()
129 aes_dev = tctx->aes_dev; in kmb_ocs_aes_find_dev()
135 tctx->aes_dev = aes_dev; in kmb_ocs_aes_find_dev()
168 static int save_key(struct ocs_aes_tctx *tctx, const u8 *in_key, size_t key_len, in save_key() argument
177 memcpy(tctx->key, in_key, key_len); in save_key()
178 tctx->key_len = key_len; in save_key()
179 tctx->cipher = cipher; in save_key()
188 struct ocs_aes_tctx *tctx = crypto_skcipher_ctx(tfm); in kmb_ocs_sk_set_key() local
191 tctx->use_fallback = (cipher == OCS_AES && in kmb_ocs_sk_set_key()
[all …]
Dkeembay-ocs-ecc.c208 static struct ocs_ecc_dev *kmb_ocs_ecc_find_dev(struct ocs_ecc_ctx *tctx) in kmb_ocs_ecc_find_dev() argument
210 if (tctx->ecc_dev) in kmb_ocs_ecc_find_dev()
211 return tctx->ecc_dev; in kmb_ocs_ecc_find_dev()
216 tctx->ecc_dev = list_first_entry(&ocs_ecc.dev_list, struct ocs_ecc_dev, in kmb_ocs_ecc_find_dev()
221 return tctx->ecc_dev; in kmb_ocs_ecc_find_dev()
543 struct ocs_ecc_ctx *tctx = kpp_tfm_ctx(tfm); in kmb_ocs_ecdh_set_secret() local
552 if (params.key_size > digits_to_bytes(tctx->curve->g.ndigits)) { in kmb_ocs_ecdh_set_secret()
559 rc = kmb_ecc_gen_privkey(tctx->curve, tctx->private_key); in kmb_ocs_ecdh_set_secret()
563 rc = kmb_ecc_is_key_valid(tctx->curve, (const u64 *)params.key, in kmb_ocs_ecdh_set_secret()
568 ecc_swap_digits((const u64 *)params.key, tctx->private_key, in kmb_ocs_ecdh_set_secret()
[all …]
Dkeembay-ocs-hcu-core.c167 struct ocs_hcu_ctx *tctx = crypto_ahash_ctx(tfm); in kmb_ocs_hcu_find_dev() local
170 if (tctx->hcu_dev) in kmb_ocs_hcu_find_dev()
171 return tctx->hcu_dev; in kmb_ocs_hcu_find_dev()
178 tctx->hcu_dev = list_first_entry_or_null(&ocs_hcu.dev_list, in kmb_ocs_hcu_find_dev()
183 return tctx->hcu_dev; in kmb_ocs_hcu_find_dev()
418 struct ocs_hcu_ctx *tctx = crypto_ahash_ctx(tfm); in kmb_ocs_hcu_do_one_request() local
438 rc = ocs_hcu_hmac(hcu_dev, rctx->algo, tctx->key, tctx->key_len, in kmb_ocs_hcu_do_one_request()
534 WARN_ON(tctx->key_len != rctx->blk_sz); in kmb_ocs_hcu_do_one_request()
536 rctx->buffer[i] = tctx->key[i] ^ HMAC_OPAD_VALUE; in kmb_ocs_hcu_do_one_request()
/drivers/crypto/
Dgeode-aes.c70 geode_aes_crypt(const struct geode_aes_tfm_ctx *tctx, const void *src, in geode_aes_crypt() argument
97 _writefield(AES_WRITEKEY0_REG, tctx->key); in geode_aes_crypt()
113 struct geode_aes_tfm_ctx *tctx = crypto_tfm_ctx(tfm); in geode_setkey_cip() local
115 tctx->keylen = len; in geode_setkey_cip()
118 memcpy(tctx->key, key, len); in geode_setkey_cip()
129 tctx->fallback.cip->base.crt_flags &= ~CRYPTO_TFM_REQ_MASK; in geode_setkey_cip()
130 tctx->fallback.cip->base.crt_flags |= in geode_setkey_cip()
133 return crypto_cipher_setkey(tctx->fallback.cip, key, len); in geode_setkey_cip()
139 struct geode_aes_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in geode_setkey_skcipher() local
141 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()
456 struct omap_sham_ctx *tctx = crypto_ahash_ctx(tfm); in omap_sham_write_ctrl_omap4() local
457 struct omap_sham_hmac_ctx *bctx = tctx->base; in omap_sham_write_ctrl_omap4()
946 struct omap_sham_ctx *tctx = crypto_ahash_ctx(tfm); in omap_sham_init() local
995 if (tctx->flags & BIT(FLAGS_HMAC)) { in omap_sham_init()
997 struct omap_sham_hmac_ctx *bctx = tctx->base; in omap_sham_init()
1102 struct omap_sham_ctx *tctx = crypto_tfm_ctx(req->base.tfm); in omap_sham_finish_hmac() local
1103 struct omap_sham_hmac_ctx *bctx = tctx->base; in omap_sham_finish_hmac()
1218 struct omap_sham_ctx *tctx = crypto_tfm_ctx(req->base.tfm); in omap_sham_final_shash() local
[all …]
Ds5p-sss.c1489 struct s5p_hash_ctx *tctx = crypto_tfm_ctx(req->base.tfm); in s5p_hash_enqueue() local
1493 return s5p_hash_handle_queue(tctx->dd, req); in s5p_hash_enqueue()
1554 struct s5p_hash_ctx *tctx = crypto_tfm_ctx(req->base.tfm); in s5p_hash_final() local
1556 return crypto_shash_tfm_digest(tctx->fallback, ctx->buffer, in s5p_hash_final()
1600 struct s5p_hash_ctx *tctx = crypto_ahash_ctx(tfm); in s5p_hash_init() local
1602 ctx->dd = tctx->dd; in s5p_hash_init()
1610 dev_dbg(tctx->dd->dev, "init: digest size: %d\n", in s5p_hash_init()
1651 struct s5p_hash_ctx *tctx = crypto_tfm_ctx(tfm); in s5p_hash_cra_init_alg() local
1654 tctx->dd = s5p_dev; in s5p_hash_cra_init_alg()
1656 tctx->fallback = crypto_alloc_shash(alg_name, 0, in s5p_hash_cra_init_alg()
[all …]
Dimg-hash.c625 struct img_hash_ctx *tctx = crypto_ahash_ctx(tfm); in img_hash_digest() local
632 if (!tctx->hdev) { in img_hash_digest()
637 tctx->hdev = hdev; in img_hash_digest()
640 hdev = tctx->hdev; in img_hash_digest()
673 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.c405 static struct atmel_sha_dev *atmel_sha_find_dev(struct atmel_sha_ctx *tctx) in atmel_sha_find_dev() argument
411 if (!tctx->dd) { in atmel_sha_find_dev()
416 tctx->dd = dd; in atmel_sha_find_dev()
418 dd = tctx->dd; in atmel_sha_find_dev()
429 struct atmel_sha_ctx *tctx = crypto_ahash_ctx(tfm); in atmel_sha_init() local
431 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 …]
/drivers/crypto/rockchip/
Drk3288_crypto_ahash.c80 struct rk_ahash_ctx *tctx = crypto_ahash_ctx(tfm); in rk_ahash_reg_init() local
81 struct rk_crypto_info *dev = tctx->dev; in rk_ahash_reg_init()
198 struct rk_ahash_ctx *tctx = crypto_tfm_ctx(req->base.tfm); in rk_ahash_digest() local
199 struct rk_crypto_info *dev = tctx->dev; in rk_ahash_digest()
223 struct rk_ahash_ctx *tctx = crypto_ahash_ctx(tfm); in rk_hash_prepare() local
226 ret = dma_map_sg(tctx->dev->dev, areq->src, sg_nents(areq->src), DMA_TO_DEVICE); in rk_hash_prepare()
240 struct rk_ahash_ctx *tctx = crypto_ahash_ctx(tfm); in rk_hash_unprepare() local
242 dma_unmap_sg(tctx->dev->dev, areq->src, rctx->nrsg, DMA_TO_DEVICE); in rk_hash_unprepare()
251 struct rk_ahash_ctx *tctx = crypto_ahash_ctx(tfm); in rk_hash_run() local
277 reinit_completion(&tctx->dev->complete); in rk_hash_run()
[all …]
/drivers/crypto/aspeed/
Daspeed-hace-hash.c363 struct aspeed_sham_ctx *tctx = crypto_ahash_ctx(tfm); in aspeed_ahash_hmac_resume() local
364 struct aspeed_sha_hmac_ctx *bctx = tctx->base; in aspeed_ahash_hmac_resume()
549 struct aspeed_sham_ctx *tctx = crypto_ahash_ctx(tfm); in aspeed_ahash_do_request() local
550 struct aspeed_hace_dev *hace_dev = tctx->hace_dev; in aspeed_ahash_do_request()
573 struct aspeed_sham_ctx *tctx = crypto_ahash_ctx(tfm); in aspeed_ahash_prepare_request() local
574 struct aspeed_hace_dev *hace_dev = tctx->hace_dev; in aspeed_ahash_prepare_request()
592 struct aspeed_sham_ctx *tctx = crypto_ahash_ctx(tfm); in aspeed_sham_update() local
593 struct aspeed_hace_dev *hace_dev = tctx->hace_dev; in aspeed_sham_update()
633 struct aspeed_sham_ctx *tctx = crypto_ahash_ctx(tfm); in aspeed_sham_final() local
634 struct aspeed_hace_dev *hace_dev = tctx->hace_dev; in aspeed_sham_final()
[all …]
/drivers/crypto/xilinx/
Dzynqmp-sha.c85 struct zynqmp_sha_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in zynqmp_sha_init() local
87 dctx->fbk_req.tfm = tctx->fbk_tfm; in zynqmp_sha_init()
115 struct zynqmp_sha_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in zynqmp_sha_import() local
117 dctx->fbk_req.tfm = tctx->fbk_tfm; in zynqmp_sha_import()
/drivers/gpu/drm/amd/amdgpu/
Damdgpu_uvd.c578 struct ttm_operation_ctx tctx = { false, false }; in amdgpu_uvd_cs_pass1() local
601 r = ttm_bo_validate(&bo->tbo, &bo->placement, &tctx); in amdgpu_uvd_cs_pass1()