Home
last modified time | relevance | path

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

123

/openbmc/linux/crypto/
H A Dcbc.c18 struct crypto_skcipher *skcipher) in crypto_cbc_encrypt_segment() argument
20 unsigned int bsize = crypto_skcipher_blocksize(skcipher); in crypto_cbc_encrypt_segment()
29 cipher = skcipher_cipher_simple(skcipher); in crypto_cbc_encrypt_segment()
46 struct crypto_skcipher *skcipher) in crypto_cbc_encrypt_inplace() argument
48 unsigned int bsize = crypto_skcipher_blocksize(skcipher); in crypto_cbc_encrypt_inplace()
56 cipher = skcipher_cipher_simple(skcipher); in crypto_cbc_encrypt_inplace()
75 struct crypto_skcipher *skcipher = crypto_skcipher_reqtfm(req); in crypto_cbc_encrypt() local
83 err = crypto_cbc_encrypt_inplace(&walk, skcipher); in crypto_cbc_encrypt()
85 err = crypto_cbc_encrypt_segment(&walk, skcipher); in crypto_cbc_encrypt()
93 struct crypto_skcipher *skcipher) in crypto_cbc_decrypt_segment() argument
[all …]
H A Dskcipher.c683 struct crypto_skcipher *skcipher = __crypto_skcipher_cast(tfm); in crypto_skcipher_exit_tfm() local
684 struct skcipher_alg *alg = crypto_skcipher_alg(skcipher); in crypto_skcipher_exit_tfm()
686 alg->exit(skcipher); in crypto_skcipher_exit_tfm()
691 struct crypto_skcipher *skcipher = __crypto_skcipher_cast(tfm); in crypto_skcipher_init_tfm() local
692 struct skcipher_alg *alg = crypto_skcipher_alg(skcipher); in crypto_skcipher_init_tfm()
694 skcipher_set_needkey(skcipher); in crypto_skcipher_init_tfm()
697 skcipher->base.exit = crypto_skcipher_exit_tfm; in crypto_skcipher_init_tfm()
700 return alg->init(skcipher); in crypto_skcipher_init_tfm()
707 struct skcipher_instance *skcipher = in crypto_skcipher_free_instance() local
710 skcipher->free(skcipher); in crypto_skcipher_free_instance()
[all …]
H A 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 …]
/openbmc/linux/drivers/crypto/aspeed/
H A Daspeed-hace-crypto.c710 crypto_alg = container_of(alg, struct aspeed_hace_alg, alg.skcipher.base); in aspeed_crypto_cra_init()
741 .alg.skcipher.base = {
762 .alg.skcipher.op = {
767 .alg.skcipher.base = {
789 .alg.skcipher.op = {
794 .alg.skcipher.base = {
816 .alg.skcipher.op = {
821 .alg.skcipher.base = {
843 .alg.skcipher.op = {
848 .alg.skcipher.base = {
[all …]
/openbmc/linux/tools/testing/crypto/chacha20-s390/
H A 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()
/openbmc/linux/drivers/crypto/amlogic/
H A 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()
/openbmc/linux/include/crypto/internal/
H A Dskcipher.h84 struct crypto_skcipher *skcipher) in skcipher_alg_instance() argument
86 return container_of(crypto_skcipher_alg(skcipher), in skcipher_alg_instance()
128 struct crypto_skcipher *skcipher, unsigned int reqsize) in crypto_skcipher_set_reqsize() argument
130 skcipher->reqsize = reqsize; in crypto_skcipher_set_reqsize()
134 struct crypto_skcipher *skcipher, unsigned int reqsize) in crypto_skcipher_set_reqsize_dma() argument
137 skcipher->reqsize = reqsize; in crypto_skcipher_set_reqsize_dma()
/openbmc/linux/Documentation/crypto/
H A 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
H A Dapi.rst11 api-skcipher
/openbmc/linux/drivers/crypto/rockchip/
H A 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 …]
H A 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()
/openbmc/linux/drivers/crypto/caam/
H A 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 …]
H A 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 …]
H A 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 …]
/openbmc/linux/drivers/crypto/
H A 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()
H A Dn2_core.c713 struct skcipher_alg skcipher; member
720 return container_of(alg, struct n2_skcipher_alg, skcipher); in n2_skcipher_alg()
727 static int n2_aes_setkey(struct crypto_skcipher *skcipher, const u8 *key, in n2_aes_setkey() argument
730 struct crypto_tfm *tfm = crypto_skcipher_tfm(skcipher); in n2_aes_setkey()
732 struct n2_skcipher_alg *n2alg = n2_skcipher_alg(skcipher); in n2_aes_setkey()
755 static int n2_des_setkey(struct crypto_skcipher *skcipher, const u8 *key, in n2_des_setkey() argument
758 struct crypto_tfm *tfm = crypto_skcipher_tfm(skcipher); in n2_des_setkey()
760 struct n2_skcipher_alg *n2alg = n2_skcipher_alg(skcipher); in n2_des_setkey()
763 err = verify_skcipher_des_key(skcipher, key); in n2_des_setkey()
774 static int n2_3des_setkey(struct crypto_skcipher *skcipher, const u8 *key, in n2_3des_setkey() argument
[all …]
H A Dgeode-aes.h52 struct crypto_skcipher *skcipher; member
/openbmc/linux/drivers/crypto/allwinner/sun8i-ss/
H A 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 = {
494 ss_algs[i].alg.skcipher.base.base.cra_driver_name, in sun8i_ss_debugfs_show()
495 ss_algs[i].alg.skcipher.base.base.cra_name, in sun8i_ss_debugfs_show()
[all …]
/openbmc/linux/drivers/crypto/allwinner/sun8i-ce/
H A Dsun8i-ce-core.c283 .alg.skcipher.base = {
305 .alg.skcipher.op = {
313 .alg.skcipher.base = {
334 .alg.skcipher.op = {
342 .alg.skcipher.base = {
364 .alg.skcipher.op = {
372 .alg.skcipher.base = {
393 .alg.skcipher.op = {
638 ce_algs[i].alg.skcipher.base.base.cra_driver_name, in sun8i_ce_debugfs_show()
639 ce_algs[i].alg.skcipher.base.base.cra_name, in sun8i_ce_debugfs_show()
[all …]
/openbmc/linux/drivers/crypto/gemini/
H A 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()
/openbmc/linux/arch/s390/crypto/
H A Daes_s390.c48 struct crypto_skcipher *skcipher; member
180 crypto_skcipher_clear_flags(sctx->fallback.skcipher, in setkey_fallback_skcipher()
182 crypto_skcipher_set_flags(sctx->fallback.skcipher, in setkey_fallback_skcipher()
185 return crypto_skcipher_setkey(sctx->fallback.skcipher, key, len); in setkey_fallback_skcipher()
195 skcipher_request_set_tfm(subreq, sctx->fallback.skcipher); in fallback_skcipher_crypt()
259 sctx->fallback.skcipher = crypto_alloc_skcipher(name, 0, in fallback_init_skcipher()
262 if (IS_ERR(sctx->fallback.skcipher)) { in fallback_init_skcipher()
265 return PTR_ERR(sctx->fallback.skcipher); in fallback_init_skcipher()
269 crypto_skcipher_reqsize(sctx->fallback.skcipher)); in fallback_init_skcipher()
277 crypto_free_skcipher(sctx->fallback.skcipher); in fallback_exit_skcipher()
/openbmc/linux/drivers/crypto/marvell/cesa/
H A 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()
/openbmc/linux/drivers/crypto/inside-secure/
H A 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 …]
/openbmc/linux/drivers/crypto/qce/
H A DMakefile8 qcrypto-$(CONFIG_CRYPTO_DEV_QCE_SKCIPHER) += skcipher.o
H A Dcipher.h51 return container_of(alg, struct qce_alg_template, alg.skcipher); in to_cipher_tmpl()

123