| /linux/drivers/crypto/keembay/ |
| A D | keembay-ocs-aes-core.c | 128 if (tctx->aes_dev) { in kmb_ocs_aes_find_dev() 135 tctx->aes_dev = aes_dev; in kmb_ocs_aes_find_dev() 179 tctx->cipher = cipher; in save_key() 904 rc = ocs_aes_ccm_op(tctx->aes_dev, tctx->cipher, in kmb_ocs_aead_run() 913 rc = ocs_aes_gcm_op(tctx->aes_dev, tctx->cipher, in kmb_ocs_aead_run() 962 err = ocs_aes_set_key(tctx->aes_dev, tctx->key_len, tctx->key, in kmb_ocs_aes_sk_do_one_request() 983 if (!tctx->aes_dev) in kmb_ocs_aes_aead_do_one_request() 986 err = ocs_aes_set_key(tctx->aes_dev, tctx->key_len, tctx->key, in kmb_ocs_aes_aead_do_one_request() 1192 if (tctx->aes_dev) in clear_key() 1201 clear_key(tctx); in ocs_exit_tfm() [all …]
|
| A D | keembay-ocs-ecc.c | 210 if (tctx->ecc_dev) in kmb_ocs_ecc_find_dev() 211 return tctx->ecc_dev; in kmb_ocs_ecc_find_dev() 221 return tctx->ecc_dev; in kmb_ocs_ecc_find_dev() 559 rc = kmb_ecc_gen_privkey(tctx->curve, tctx->private_key); in kmb_ocs_ecdh_set_secret() 574 tctx->curve = NULL; in kmb_ocs_ecdh_set_secret() 734 if (!tctx->curve) in kmb_ocs_ecdh_generate_public_key() 759 if (!tctx->curve) in kmb_ocs_ecdh_compute_shared_secret() 783 memset(tctx, 0, sizeof(*tctx)); in kmb_ecc_tctx_init() 785 tctx->ecc_dev = kmb_ocs_ecc_find_dev(tctx); in kmb_ecc_tctx_init() 794 if (!tctx->curve) in kmb_ecc_tctx_init() [all …]
|
| A D | keembay-ocs-hcu-core.c | 167 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()
|
| /linux/drivers/crypto/ |
| A D | geode-aes.c | 97 _writefield(AES_WRITEKEY0_REG, tctx->key); in geode_aes_crypt() 115 tctx->keylen = len; in geode_setkey_cip() 118 memcpy(tctx->key, key, len); in geode_setkey_cip() 130 tctx->fallback.cip->base.crt_flags |= in geode_setkey_cip() 141 tctx->keylen = len; in geode_setkey_skcipher() 144 memcpy(tctx->key, key, len); in geode_setkey_skcipher() 200 if (IS_ERR(tctx->fallback.cip)) { in fallback_init_cip() 202 return PTR_ERR(tctx->fallback.cip); in fallback_init_cip() 212 crypto_free_cipher(tctx->fallback.cip); in fallback_exit_cip() 243 tctx->fallback.skcipher = in geode_init_skcipher() [all …]
|
| A D | omap-sham.c | 310 struct omap_sham_hmac_ctx *bctx = tctx->base; in omap_sham_copy_hash_omap4() 457 struct omap_sham_hmac_ctx *bctx = tctx->base; in omap_sham_write_ctrl_omap4() 995 if (tctx->flags & BIT(FLAGS_HMAC)) { in omap_sham_init() 1329 if (IS_ERR(tctx->fallback)) { in omap_sham_cra_init_alg() 1332 return PTR_ERR(tctx->fallback); in omap_sham_cra_init_alg() 1340 tctx->flags |= BIT(FLAGS_HMAC); in omap_sham_cra_init_alg() 1346 crypto_free_shash(tctx->fallback); in omap_sham_cra_init_alg() 1354 tctx->enginectx.op.unprepare_request = NULL; in omap_sham_cra_init_alg() 1398 crypto_free_shash(tctx->fallback); in omap_sham_cra_exit() 1399 tctx->fallback = NULL; in omap_sham_cra_exit() [all …]
|
| A D | s5p-sss.c | 1493 return s5p_hash_handle_queue(tctx->dd, req); in s5p_hash_enqueue() 1602 ctx->dd = tctx->dd; 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() 1658 if (IS_ERR(tctx->fallback)) { in s5p_hash_cra_init_alg() 1660 return PTR_ERR(tctx->fallback); in s5p_hash_cra_init_alg() 1686 struct s5p_hash_ctx *tctx = crypto_tfm_ctx(tfm); in s5p_hash_cra_exit() local 1688 crypto_free_shash(tctx->fallback); in s5p_hash_cra_exit() 1689 tctx->fallback = NULL; in s5p_hash_cra_exit() [all …]
|
| A D | img-hash.c | 621 struct img_hash_ctx *tctx = crypto_ahash_ctx(tfm); in img_hash_digest() local 628 if (!tctx->hdev) { in img_hash_digest() 633 tctx->hdev = hdev; in img_hash_digest() 636 hdev = tctx->hdev; in img_hash_digest() 669 err = img_hash_handle_queue(tctx->hdev, req); in img_hash_digest() 714 struct img_hash_ctx *tctx = crypto_tfm_ctx(tfm); in img_hash_cra_exit() local 716 crypto_free_ahash(tctx->fallback); in img_hash_cra_exit()
|
| A D | atmel-sha.c | 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() 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() 2181 tctx->start = atmel_sha_authenc_start; in atmel_sha_authenc_spawn() 2182 tctx->flags = mode; in atmel_sha_authenc_spawn() [all …]
|
| /linux/crypto/ |
| A D | essiv.c | 112 desc->tfm = tctx->hash; in essiv_aead_setkey() 266 struct essiv_tfm_ctx *tctx) in essiv_init_tfm() argument 282 tctx->essiv_cipher = essiv_cipher; in essiv_init_tfm() 283 tctx->hash = hash; in essiv_init_tfm() 307 err = essiv_init_tfm(ictx, tctx); in essiv_skcipher_init_tfm() 313 tctx->u.skcipher = skcipher; in essiv_skcipher_init_tfm() 340 err = essiv_init_tfm(ictx, tctx); in essiv_aead_init_tfm() 346 tctx->u.aead = aead; in essiv_aead_init_tfm() 356 crypto_free_shash(tctx->hash); in essiv_skcipher_exit_tfm() 363 crypto_free_aead(tctx->u.aead); in essiv_aead_exit_tfm() [all …]
|
| A D | adiantum.c | 133 crypto_skcipher_set_flags(tctx->streamcipher, in adiantum_setkey() 161 crypto_cipher_set_flags(tctx->blockcipher, in adiantum_setkey() 164 err = crypto_cipher_setkey(tctx->blockcipher, keyp, in adiantum_setkey() 171 poly1305_core_setkey(&tctx->header_hash_key, keyp); in adiantum_setkey() 259 hash_desc->tfm = tctx->hash; in adiantum_hash_message() 424 tctx->streamcipher = streamcipher; in adiantum_init_tfm() 425 tctx->blockcipher = blockcipher; in adiantum_init_tfm() 426 tctx->hash = hash; in adiantum_init_tfm() 453 crypto_free_skcipher(tctx->streamcipher); in adiantum_exit_tfm() 454 crypto_free_cipher(tctx->blockcipher); in adiantum_exit_tfm() [all …]
|
| A D | vmac.c | 403 const u64 *kptr = tctx->nhkey; in vhash_blocks() 404 const u64 pkh = tctx->polykey[0]; in vhash_blocks() 405 const u64 pkl = tctx->polykey[1]; in vhash_blocks() 450 tctx->nhkey[i] = be64_to_cpu(out[0]); in vmac_setkey() 471 tctx->l3key[i] = be64_to_cpu(out[0]); in vmac_setkey() 474 } while (tctx->l3key[i] >= p64 || tctx->l3key[i+1] >= p64); in vmac_setkey() 552 poly_step(ch, cl, tctx->polykey[0], tctx->polykey[1], in vhash_final() 559 return l3hash(ch, cl, tctx->l3key[0], tctx->l3key[1], partial * 8); in vhash_final() 582 hash = vhash_final(tctx, dctx); in vmac_final() 608 tctx->cipher = cipher; in vmac_init_tfm() [all …]
|
| A D | xxhash_generic.c | 23 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()
|
| A D | xcbc.c | 90 struct xcbc_tfm_ctx *tctx = crypto_shash_ctx(parent); in crypto_xcbc_digest_update() local 92 struct crypto_cipher *tfm = tctx->child; in crypto_xcbc_digest_update() 136 struct xcbc_tfm_ctx *tctx = crypto_shash_ctx(parent); in crypto_xcbc_digest_final() local 138 struct crypto_cipher *tfm = tctx->child; in crypto_xcbc_digest_final() 140 u8 *consts = PTR_ALIGN(&tctx->ctx[0], alignmask + 1); in crypto_xcbc_digest_final()
|
| A D | cmac.c | 123 struct cmac_tfm_ctx *tctx = crypto_shash_ctx(parent); in crypto_cmac_digest_update() local 125 struct crypto_cipher *tfm = tctx->child; in crypto_cmac_digest_update() 169 struct cmac_tfm_ctx *tctx = crypto_shash_ctx(parent); in crypto_cmac_digest_final() local 171 struct crypto_cipher *tfm = tctx->child; in crypto_cmac_digest_final() 173 u8 *consts = PTR_ALIGN((void *)tctx->ctx, in crypto_cmac_digest_final()
|
| A D | ccm.c | 802 struct cbcmac_tfm_ctx *tctx = crypto_shash_ctx(parent); in crypto_cbcmac_digest_update() local 804 struct crypto_cipher *tfm = tctx->child; in crypto_cbcmac_digest_update() 828 struct cbcmac_tfm_ctx *tctx = crypto_shash_ctx(parent); in crypto_cbcmac_digest_final() local 830 struct crypto_cipher *tfm = tctx->child; in crypto_cbcmac_digest_final()
|
| /linux/drivers/crypto/rockchip/ |
| A D | rk3288_crypto_ahash.c | 168 struct rk_crypto_info *dev = tctx->dev; in rk_ahash_digest() 283 tctx->dev = algt->dev; in rk_cra_hash_init() 285 if (!tctx->dev->addr_vir) { 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() 296 if (IS_ERR(tctx->fallback_tfm)) { in rk_cra_hash_init() 298 return PTR_ERR(tctx->fallback_tfm); in rk_cra_hash_init() 302 crypto_ahash_reqsize(tctx->fallback_tfm)); in rk_cra_hash_init() 304 return tctx->dev->enable_clk(tctx->dev); in rk_cra_hash_init() 311 free_page((unsigned long)tctx->dev->addr_vir); in rk_cra_hash_exit() [all …]
|
| /linux/include/crypto/internal/ |
| A D | blake2b.h | 75 struct blake2b_tfm_ctx *tctx = crypto_shash_ctx(tfm); in crypto_blake2b_setkey() local 80 memcpy(tctx->key, key, keylen); in crypto_blake2b_setkey() 81 tctx->keylen = keylen; in crypto_blake2b_setkey() 88 const struct blake2b_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in crypto_blake2b_init() local 92 __blake2b_init(state, outlen, tctx->key, tctx->keylen); in crypto_blake2b_init()
|
| A D | blake2s.h | 79 struct blake2s_tfm_ctx *tctx = crypto_shash_ctx(tfm); in crypto_blake2s_setkey() local 84 memcpy(tctx->key, key, keylen); in crypto_blake2s_setkey() 85 tctx->keylen = keylen; in crypto_blake2s_setkey() 92 const struct blake2s_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in crypto_blake2s_init() local 96 __blake2s_init(state, outlen, tctx->key, tctx->keylen); in crypto_blake2s_init()
|
| /linux/fs/ |
| A D | io_uring.c | 1567 BUG_ON(!tctx); in io_queue_async_work() 6292 if (!tctx || !tctx->io_wq) in io_async_cancel_one() 8654 tctx = kzalloc(sizeof(*tctx), GFP_KERNEL); in io_uring_alloc_task_context() 8692 kfree(tctx); in __io_uring_free() 9656 if (!tctx || !tctx->io_wq) in io_uring_try_cancel_iowq() 9679 } else if (tctx && tctx->io_wq) { in io_uring_try_cancel_requests() 9759 if (likely(tctx && tctx->last == ctx)) in io_uring_add_tctx_node() 9772 if (!tctx) in io_uring_del_tctx_node() 10764 if (!tctx || !tctx->io_wq) in io_register_iowq_aff() 10788 if (!tctx || !tctx->io_wq) in io_unregister_iowq_aff() [all …]
|
| /linux/arch/arm64/crypto/ |
| A D | aes-glue.c | 841 struct mac_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in mac_update() local 854 mac_do_update(&tctx->key, p, blocks, ctx->dg, in mac_update() 881 struct mac_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in cbcmac_final() local 884 mac_do_update(&tctx->key, NULL, 0, ctx->dg, (ctx->len != 0), 0); in cbcmac_final() 893 struct mac_tfm_ctx *tctx = crypto_shash_ctx(desc->tfm); in cmac_final() local 895 u8 *consts = tctx->consts; in cmac_final() 902 mac_do_update(&tctx->key, consts, 1, ctx->dg, 0, 1); in cmac_final()
|
| /linux/drivers/gpu/drm/amd/amdgpu/ |
| A D | amdgpu_uvd.c | 577 struct ttm_operation_ctx tctx = { false, false }; in amdgpu_uvd_cs_pass1() local 600 r = ttm_bo_validate(&bo->tbo, &bo->placement, &tctx); in amdgpu_uvd_cs_pass1()
|