Home
last modified time | relevance | path

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

123

/Linux-v5.10/crypto/
Dcbc.c17 struct crypto_skcipher *skcipher) in crypto_cbc_encrypt_segment() argument
19 unsigned int bsize = crypto_skcipher_blocksize(skcipher); in crypto_cbc_encrypt_segment()
28 cipher = skcipher_cipher_simple(skcipher); in crypto_cbc_encrypt_segment()
45 struct crypto_skcipher *skcipher) in crypto_cbc_encrypt_inplace() argument
47 unsigned int bsize = crypto_skcipher_blocksize(skcipher); in crypto_cbc_encrypt_inplace()
55 cipher = skcipher_cipher_simple(skcipher); in crypto_cbc_encrypt_inplace()
74 struct crypto_skcipher *skcipher = crypto_skcipher_reqtfm(req); in crypto_cbc_encrypt() local
82 err = crypto_cbc_encrypt_inplace(&walk, skcipher); in crypto_cbc_encrypt()
84 err = crypto_cbc_encrypt_segment(&walk, skcipher); in crypto_cbc_encrypt()
92 struct crypto_skcipher *skcipher) in crypto_cbc_decrypt_segment() argument
[all …]
Dessiv.c51 struct crypto_skcipher *skcipher; member
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()
148 skcipher_request_set_tfm(subreq, tctx->u.skcipher); in essiv_skcipher_crypt()
296 struct crypto_skcipher *skcipher; in essiv_skcipher_init_tfm() local
299 skcipher = crypto_spawn_skcipher(&ictx->u.skcipher_spawn); in essiv_skcipher_init_tfm()
300 if (IS_ERR(skcipher)) in essiv_skcipher_init_tfm()
301 return PTR_ERR(skcipher); in essiv_skcipher_init_tfm()
304 crypto_skcipher_reqsize(skcipher)); in essiv_skcipher_init_tfm()
[all …]
Dskcipher.c660 struct crypto_skcipher *skcipher = __crypto_skcipher_cast(tfm); in crypto_skcipher_exit_tfm() local
661 struct skcipher_alg *alg = crypto_skcipher_alg(skcipher); in crypto_skcipher_exit_tfm()
663 alg->exit(skcipher); in crypto_skcipher_exit_tfm()
668 struct crypto_skcipher *skcipher = __crypto_skcipher_cast(tfm); in crypto_skcipher_init_tfm() local
669 struct skcipher_alg *alg = crypto_skcipher_alg(skcipher); in crypto_skcipher_init_tfm()
671 skcipher_set_needkey(skcipher); in crypto_skcipher_init_tfm()
674 skcipher->base.exit = crypto_skcipher_exit_tfm; in crypto_skcipher_init_tfm()
677 return alg->init(skcipher); in crypto_skcipher_init_tfm()
684 struct skcipher_instance *skcipher = in crypto_skcipher_free_instance() local
687 skcipher->free(skcipher); in crypto_skcipher_free_instance()
[all …]
/Linux-v5.10/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.rst11 api-skcipher
/Linux-v5.10/drivers/crypto/
Dgeode-aes.c154 crypto_skcipher_clear_flags(tctx->fallback.skcipher, in geode_setkey_skcipher()
156 crypto_skcipher_set_flags(tctx->fallback.skcipher, in geode_setkey_skcipher()
159 return crypto_skcipher_setkey(tctx->fallback.skcipher, key, len); in geode_setkey_skcipher()
242 tctx->fallback.skcipher = in geode_init_skcipher()
245 if (IS_ERR(tctx->fallback.skcipher)) { in geode_init_skcipher()
247 return PTR_ERR(tctx->fallback.skcipher); in geode_init_skcipher()
251 crypto_skcipher_reqsize(tctx->fallback.skcipher)); in geode_init_skcipher()
259 crypto_free_skcipher(tctx->fallback.skcipher); in geode_exit_skcipher()
274 skcipher_request_set_tfm(subreq, tctx->fallback.skcipher); in geode_skcipher_crypt()
Dn2_core.c711 struct skcipher_alg skcipher; member
718 return container_of(alg, struct n2_skcipher_alg, skcipher); in n2_skcipher_alg()
725 static int n2_aes_setkey(struct crypto_skcipher *skcipher, const u8 *key, in n2_aes_setkey() argument
728 struct crypto_tfm *tfm = crypto_skcipher_tfm(skcipher); in n2_aes_setkey()
730 struct n2_skcipher_alg *n2alg = n2_skcipher_alg(skcipher); in n2_aes_setkey()
753 static int n2_des_setkey(struct crypto_skcipher *skcipher, const u8 *key, in n2_des_setkey() argument
756 struct crypto_tfm *tfm = crypto_skcipher_tfm(skcipher); in n2_des_setkey()
758 struct n2_skcipher_alg *n2alg = n2_skcipher_alg(skcipher); in n2_des_setkey()
761 err = verify_skcipher_des_key(skcipher, key); in n2_des_setkey()
772 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
Dsa2ul.c138 struct skcipher_alg skcipher; member
822 crypto_free_sync_skcipher(ctx->fallback.skcipher); in sa_cipher_cra_exit()
844 ctx->fallback.skcipher = in sa_cipher_cra_init()
847 if (IS_ERR(ctx->fallback.skcipher)) { in sa_cipher_cra_init()
849 return PTR_ERR(ctx->fallback.skcipher); in sa_cipher_cra_init()
877 crypto_sync_skcipher_clear_flags(ctx->fallback.skcipher, in sa_cipher_setkey()
879 crypto_sync_skcipher_set_flags(ctx->fallback.skcipher, in sa_cipher_setkey()
882 ret = crypto_sync_skcipher_setkey(ctx->fallback.skcipher, key, keylen); in sa_cipher_setkey()
1285 SYNC_SKCIPHER_REQUEST_ON_STACK(subreq, ctx->fallback.skcipher); in sa_cipher_run()
1287 skcipher_request_set_sync_tfm(subreq, ctx->fallback.skcipher); in sa_cipher_run()
[all …]
Dhifn_795x.c2232 struct skcipher_alg skcipher; member
2241 .skcipher = {
2251 .skcipher = {
2261 .skcipher = {
2272 .skcipher = {
2286 .skcipher = {
2296 .skcipher = {
2306 .skcipher = {
2317 .skcipher = {
2331 .skcipher = {
[all …]
/Linux-v5.10/drivers/crypto/caam/
Dcaamalg_qi.c51 struct skcipher_alg skcipher; member
617 static int skcipher_setkey(struct crypto_skcipher *skcipher, const u8 *key, in skcipher_setkey() argument
620 struct caam_ctx *ctx = crypto_skcipher_ctx(skcipher); in skcipher_setkey()
622 container_of(crypto_skcipher_alg(skcipher), typeof(*alg), in skcipher_setkey()
623 skcipher); in skcipher_setkey()
625 unsigned int ivsize = crypto_skcipher_ivsize(skcipher); in skcipher_setkey()
664 static int aes_skcipher_setkey(struct crypto_skcipher *skcipher, in aes_skcipher_setkey() argument
673 return skcipher_setkey(skcipher, key, keylen, 0); in aes_skcipher_setkey()
676 static int rfc3686_skcipher_setkey(struct crypto_skcipher *skcipher, in rfc3686_skcipher_setkey() argument
694 return skcipher_setkey(skcipher, key, keylen, ctx1_iv_off); in rfc3686_skcipher_setkey()
[all …]
Dcaamalg.c98 struct skcipher_alg skcipher; member
729 static int skcipher_setkey(struct crypto_skcipher *skcipher, const u8 *key, in skcipher_setkey() argument
732 struct caam_ctx *ctx = crypto_skcipher_ctx(skcipher); in skcipher_setkey()
734 container_of(crypto_skcipher_alg(skcipher), typeof(*alg), in skcipher_setkey()
735 skcipher); in skcipher_setkey()
737 unsigned int ivsize = crypto_skcipher_ivsize(skcipher); in skcipher_setkey()
765 static int aes_skcipher_setkey(struct crypto_skcipher *skcipher, in aes_skcipher_setkey() argument
774 return skcipher_setkey(skcipher, key, keylen, 0); in aes_skcipher_setkey()
777 static int rfc3686_skcipher_setkey(struct crypto_skcipher *skcipher, in rfc3686_skcipher_setkey() argument
795 return skcipher_setkey(skcipher, key, keylen, ctx1_iv_off); in rfc3686_skcipher_setkey()
[all …]
Dcaamalg_qi2.c58 struct skcipher_alg skcipher; member
937 static int skcipher_setkey(struct crypto_skcipher *skcipher, const u8 *key, in skcipher_setkey() argument
940 struct caam_ctx *ctx = crypto_skcipher_ctx(skcipher); in skcipher_setkey()
942 container_of(crypto_skcipher_alg(skcipher), in skcipher_setkey()
943 struct caam_skcipher_alg, skcipher); in skcipher_setkey()
946 unsigned int ivsize = crypto_skcipher_ivsize(skcipher); in skcipher_setkey()
980 static int aes_skcipher_setkey(struct crypto_skcipher *skcipher, in aes_skcipher_setkey() argument
989 return skcipher_setkey(skcipher, key, keylen, 0); in aes_skcipher_setkey()
992 static int rfc3686_skcipher_setkey(struct crypto_skcipher *skcipher, in rfc3686_skcipher_setkey() argument
1010 return skcipher_setkey(skcipher, key, keylen, ctx1_iv_off); in rfc3686_skcipher_setkey()
[all …]
/Linux-v5.10/drivers/crypto/amlogic/
Damlogic-gxl-core.c50 .alg.skcipher = {
76 .alg.skcipher = {
113 mc_algs[i].alg.skcipher.base.cra_driver_name, in meson_debugfs_show()
114 mc_algs[i].alg.skcipher.base.cra_name, in meson_debugfs_show()
186 err = crypto_register_skcipher(&mc_algs[i].alg.skcipher); in meson_register_algs()
189 mc_algs[i].alg.skcipher.base.cra_name); in meson_register_algs()
209 crypto_unregister_skcipher(&mc_algs[i].alg.skcipher); in meson_unregister_algs()
/Linux-v5.10/include/crypto/internal/
Dskcipher.h75 struct crypto_skcipher *skcipher) in skcipher_alg_instance() argument
77 return container_of(crypto_skcipher_alg(skcipher), in skcipher_alg_instance()
119 struct crypto_skcipher *skcipher, unsigned int reqsize) in crypto_skcipher_set_reqsize() argument
121 skcipher->reqsize = reqsize; in crypto_skcipher_set_reqsize()
/Linux-v5.10/drivers/crypto/allwinner/sun8i-ss/
Dsun8i-ss-core.c168 .alg.skcipher = {
195 .alg.skcipher = {
221 .alg.skcipher = {
248 .alg.skcipher = {
428 ss_algs[i].alg.skcipher.base.cra_driver_name, in sun8i_ss_debugfs_show()
429 ss_algs[i].alg.skcipher.base.cra_name, in sun8i_ss_debugfs_show()
575 ss_algs[i].alg.skcipher.base.cra_name); in sun8i_ss_register_algs()
583 ss_algs[i].alg.skcipher.base.cra_name); in sun8i_ss_register_algs()
588 ss_algs[i].alg.skcipher.base.cra_name); in sun8i_ss_register_algs()
589 err = crypto_register_skcipher(&ss_algs[i].alg.skcipher); in sun8i_ss_register_algs()
[all …]
/Linux-v5.10/drivers/crypto/allwinner/sun8i-ce/
Dsun8i-ce-core.c260 .alg.skcipher = {
287 .alg.skcipher = {
313 .alg.skcipher = {
340 .alg.skcipher = {
580 ce_algs[i].alg.skcipher.base.cra_driver_name, in sun8i_ce_debugfs_show()
581 ce_algs[i].alg.skcipher.base.cra_name, in sun8i_ce_debugfs_show()
782 ce_algs[i].alg.skcipher.base.cra_name); in sun8i_ce_register_algs()
790 ce_algs[i].alg.skcipher.base.cra_name); in sun8i_ce_register_algs()
795 ce_algs[i].alg.skcipher.base.cra_name); in sun8i_ce_register_algs()
796 err = crypto_register_skcipher(&ce_algs[i].alg.skcipher); in sun8i_ce_register_algs()
[all …]
/Linux-v5.10/drivers/crypto/rockchip/
Drk3288_crypto_skcipher.c383 algt = container_of(alg, struct rk_crypto_tmp, alg.skcipher); in rk_ablk_init_tfm()
405 .alg.skcipher = {
427 .alg.skcipher = {
450 .alg.skcipher = {
472 .alg.skcipher = {
495 .alg.skcipher = {
518 .alg.skcipher = {
/Linux-v5.10/drivers/crypto/ux500/cryp/
Dcryp_core.c1050 struct skcipher_alg skcipher; member
1059 skcipher); in cryp_init_tfm()
1070 .skcipher = {
1090 .skcipher = {
1111 .skcipher = {
1133 .skcipher = {
1153 .skcipher = {
1173 .skcipher = {
1194 .skcipher = {
1227 ret = crypto_register_skcipher(&cryp_algs[i].skcipher); in cryp_algs_register_all()
[all …]
/Linux-v5.10/arch/s390/crypto/
Daes_s390.c47 struct crypto_skcipher *skcipher; member
179 crypto_skcipher_clear_flags(sctx->fallback.skcipher, in setkey_fallback_skcipher()
181 crypto_skcipher_set_flags(sctx->fallback.skcipher, in setkey_fallback_skcipher()
184 return crypto_skcipher_setkey(sctx->fallback.skcipher, key, len); in setkey_fallback_skcipher()
194 skcipher_request_set_tfm(subreq, sctx->fallback.skcipher); in fallback_skcipher_crypt()
258 sctx->fallback.skcipher = crypto_alloc_skcipher(name, 0, in fallback_init_skcipher()
261 if (IS_ERR(sctx->fallback.skcipher)) { in fallback_init_skcipher()
264 return PTR_ERR(sctx->fallback.skcipher); in fallback_init_skcipher()
268 crypto_skcipher_reqsize(sctx->fallback.skcipher)); in fallback_init_skcipher()
276 crypto_free_skcipher(sctx->fallback.skcipher); in fallback_exit_skcipher()
/Linux-v5.10/drivers/crypto/marvell/cesa/
Dcipher.c215 memcpy(skreq->iv, basereq->chain.last->op->ctx.skcipher.iv, in mv_cesa_skcipher_complete()
475 memcpy(tmpl->ctx.skcipher.key, ctx->key, DES_KEY_SIZE); in mv_cesa_des_op()
529 memcpy(tmpl->ctx.skcipher.iv, req->iv, DES_BLOCK_SIZE); in mv_cesa_cbc_des_op()
582 memcpy(tmpl->ctx.skcipher.key, ctx->key, DES3_EDE_KEY_SIZE); in mv_cesa_des3_op()
636 memcpy(tmpl->ctx.skcipher.iv, req->iv, DES3_EDE_BLOCK_SIZE); in mv_cesa_cbc_des3_op()
703 tmpl->ctx.skcipher.key[i] = cpu_to_le32(key[i]); in mv_cesa_aes_op()
765 memcpy(tmpl->ctx.skcipher.iv, req->iv, AES_BLOCK_SIZE); in mv_cesa_cbc_aes_op()
/Linux-v5.10/drivers/crypto/qce/
DMakefile8 qcrypto-$(CONFIG_CRYPTO_DEV_QCE_SKCIPHER) += skcipher.o
Dcipher.h52 return container_of(alg, struct qce_alg_template, alg.skcipher); in to_cipher_tmpl()
Dskcipher.c67 struct crypto_skcipher *skcipher = crypto_skcipher_reqtfm(req); in qce_skcipher_async_req_handle() local
77 rctx->ivsize = crypto_skcipher_ivsize(skcipher); in qce_skcipher_async_req_handle()
391 alg = &tmpl->alg.skcipher; in qce_skcipher_register_one()
446 crypto_unregister_skcipher(&tmpl->alg.skcipher); in qce_skcipher_unregister()
/Linux-v5.10/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()
657 crypto_skcipher_ivsize(skcipher), in safexcel_handle_req_result()
659 crypto_skcipher_ivsize(skcipher))); in safexcel_handle_req_result()
675 struct crypto_skcipher *skcipher = crypto_skcipher_reqtfm(areq); in safexcel_send_req() local
716 crypto_skcipher_ivsize(skcipher), in safexcel_send_req()
718 crypto_skcipher_ivsize(skcipher))); in safexcel_send_req()
1032 struct crypto_skcipher *skcipher = crypto_skcipher_reqtfm(req); in safexcel_skcipher_send() local
1039 memcpy(input_iv, req->iv, crypto_skcipher_ivsize(skcipher)); in safexcel_skcipher_send()
1109 EIP197_REQUEST_ON_STACK(req, skcipher, EIP197_SKCIPHER_REQ_SIZE); in safexcel_skcipher_exit_inv()
[all …]

123