Home
last modified time | relevance | path

Searched refs:tfm (Results 1 – 25 of 160) sorted by relevance

1234567

/drivers/crypto/inside-secure/
Dsafexcel_cipher.c375 struct crypto_tfm *tfm = crypto_skcipher_tfm(ctfm); in safexcel_skcipher_aes_setkey() local
376 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_aes_setkey()
406 struct crypto_tfm *tfm = crypto_aead_tfm(ctfm); in safexcel_aead_setkey() local
407 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_setkey()
677 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(base->tfm); in safexcel_send_req()
903 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(base->tfm); in safexcel_handle_inv_result()
984 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in safexcel_aead_handle_result() local
995 req->cryptlen + crypto_aead_authsize(tfm), in safexcel_aead_handle_result()
1005 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(base->tfm); in safexcel_cipher_send_inv()
1023 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(req->base.tfm); in safexcel_skcipher_send()
[all …]
Dsafexcel_hash.c622 static int safexcel_ahash_exit_inv(struct crypto_tfm *tfm) in safexcel_ahash_exit_inv() argument
624 struct safexcel_ahash_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_ahash_exit_inv()
638 ahash_request_set_tfm(req, __crypto_ahash_cast(tfm)); in safexcel_ahash_exit_inv()
639 ctx = crypto_tfm_ctx(req->base.tfm); in safexcel_ahash_exit_inv()
918 static int safexcel_ahash_cra_init(struct crypto_tfm *tfm) in safexcel_ahash_cra_init() argument
920 struct safexcel_ahash_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_ahash_cra_init()
922 container_of(__crypto_ahash_alg(tfm->__crt_alg), in safexcel_ahash_cra_init()
930 crypto_ahash_set_reqsize(__crypto_ahash_cast(tfm), in safexcel_ahash_cra_init()
961 static void safexcel_ahash_cra_exit(struct crypto_tfm *tfm) in safexcel_ahash_cra_exit() argument
963 struct safexcel_ahash_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_ahash_cra_exit()
[all …]
/drivers/crypto/allwinner/sun4i-ss/
Dsun4i-ss-cipher.c17 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in sun4i_ss_opti_poll() local
18 struct sun4i_tfm_ctx *op = crypto_skcipher_ctx(tfm); in sun4i_ss_opti_poll()
20 unsigned int ivsize = crypto_skcipher_ivsize(tfm); in sun4i_ss_opti_poll()
39 struct skcipher_alg *alg = crypto_skcipher_alg(tfm); in sun4i_ss_opti_poll()
153 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in sun4i_ss_cipher_poll_fallback() local
154 struct sun4i_tfm_ctx *op = crypto_skcipher_ctx(tfm); in sun4i_ss_cipher_poll_fallback()
157 struct skcipher_alg *alg = crypto_skcipher_alg(tfm); in sun4i_ss_cipher_poll_fallback()
181 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in sun4i_ss_cipher_poll() local
182 struct sun4i_tfm_ctx *op = crypto_skcipher_ctx(tfm); in sun4i_ss_cipher_poll()
187 unsigned int ivsize = crypto_skcipher_ivsize(tfm); in sun4i_ss_cipher_poll()
[all …]
/drivers/crypto/rockchip/
Drk3288_crypto_ahash.c40 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); in rk_ahash_digest_fb() local
41 struct rk_ahash_ctx *tfmctx = crypto_ahash_ctx(tfm); in rk_ahash_digest_fb()
56 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in zero_message_process() local
57 int rk_digest_size = crypto_ahash_digestsize(tfm); in zero_message_process()
79 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in rk_ahash_reg_init() local
80 struct rk_ahash_ctx *tctx = crypto_ahash_ctx(tfm); in rk_ahash_reg_init()
114 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in rk_ahash_init() local
115 struct rk_ahash_ctx *ctx = crypto_ahash_ctx(tfm); in rk_ahash_init()
127 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in rk_ahash_update() local
128 struct rk_ahash_ctx *ctx = crypto_ahash_ctx(tfm); in rk_ahash_update()
[all …]
Drk3288_crypto_skcipher.c19 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in rk_cipher_need_fallback() local
20 unsigned int bs = crypto_skcipher_blocksize(tfm); in rk_cipher_need_fallback()
57 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in rk_cipher_fallback() local
58 struct rk_cipher_ctx *op = crypto_skcipher_ctx(tfm); in rk_cipher_fallback()
88 struct crypto_tfm *tfm = crypto_skcipher_tfm(cipher); in rk_aes_setkey() local
89 struct rk_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in rk_aes_setkey()
134 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in rk_aes_ecb_encrypt() local
135 struct rk_cipher_ctx *ctx = crypto_skcipher_ctx(tfm); in rk_aes_ecb_encrypt()
145 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in rk_aes_ecb_decrypt() local
146 struct rk_cipher_ctx *ctx = crypto_skcipher_ctx(tfm); in rk_aes_ecb_decrypt()
[all …]
/drivers/crypto/
Dixp4xx_crypto.c144 struct crypto_tfm *tfm; member
248 static inline u32 cipher_cfg_enc(struct crypto_tfm *tfm) in cipher_cfg_enc() argument
250 return container_of(tfm->__crt_alg, struct ixp_alg, crypto.base)->cfg_enc; in cipher_cfg_enc()
253 static inline u32 cipher_cfg_dec(struct crypto_tfm *tfm) in cipher_cfg_dec() argument
255 return container_of(tfm->__crt_alg, struct ixp_alg, crypto.base)->cfg_dec; in cipher_cfg_dec()
258 static inline const struct ix_hash_algo *ix_hash(struct crypto_tfm *tfm) in ix_hash() argument
260 return container_of(tfm->__crt_alg, struct ixp_alg, crypto.base)->hash; in ix_hash()
354 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in finish_scattered_hmac() local
355 int authsize = crypto_aead_authsize(tfm); in finish_scattered_hmac()
392 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in one_packet() local
[all …]
Dgeode-aes.c110 static int geode_setkey_cip(struct crypto_tfm *tfm, const u8 *key, in geode_setkey_cip() argument
113 struct geode_aes_tfm_ctx *tctx = crypto_tfm_ctx(tfm); in geode_setkey_cip()
131 (tfm->crt_flags & CRYPTO_TFM_REQ_MASK); in geode_setkey_cip()
136 static int geode_setkey_skcipher(struct crypto_skcipher *tfm, const u8 *key, in geode_setkey_skcipher() argument
139 struct geode_aes_tfm_ctx *tctx = crypto_skcipher_ctx(tfm); in geode_setkey_skcipher()
158 crypto_skcipher_get_flags(tfm) & in geode_setkey_skcipher()
164 geode_encrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) in geode_encrypt() argument
166 const struct geode_aes_tfm_ctx *tctx = crypto_tfm_ctx(tfm); in geode_encrypt()
179 geode_decrypt(struct crypto_tfm *tfm, u8 *out, const u8 *in) in geode_decrypt() argument
181 const struct geode_aes_tfm_ctx *tctx = crypto_tfm_ctx(tfm); in geode_decrypt()
[all …]
/drivers/crypto/cavium/zip/
Dzip_crypto.h60 int zip_alloc_comp_ctx_deflate(struct crypto_tfm *tfm);
61 int zip_alloc_comp_ctx_lzs(struct crypto_tfm *tfm);
62 void zip_free_comp_ctx(struct crypto_tfm *tfm);
63 int zip_comp_compress(struct crypto_tfm *tfm,
66 int zip_comp_decompress(struct crypto_tfm *tfm,
70 void *zip_alloc_scomp_ctx_deflate(struct crypto_scomp *tfm);
71 void *zip_alloc_scomp_ctx_lzs(struct crypto_scomp *tfm);
72 void zip_free_scomp_ctx(struct crypto_scomp *tfm, void *zip_ctx);
73 int zip_scomp_compress(struct crypto_scomp *tfm,
76 int zip_scomp_decompress(struct crypto_scomp *tfm,
Dzip_crypto.c199 int zip_alloc_comp_ctx_deflate(struct crypto_tfm *tfm) in zip_alloc_comp_ctx_deflate() argument
202 struct zip_kernel_ctx *zip_ctx = crypto_tfm_ctx(tfm); in zip_alloc_comp_ctx_deflate()
209 int zip_alloc_comp_ctx_lzs(struct crypto_tfm *tfm) in zip_alloc_comp_ctx_lzs() argument
212 struct zip_kernel_ctx *zip_ctx = crypto_tfm_ctx(tfm); in zip_alloc_comp_ctx_lzs()
219 void zip_free_comp_ctx(struct crypto_tfm *tfm) in zip_free_comp_ctx() argument
221 struct zip_kernel_ctx *zip_ctx = crypto_tfm_ctx(tfm); in zip_free_comp_ctx()
226 int zip_comp_compress(struct crypto_tfm *tfm, in zip_comp_compress() argument
231 struct zip_kernel_ctx *zip_ctx = crypto_tfm_ctx(tfm); in zip_comp_compress()
238 int zip_comp_decompress(struct crypto_tfm *tfm, in zip_comp_decompress() argument
243 struct zip_kernel_ctx *zip_ctx = crypto_tfm_ctx(tfm); in zip_comp_decompress()
[all …]
/drivers/crypto/allwinner/sun8i-ce/
Dsun8i-ce-cipher.c26 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in sun8i_ce_cipher_need_fallback() local
32 if (areq->cryptlen < crypto_skcipher_ivsize(tfm)) in sun8i_ce_cipher_need_fallback()
55 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in sun8i_ce_cipher_fallback() local
56 struct sun8i_cipher_tfm_ctx *op = crypto_skcipher_ctx(tfm); in sun8i_ce_cipher_fallback()
60 struct skcipher_alg *alg = crypto_skcipher_alg(tfm); in sun8i_ce_cipher_fallback()
82 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in sun8i_ce_cipher_prepare() local
83 struct sun8i_cipher_tfm_ctx *op = crypto_skcipher_ctx(tfm); in sun8i_ce_cipher_prepare()
86 struct skcipher_alg *alg = crypto_skcipher_alg(tfm); in sun8i_ce_cipher_prepare()
101 crypto_tfm_alg_name(areq->base.tfm), in sun8i_ce_cipher_prepare()
103 rctx->op_dir, areq->iv, crypto_skcipher_ivsize(tfm), in sun8i_ce_cipher_prepare()
[all …]
Dsun8i-ce-hash.c22 int sun8i_ce_hash_crainit(struct crypto_tfm *tfm) in sun8i_ce_hash_crainit() argument
24 struct sun8i_ce_hash_tfm_ctx *op = crypto_tfm_ctx(tfm); in sun8i_ce_hash_crainit()
25 struct ahash_alg *alg = __crypto_ahash_alg(tfm->__crt_alg); in sun8i_ce_hash_crainit()
39 op->fallback_tfm = crypto_alloc_ahash(crypto_tfm_alg_name(tfm), 0, in sun8i_ce_hash_crainit()
49 crypto_ahash_set_reqsize(__crypto_ahash_cast(tfm), in sun8i_ce_hash_crainit()
54 crypto_tfm_alg_driver_name(tfm), in sun8i_ce_hash_crainit()
66 void sun8i_ce_hash_craexit(struct crypto_tfm *tfm) in sun8i_ce_hash_craexit() argument
68 struct sun8i_ce_hash_tfm_ctx *tfmctx = crypto_tfm_ctx(tfm); in sun8i_ce_hash_craexit()
77 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); in sun8i_ce_hash_init() local
78 struct sun8i_ce_hash_tfm_ctx *tfmctx = crypto_ahash_ctx(tfm); in sun8i_ce_hash_init()
[all …]
/drivers/crypto/vmx/
Daes.c28 static int p8_aes_init(struct crypto_tfm *tfm) in p8_aes_init() argument
30 const char *alg = crypto_tfm_alg_name(tfm); in p8_aes_init()
32 struct p8_aes_ctx *ctx = crypto_tfm_ctx(tfm); in p8_aes_init()
45 tfm)); in p8_aes_init()
51 static void p8_aes_exit(struct crypto_tfm *tfm) in p8_aes_exit() argument
53 struct p8_aes_ctx *ctx = crypto_tfm_ctx(tfm); in p8_aes_exit()
61 static int p8_aes_setkey(struct crypto_tfm *tfm, const u8 *key, in p8_aes_setkey() argument
65 struct p8_aes_ctx *ctx = crypto_tfm_ctx(tfm); in p8_aes_setkey()
81 static void p8_aes_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) in p8_aes_encrypt() argument
83 struct p8_aes_ctx *ctx = crypto_tfm_ctx(tfm); in p8_aes_encrypt()
[all …]
Daes_cbc.c24 static int p8_aes_cbc_init(struct crypto_skcipher *tfm) in p8_aes_cbc_init() argument
26 struct p8_aes_cbc_ctx *ctx = crypto_skcipher_ctx(tfm); in p8_aes_cbc_init()
38 crypto_skcipher_set_reqsize(tfm, sizeof(struct skcipher_request) + in p8_aes_cbc_init()
44 static void p8_aes_cbc_exit(struct crypto_skcipher *tfm) in p8_aes_cbc_exit() argument
46 struct p8_aes_cbc_ctx *ctx = crypto_skcipher_ctx(tfm); in p8_aes_cbc_exit()
51 static int p8_aes_cbc_setkey(struct crypto_skcipher *tfm, const u8 *key, in p8_aes_cbc_setkey() argument
54 struct p8_aes_cbc_ctx *ctx = crypto_skcipher_ctx(tfm); in p8_aes_cbc_setkey()
73 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in p8_aes_cbc_crypt() local
74 const struct p8_aes_cbc_ctx *ctx = crypto_skcipher_ctx(tfm); in p8_aes_cbc_crypt()
Daes_xts.c26 static int p8_aes_xts_init(struct crypto_skcipher *tfm) in p8_aes_xts_init() argument
28 struct p8_aes_xts_ctx *ctx = crypto_skcipher_ctx(tfm); in p8_aes_xts_init()
40 crypto_skcipher_set_reqsize(tfm, sizeof(struct skcipher_request) + in p8_aes_xts_init()
46 static void p8_aes_xts_exit(struct crypto_skcipher *tfm) in p8_aes_xts_exit() argument
48 struct p8_aes_xts_ctx *ctx = crypto_skcipher_ctx(tfm); in p8_aes_xts_exit()
53 static int p8_aes_xts_setkey(struct crypto_skcipher *tfm, const u8 *key, in p8_aes_xts_setkey() argument
56 struct p8_aes_xts_ctx *ctx = crypto_skcipher_ctx(tfm); in p8_aes_xts_setkey()
59 ret = xts_verify_key(tfm, key, keylen); in p8_aes_xts_setkey()
80 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in p8_aes_xts_crypt() local
81 const struct p8_aes_xts_ctx *ctx = crypto_skcipher_ctx(tfm); in p8_aes_xts_crypt()
/drivers/block/
Dcryptoloop.c36 struct crypto_sync_skcipher *tfm; in cryptoloop_init() local
71 tfm = crypto_alloc_sync_skcipher(cms, 0, 0); in cryptoloop_init()
72 if (IS_ERR(tfm)) in cryptoloop_init()
73 return PTR_ERR(tfm); in cryptoloop_init()
75 err = crypto_sync_skcipher_setkey(tfm, info->lo_encrypt_key, in cryptoloop_init()
81 lo->key_data = tfm; in cryptoloop_init()
85 crypto_free_sync_skcipher(tfm); in cryptoloop_init()
100 struct crypto_sync_skcipher *tfm = lo->key_data; in cryptoloop_transfer() local
101 SYNC_SKCIPHER_REQUEST_ON_STACK(req, tfm); in cryptoloop_transfer()
110 skcipher_request_set_sync_tfm(req, tfm); in cryptoloop_transfer()
[all …]
/drivers/crypto/gemini/
Dsl3516-ce-cipher.c23 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in sl3516_ce_need_fallback() local
24 struct sl3516_ce_cipher_tfm_ctx *op = crypto_skcipher_ctx(tfm); in sl3516_ce_need_fallback()
101 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in sl3516_ce_cipher_fallback() local
102 struct sl3516_ce_cipher_tfm_ctx *op = crypto_skcipher_ctx(tfm); in sl3516_ce_cipher_fallback()
104 struct skcipher_alg *alg = crypto_skcipher_alg(tfm); in sl3516_ce_cipher_fallback()
125 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in sl3516_ce_cipher() local
126 struct sl3516_ce_cipher_tfm_ctx *op = crypto_skcipher_ctx(tfm); in sl3516_ce_cipher()
129 struct skcipher_alg *alg = crypto_skcipher_alg(tfm); in sl3516_ce_cipher()
142 crypto_tfm_alg_name(areq->base.tfm), in sl3516_ce_cipher()
144 rctx->op_dir, areq->iv, crypto_skcipher_ivsize(tfm), in sl3516_ce_cipher()
[all …]
/drivers/crypto/allwinner/sun8i-ss/
Dsun8i-ss-cipher.c72 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in sun8i_ss_cipher_fallback() local
73 struct sun8i_cipher_tfm_ctx *op = crypto_skcipher_ctx(tfm); in sun8i_ss_cipher_fallback()
78 struct skcipher_alg *alg = crypto_skcipher_alg(tfm); in sun8i_ss_cipher_fallback()
98 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in sun8i_ss_setup_ivs() local
99 struct sun8i_cipher_tfm_ctx *op = crypto_skcipher_ctx(tfm); in sun8i_ss_setup_ivs()
105 unsigned int ivsize = crypto_skcipher_ivsize(tfm); in sun8i_ss_setup_ivs()
161 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in sun8i_ss_cipher() local
162 struct sun8i_cipher_tfm_ctx *op = crypto_skcipher_ctx(tfm); in sun8i_ss_cipher()
165 struct skcipher_alg *alg = crypto_skcipher_alg(tfm); in sun8i_ss_cipher()
178 crypto_tfm_alg_name(areq->base.tfm), in sun8i_ss_cipher()
[all …]
Dsun8i-ss-hash.c22 int sun8i_ss_hash_crainit(struct crypto_tfm *tfm) in sun8i_ss_hash_crainit() argument
24 struct sun8i_ss_hash_tfm_ctx *op = crypto_tfm_ctx(tfm); in sun8i_ss_hash_crainit()
25 struct ahash_alg *alg = __crypto_ahash_alg(tfm->__crt_alg); in sun8i_ss_hash_crainit()
39 op->fallback_tfm = crypto_alloc_ahash(crypto_tfm_alg_name(tfm), 0, in sun8i_ss_hash_crainit()
49 crypto_ahash_set_reqsize(__crypto_ahash_cast(tfm), in sun8i_ss_hash_crainit()
54 crypto_tfm_alg_driver_name(tfm), in sun8i_ss_hash_crainit()
66 void sun8i_ss_hash_craexit(struct crypto_tfm *tfm) in sun8i_ss_hash_craexit() argument
68 struct sun8i_ss_hash_tfm_ctx *tfmctx = crypto_tfm_ctx(tfm); in sun8i_ss_hash_craexit()
77 struct crypto_ahash *tfm = crypto_ahash_reqtfm(areq); in sun8i_ss_hash_init() local
78 struct sun8i_ss_hash_tfm_ctx *tfmctx = crypto_ahash_ctx(tfm); in sun8i_ss_hash_init()
[all …]
/drivers/crypto/amlogic/
Damlogic-gxl-cipher.c60 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in meson_cipher_do_fallback() local
61 struct meson_cipher_tfm_ctx *op = crypto_skcipher_ctx(tfm); in meson_cipher_do_fallback()
65 struct skcipher_alg *alg = crypto_skcipher_alg(tfm); in meson_cipher_do_fallback()
86 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in meson_cipher() local
87 struct meson_cipher_tfm_ctx *op = crypto_skcipher_ctx(tfm); in meson_cipher()
90 struct skcipher_alg *alg = crypto_skcipher_alg(tfm); in meson_cipher()
107 crypto_tfm_alg_name(areq->base.tfm), in meson_cipher()
109 rctx->op_dir, crypto_skcipher_ivsize(tfm), in meson_cipher()
129 ivsize = crypto_skcipher_ivsize(tfm); in meson_cipher()
277 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); in meson_skdecrypt() local
[all …]
/drivers/crypto/marvell/octeontx/
Dotx_cptvf_algs.c102 struct crypto_aead *tfm; in validate_hmac_cipher_null() local
105 tfm = crypto_aead_reqtfm(req); in validate_hmac_cipher_null()
109 crypto_aead_authsize(tfm)) != 0) in validate_hmac_cipher_null()
238 struct crypto_tfm *tfm = crypto_skcipher_tfm(stfm); in create_ctx_hdr() local
239 struct otx_cpt_enc_ctx *ctx = crypto_tfm_ctx(tfm); in create_ctx_hdr()
393 static int otx_cpt_skcipher_xts_setkey(struct crypto_skcipher *tfm, in otx_cpt_skcipher_xts_setkey() argument
396 struct otx_cpt_enc_ctx *ctx = crypto_skcipher_ctx(tfm); in otx_cpt_skcipher_xts_setkey()
401 ret = xts_check_key(crypto_skcipher_tfm(tfm), key, keylen); in otx_cpt_skcipher_xts_setkey()
422 static int cpt_des_setkey(struct crypto_skcipher *tfm, const u8 *key, in cpt_des_setkey() argument
425 struct otx_cpt_enc_ctx *ctx = crypto_skcipher_ctx(tfm); in cpt_des_setkey()
[all …]
/drivers/crypto/chelsio/
Dchcr_algo.c174 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in chcr_verify_tag() local
175 int authsize = crypto_aead_authsize(tfm); in chcr_verify_tag()
180 if ((get_aead_subtype(tfm) == CRYPTO_ALG_SUB_TYPE_AEAD_RFC4106) || in chcr_verify_tag()
181 (get_aead_subtype(tfm) == CRYPTO_ALG_SUB_TYPE_AEAD_GCM)) { in chcr_verify_tag()
214 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in chcr_handle_aead_resp() local
215 struct chcr_dev *dev = a_ctx(tfm)->dev; in chcr_handle_aead_resp()
364 static inline int is_hmac(struct crypto_tfm *tfm) in is_hmac() argument
366 struct crypto_alg *alg = tfm->__crt_alg; in is_hmac()
566 static inline int get_cryptoalg_subtype(struct crypto_skcipher *tfm) in get_cryptoalg_subtype() argument
568 struct skcipher_alg *alg = crypto_skcipher_alg(tfm); in get_cryptoalg_subtype()
[all …]
/drivers/crypto/ccp/
Dccp-crypto-aes.c25 struct ccp_ctx *ctx = crypto_tfm_ctx(req->base.tfm); in ccp_aes_complete()
37 static int ccp_aes_setkey(struct crypto_skcipher *tfm, const u8 *key, in ccp_aes_setkey() argument
40 struct ccp_crypto_skcipher_alg *alg = ccp_crypto_skcipher_alg(tfm); in ccp_aes_setkey()
41 struct ccp_ctx *ctx = crypto_skcipher_ctx(tfm); in ccp_aes_setkey()
67 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in ccp_aes_crypt() local
68 struct ccp_ctx *ctx = crypto_skcipher_ctx(tfm); in ccp_aes_crypt()
122 static int ccp_aes_init_tfm(struct crypto_skcipher *tfm) in ccp_aes_init_tfm() argument
124 struct ccp_ctx *ctx = crypto_skcipher_ctx(tfm); in ccp_aes_init_tfm()
129 crypto_skcipher_set_reqsize(tfm, sizeof(struct ccp_aes_req_ctx)); in ccp_aes_init_tfm()
146 static int ccp_aes_rfc3686_setkey(struct crypto_skcipher *tfm, const u8 *key, in ccp_aes_rfc3686_setkey() argument
[all …]
/drivers/crypto/hisilicon/sec/
Dsec_algs.c147 struct crypto_tfm *tfm = crypto_skcipher_tfm(atfm); in sec_alg_skcipher_init_context() local
148 struct sec_alg_tfm_ctx *ctx = crypto_tfm_ctx(tfm); in sec_alg_skcipher_init_context()
227 static int sec_alg_skcipher_setkey(struct crypto_skcipher *tfm, in sec_alg_skcipher_setkey() argument
231 struct sec_alg_tfm_ctx *ctx = crypto_skcipher_ctx(tfm); in sec_alg_skcipher_setkey()
248 sec_alg_skcipher_init_context(tfm, key, keylen, alg); in sec_alg_skcipher_setkey()
253 static int sec_alg_skcipher_setkey_aes_ecb(struct crypto_skcipher *tfm, in sec_alg_skcipher_setkey_aes_ecb() argument
272 return sec_alg_skcipher_setkey(tfm, key, keylen, alg); in sec_alg_skcipher_setkey_aes_ecb()
275 static int sec_alg_skcipher_setkey_aes_cbc(struct crypto_skcipher *tfm, in sec_alg_skcipher_setkey_aes_cbc() argument
294 return sec_alg_skcipher_setkey(tfm, key, keylen, alg); in sec_alg_skcipher_setkey_aes_cbc()
297 static int sec_alg_skcipher_setkey_aes_ctr(struct crypto_skcipher *tfm, in sec_alg_skcipher_setkey_aes_ctr() argument
[all …]
/drivers/crypto/marvell/octeontx2/
Dotx2_cptvf_algs.c86 struct crypto_aead *tfm; in validate_hmac_cipher_null() local
89 tfm = crypto_aead_reqtfm(req); in validate_hmac_cipher_null()
93 crypto_aead_authsize(tfm)) != 0) in validate_hmac_cipher_null()
407 static int otx2_cpt_skcipher_xts_setkey(struct crypto_skcipher *tfm, in otx2_cpt_skcipher_xts_setkey() argument
410 struct otx2_cpt_enc_ctx *ctx = crypto_skcipher_ctx(tfm); in otx2_cpt_skcipher_xts_setkey()
415 ret = xts_check_key(crypto_skcipher_tfm(tfm), key, keylen); in otx2_cpt_skcipher_xts_setkey()
439 static int cpt_des_setkey(struct crypto_skcipher *tfm, const u8 *key, in cpt_des_setkey() argument
442 struct otx2_cpt_enc_ctx *ctx = crypto_skcipher_ctx(tfm); in cpt_des_setkey()
456 static int cpt_aes_setkey(struct crypto_skcipher *tfm, const u8 *key, in cpt_aes_setkey() argument
459 struct otx2_cpt_enc_ctx *ctx = crypto_skcipher_ctx(tfm); in cpt_aes_setkey()
[all …]
/drivers/crypto/caam/
Dcaampkc.c59 struct crypto_akcipher *tfm = crypto_akcipher_reqtfm(req); in rsa_pub_unmap() local
60 struct caam_rsa_ctx *ctx = akcipher_tfm_ctx(tfm); in rsa_pub_unmap()
71 struct crypto_akcipher *tfm = crypto_akcipher_reqtfm(req); in rsa_priv_f1_unmap() local
72 struct caam_rsa_ctx *ctx = akcipher_tfm_ctx(tfm); in rsa_priv_f1_unmap()
83 struct crypto_akcipher *tfm = crypto_akcipher_reqtfm(req); in rsa_priv_f2_unmap() local
84 struct caam_rsa_ctx *ctx = akcipher_tfm_ctx(tfm); in rsa_priv_f2_unmap()
100 struct crypto_akcipher *tfm = crypto_akcipher_reqtfm(req); in rsa_priv_f3_unmap() local
101 struct caam_rsa_ctx *ctx = akcipher_tfm_ctx(tfm); in rsa_priv_f3_unmap()
150 struct crypto_akcipher *tfm = crypto_akcipher_reqtfm(req); in rsa_priv_f_done() local
152 struct caam_rsa_ctx *ctx = akcipher_tfm_ctx(tfm); in rsa_priv_f_done()
[all …]

1234567