Home
last modified time | relevance | path

Searched refs:skcipher (Results 1 – 25 of 61) sorted by relevance

123

/linux-6.12.1/crypto/
Dlskcipher.c164 struct crypto_skcipher *skcipher = crypto_skcipher_reqtfm(req); in crypto_lskcipher_crypt_sg() local
165 struct crypto_lskcipher **ctx = crypto_skcipher_ctx(skcipher); in crypto_lskcipher_crypt_sg()
174 ivs = PTR_ALIGN(ivs, crypto_skcipher_alignmask(skcipher) + 1); in crypto_lskcipher_crypt_sg()
203 struct crypto_skcipher *skcipher = crypto_skcipher_reqtfm(req); in crypto_lskcipher_encrypt_sg() local
204 struct crypto_lskcipher **ctx = crypto_skcipher_ctx(skcipher); in crypto_lskcipher_encrypt_sg()
212 struct crypto_skcipher *skcipher = crypto_skcipher_reqtfm(req); in crypto_lskcipher_decrypt_sg() local
213 struct crypto_lskcipher **ctx = crypto_skcipher_ctx(skcipher); in crypto_lskcipher_decrypt_sg()
221 struct crypto_lskcipher *skcipher = __crypto_lskcipher_cast(tfm); in crypto_lskcipher_exit_tfm() local
222 struct lskcipher_alg *alg = crypto_lskcipher_alg(skcipher); in crypto_lskcipher_exit_tfm()
224 alg->exit(skcipher); in crypto_lskcipher_exit_tfm()
[all …]
Dskcipher.c720 struct crypto_skcipher *skcipher = __crypto_skcipher_cast(tfm); in crypto_skcipher_exit_tfm() local
721 struct skcipher_alg *alg = crypto_skcipher_alg(skcipher); in crypto_skcipher_exit_tfm()
723 alg->exit(skcipher); in crypto_skcipher_exit_tfm()
728 struct crypto_skcipher *skcipher = __crypto_skcipher_cast(tfm); in crypto_skcipher_init_tfm() local
729 struct skcipher_alg *alg = crypto_skcipher_alg(skcipher); in crypto_skcipher_init_tfm()
731 skcipher_set_needkey(skcipher); in crypto_skcipher_init_tfm()
734 unsigned am = crypto_skcipher_alignmask(skcipher); in crypto_skcipher_init_tfm()
738 reqsize += crypto_skcipher_ivsize(skcipher); in crypto_skcipher_init_tfm()
739 reqsize += crypto_skcipher_statesize(skcipher); in crypto_skcipher_init_tfm()
740 crypto_skcipher_set_reqsize(skcipher, reqsize); in crypto_skcipher_init_tfm()
[all …]
Dessiv.c52 struct crypto_skcipher *skcipher; member
73 crypto_skcipher_clear_flags(tctx->u.skcipher, CRYPTO_TFM_REQ_MASK); in essiv_skcipher_setkey()
74 crypto_skcipher_set_flags(tctx->u.skcipher, in essiv_skcipher_setkey()
77 err = crypto_skcipher_setkey(tctx->u.skcipher, key, keylen); in essiv_skcipher_setkey()
149 skcipher_request_set_tfm(subreq, tctx->u.skcipher); in essiv_skcipher_crypt()
302 struct crypto_skcipher *skcipher; in essiv_skcipher_init_tfm() local
305 skcipher = crypto_spawn_skcipher(&ictx->u.skcipher_spawn); in essiv_skcipher_init_tfm()
306 if (IS_ERR(skcipher)) in essiv_skcipher_init_tfm()
307 return PTR_ERR(skcipher); in essiv_skcipher_init_tfm()
310 crypto_skcipher_reqsize(skcipher)); in essiv_skcipher_init_tfm()
[all …]
/linux-6.12.1/drivers/crypto/aspeed/
Daspeed-hace-crypto.c642 crypto_alg = container_of(alg, struct aspeed_hace_alg, alg.skcipher.base); in aspeed_crypto_cra_init()
673 .alg.skcipher.base = {
694 .alg.skcipher.op = {
699 .alg.skcipher.base = {
721 .alg.skcipher.op = {
726 .alg.skcipher.base = {
747 .alg.skcipher.op = {
752 .alg.skcipher.base = {
774 .alg.skcipher.op = {
779 .alg.skcipher.base = {
[all …]
/linux-6.12.1/tools/testing/crypto/chacha20-s390/
Dtest-cipher.c129 struct crypto_skcipher *skcipher = NULL; in test_skcipher() local
135 skcipher = crypto_alloc_skcipher(name, 0, 0); in test_skcipher()
136 if (IS_ERR(skcipher)) { in test_skcipher()
138 return PTR_ERR(skcipher); in test_skcipher()
141 req = skcipher_request_alloc(skcipher, GFP_KERNEL); in test_skcipher()
155 if (crypto_skcipher_setkey(skcipher, key, 32)) { in test_skcipher()
169 sk.tfm = skcipher; in test_skcipher()
229 if (skcipher) in test_skcipher()
230 crypto_free_skcipher(skcipher); in test_skcipher()
/linux-6.12.1/drivers/crypto/amlogic/
Damlogic-gxl-core.c52 .alg.skcipher.base = {
74 .alg.skcipher.op = {
81 .alg.skcipher.base = {
102 .alg.skcipher.op = {
125 mc_algs[i].alg.skcipher.base.base.cra_driver_name, in meson_debugfs_show()
126 mc_algs[i].alg.skcipher.base.base.cra_name, in meson_debugfs_show()
201 err = crypto_engine_register_skcipher(&mc_algs[i].alg.skcipher); in meson_register_algs()
204 mc_algs[i].alg.skcipher.base.base.cra_name); in meson_register_algs()
224 crypto_engine_unregister_skcipher(&mc_algs[i].alg.skcipher); in meson_unregister_algs()
/linux-6.12.1/Documentation/crypto/
Dapi-skcipher.rst13 .. kernel-doc:: include/crypto/skcipher.h
16 .. kernel-doc:: include/crypto/skcipher.h
22 .. kernel-doc:: include/crypto/skcipher.h
25 .. kernel-doc:: include/crypto/skcipher.h
Dapi.rst8 api-skcipher
/linux-6.12.1/drivers/crypto/rockchip/
Drk3288_crypto_skcipher.c27 struct rk_crypto_tmp *algt = container_of(alg, struct rk_crypto_tmp, alg.skcipher.base); in rk_cipher_need_fallback()
74 struct rk_crypto_tmp *algt = container_of(alg, struct rk_crypto_tmp, alg.skcipher.base); in rk_cipher_fallback()
314 struct rk_crypto_tmp *algt = container_of(alg, struct rk_crypto_tmp, alg.skcipher.base); in rk_cipher_run()
439 struct rk_crypto_tmp *algt = container_of(alg, struct rk_crypto_tmp, alg.skcipher.base); in rk_cipher_tfm_init()
464 .alg.skcipher.base = {
482 .alg.skcipher.op = {
489 .alg.skcipher.base = {
508 .alg.skcipher.op = {
515 .alg.skcipher.base = {
533 .alg.skcipher.op = {
[all …]
Drk3288_crypto.c213 rk_cipher_algs[i]->alg.skcipher.base.base.cra_driver_name, in rk_crypto_debugfs_show()
214 rk_cipher_algs[i]->alg.skcipher.base.base.cra_name, in rk_crypto_debugfs_show()
262 rk_cipher_algs[i]->alg.skcipher.base.base.cra_name, in rk_crypto_register()
263 rk_cipher_algs[i]->alg.skcipher.base.base.cra_driver_name); in rk_crypto_register()
264 err = crypto_engine_register_skcipher(&rk_cipher_algs[i]->alg.skcipher); in rk_crypto_register()
283 crypto_engine_unregister_skcipher(&rk_cipher_algs[k]->alg.skcipher); in rk_crypto_register()
296 crypto_engine_unregister_skcipher(&rk_cipher_algs[i]->alg.skcipher); in rk_crypto_unregister()
/linux-6.12.1/drivers/crypto/caam/
Dcaamalg_qi.c56 struct skcipher_alg skcipher; member
622 static int skcipher_setkey(struct crypto_skcipher *skcipher, const u8 *key, in skcipher_setkey() argument
625 struct caam_ctx *ctx = crypto_skcipher_ctx_dma(skcipher); in skcipher_setkey()
627 container_of(crypto_skcipher_alg(skcipher), typeof(*alg), in skcipher_setkey()
628 skcipher); in skcipher_setkey()
630 unsigned int ivsize = crypto_skcipher_ivsize(skcipher); in skcipher_setkey()
669 static int aes_skcipher_setkey(struct crypto_skcipher *skcipher, in aes_skcipher_setkey() argument
678 return skcipher_setkey(skcipher, key, keylen, 0); in aes_skcipher_setkey()
681 static int rfc3686_skcipher_setkey(struct crypto_skcipher *skcipher, in rfc3686_skcipher_setkey() argument
699 return skcipher_setkey(skcipher, key, keylen, ctx1_iv_off); in rfc3686_skcipher_setkey()
[all …]
Dcaamalg.c107 struct skcipher_engine_alg skcipher; member
739 static int skcipher_setkey(struct crypto_skcipher *skcipher, const u8 *key, in skcipher_setkey() argument
742 struct caam_ctx *ctx = crypto_skcipher_ctx_dma(skcipher); in skcipher_setkey()
744 container_of(crypto_skcipher_alg(skcipher), typeof(*alg), in skcipher_setkey()
745 skcipher.base); in skcipher_setkey()
747 unsigned int ivsize = crypto_skcipher_ivsize(skcipher); in skcipher_setkey()
775 static int aes_skcipher_setkey(struct crypto_skcipher *skcipher, in aes_skcipher_setkey() argument
784 return skcipher_setkey(skcipher, key, keylen, 0); in aes_skcipher_setkey()
787 static int rfc3686_skcipher_setkey(struct crypto_skcipher *skcipher, in rfc3686_skcipher_setkey() argument
805 return skcipher_setkey(skcipher, key, keylen, ctx1_iv_off); in rfc3686_skcipher_setkey()
[all …]
Dcaamalg_qi2.c60 struct skcipher_alg skcipher; member
943 static int skcipher_setkey(struct crypto_skcipher *skcipher, const u8 *key, in skcipher_setkey() argument
946 struct caam_ctx *ctx = crypto_skcipher_ctx_dma(skcipher); in skcipher_setkey()
948 container_of(crypto_skcipher_alg(skcipher), in skcipher_setkey()
949 struct caam_skcipher_alg, skcipher); in skcipher_setkey()
952 unsigned int ivsize = crypto_skcipher_ivsize(skcipher); in skcipher_setkey()
986 static int aes_skcipher_setkey(struct crypto_skcipher *skcipher, in aes_skcipher_setkey() argument
995 return skcipher_setkey(skcipher, key, keylen, 0); in aes_skcipher_setkey()
998 static int rfc3686_skcipher_setkey(struct crypto_skcipher *skcipher, in rfc3686_skcipher_setkey() argument
1016 return skcipher_setkey(skcipher, key, keylen, ctx1_iv_off); in rfc3686_skcipher_setkey()
[all …]
/linux-6.12.1/drivers/crypto/
Dgeode-aes.c155 crypto_skcipher_clear_flags(tctx->fallback.skcipher, in geode_setkey_skcipher()
157 crypto_skcipher_set_flags(tctx->fallback.skcipher, in geode_setkey_skcipher()
160 return crypto_skcipher_setkey(tctx->fallback.skcipher, key, len); in geode_setkey_skcipher()
243 tctx->fallback.skcipher = in geode_init_skcipher()
246 if (IS_ERR(tctx->fallback.skcipher)) { in geode_init_skcipher()
248 return PTR_ERR(tctx->fallback.skcipher); in geode_init_skcipher()
252 crypto_skcipher_reqsize(tctx->fallback.skcipher)); in geode_init_skcipher()
260 crypto_free_skcipher(tctx->fallback.skcipher); in geode_exit_skcipher()
275 skcipher_request_set_tfm(subreq, tctx->fallback.skcipher); in geode_skcipher_crypt()
Dn2_core.c713 struct skcipher_alg skcipher; member
720 return container_of(alg, struct n2_skcipher_alg, skcipher); in n2_skcipher_alg()
723 static int n2_aes_setkey(struct crypto_skcipher *skcipher, const u8 *key, in n2_aes_setkey() argument
726 struct crypto_tfm *tfm = crypto_skcipher_tfm(skcipher); in n2_aes_setkey()
728 struct n2_skcipher_alg *n2alg = n2_skcipher_alg(skcipher); in n2_aes_setkey()
751 static int n2_des_setkey(struct crypto_skcipher *skcipher, const u8 *key, in n2_des_setkey() argument
754 struct crypto_tfm *tfm = crypto_skcipher_tfm(skcipher); in n2_des_setkey()
756 struct n2_skcipher_alg *n2alg = n2_skcipher_alg(skcipher); in n2_des_setkey()
759 err = verify_skcipher_des_key(skcipher, key); in n2_des_setkey()
770 static int n2_3des_setkey(struct crypto_skcipher *skcipher, const u8 *key, in n2_3des_setkey() argument
[all …]
Dgeode-aes.h52 struct crypto_skcipher *skcipher; member
/linux-6.12.1/include/crypto/internal/
Dskcipher.h105 struct crypto_skcipher *skcipher) in skcipher_alg_instance() argument
107 return container_of(crypto_skcipher_alg(skcipher), in skcipher_alg_instance()
182 struct crypto_skcipher *skcipher, unsigned int reqsize) in crypto_skcipher_set_reqsize() argument
184 skcipher->reqsize = reqsize; in crypto_skcipher_set_reqsize()
188 struct crypto_skcipher *skcipher, unsigned int reqsize) in crypto_skcipher_set_reqsize_dma() argument
191 skcipher->reqsize = reqsize; in crypto_skcipher_set_reqsize_dma()
/linux-6.12.1/drivers/crypto/allwinner/sun8i-ss/
Dsun8i-ss-core.c172 .alg.skcipher.base = {
194 .alg.skcipher.op = {
202 .alg.skcipher.base = {
223 .alg.skcipher.op = {
231 .alg.skcipher.base = {
253 .alg.skcipher.op = {
261 .alg.skcipher.base = {
282 .alg.skcipher.op = {
489 ss_algs[i].alg.skcipher.base.base.cra_driver_name, in sun8i_ss_debugfs_show()
490 ss_algs[i].alg.skcipher.base.base.cra_name, in sun8i_ss_debugfs_show()
[all …]
/linux-6.12.1/drivers/crypto/allwinner/sun8i-ce/
Dsun8i-ce-core.c307 .alg.skcipher.base = {
329 .alg.skcipher.op = {
337 .alg.skcipher.base = {
358 .alg.skcipher.op = {
366 .alg.skcipher.base = {
388 .alg.skcipher.op = {
396 .alg.skcipher.base = {
417 .alg.skcipher.op = {
656 ce_algs[i].alg.skcipher.base.base.cra_driver_name, in sun8i_ce_debugfs_show()
657 ce_algs[i].alg.skcipher.base.base.cra_name, in sun8i_ce_debugfs_show()
[all …]
/linux-6.12.1/drivers/crypto/gemini/
Dsl3516-ce-core.c222 .alg.skcipher.base = {
242 .alg.skcipher.op = {
271 ce_algs[i].alg.skcipher.base.base.cra_driver_name, in sl3516_ce_debugfs_show()
272 ce_algs[i].alg.skcipher.base.base.cra_name, in sl3516_ce_debugfs_show()
292 ce_algs[i].alg.skcipher.base.base.cra_name); in sl3516_ce_register_algs()
293 err = crypto_engine_register_skcipher(&ce_algs[i].alg.skcipher); in sl3516_ce_register_algs()
296 ce_algs[i].alg.skcipher.base.base.cra_name); in sl3516_ce_register_algs()
319 ce_algs[i].alg.skcipher.base.base.cra_name); in sl3516_ce_unregister_algs()
320 crypto_engine_unregister_skcipher(&ce_algs[i].alg.skcipher); in sl3516_ce_unregister_algs()
/linux-6.12.1/drivers/crypto/marvell/cesa/
Dcipher.c222 memcpy(skreq->iv, basereq->chain.last->op->ctx.skcipher.iv, in mv_cesa_skcipher_complete()
485 memcpy(tmpl->ctx.skcipher.key, ctx->key, DES_KEY_SIZE); in mv_cesa_des_op()
539 memcpy(tmpl->ctx.skcipher.iv, req->iv, DES_BLOCK_SIZE); in mv_cesa_cbc_des_op()
592 memcpy(tmpl->ctx.skcipher.key, ctx->key, DES3_EDE_KEY_SIZE); in mv_cesa_des3_op()
645 memcpy(tmpl->ctx.skcipher.iv, req->iv, DES3_EDE_BLOCK_SIZE); in mv_cesa_cbc_des3_op()
712 tmpl->ctx.skcipher.key[i] = cpu_to_le32(key[i]); in mv_cesa_aes_op()
774 memcpy(tmpl->ctx.skcipher.iv, req->iv, AES_BLOCK_SIZE); in mv_cesa_cbc_aes_op()
/linux-6.12.1/arch/s390/crypto/
Daes_s390.c48 struct crypto_skcipher *skcipher; member
185 crypto_skcipher_clear_flags(sctx->fallback.skcipher, in setkey_fallback_skcipher()
187 crypto_skcipher_set_flags(sctx->fallback.skcipher, in setkey_fallback_skcipher()
190 return crypto_skcipher_setkey(sctx->fallback.skcipher, key, len); in setkey_fallback_skcipher()
200 skcipher_request_set_tfm(subreq, sctx->fallback.skcipher); in fallback_skcipher_crypt()
264 sctx->fallback.skcipher = crypto_alloc_skcipher(name, 0, in fallback_init_skcipher()
267 if (IS_ERR(sctx->fallback.skcipher)) { in fallback_init_skcipher()
270 return PTR_ERR(sctx->fallback.skcipher); in fallback_init_skcipher()
274 crypto_skcipher_reqsize(sctx->fallback.skcipher)); in fallback_init_skcipher()
282 crypto_free_skcipher(sctx->fallback.skcipher); in fallback_exit_skcipher()
/linux-6.12.1/drivers/crypto/inside-secure/
Dsafexcel_cipher.c616 struct crypto_skcipher *skcipher = crypto_skcipher_reqtfm(areq); in safexcel_handle_req_result() local
617 struct safexcel_cipher_ctx *ctx = crypto_skcipher_ctx(skcipher); in safexcel_handle_req_result()
663 crypto_skcipher_ivsize(skcipher), in safexcel_handle_req_result()
665 crypto_skcipher_ivsize(skcipher))); in safexcel_handle_req_result()
681 struct crypto_skcipher *skcipher = crypto_skcipher_reqtfm(areq); in safexcel_send_req() local
722 crypto_skcipher_ivsize(skcipher), in safexcel_send_req()
724 crypto_skcipher_ivsize(skcipher))); in safexcel_send_req()
1053 struct crypto_skcipher *skcipher = crypto_skcipher_reqtfm(req); in safexcel_skcipher_send() local
1060 memcpy(input_iv, req->iv, crypto_skcipher_ivsize(skcipher)); in safexcel_skcipher_send()
1129 EIP197_REQUEST_ON_STACK(req, skcipher, EIP197_SKCIPHER_REQ_SIZE); in safexcel_skcipher_exit_inv()
[all …]
/linux-6.12.1/drivers/crypto/qce/
DMakefile8 qcrypto-$(CONFIG_CRYPTO_DEV_QCE_SKCIPHER) += skcipher.o
Dcipher.h51 return container_of(alg, struct qce_alg_template, alg.skcipher); in to_cipher_tmpl()

123