Lines Matching refs:tfm
374 struct crypto_tfm *tfm = crypto_skcipher_tfm(ctfm); in safexcel_skcipher_aes_setkey() local
375 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_aes_setkey()
405 struct crypto_tfm *tfm = crypto_aead_tfm(ctfm); in safexcel_aead_setkey() local
406 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_setkey()
682 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(base->tfm); in safexcel_send_req()
923 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(base->tfm); in safexcel_handle_inv_result()
1004 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in safexcel_aead_handle_result() local
1015 req->cryptlen + crypto_aead_authsize(tfm), in safexcel_aead_handle_result()
1025 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(base->tfm); in safexcel_cipher_send_inv()
1043 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(req->base.tfm); in safexcel_skcipher_send()
1075 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in safexcel_aead_send() local
1076 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(req->base.tfm); in safexcel_aead_send()
1088 crypto_aead_authsize(tfm), req->iv, in safexcel_aead_send()
1094 static int safexcel_cipher_exit_inv(struct crypto_tfm *tfm, in safexcel_cipher_exit_inv() argument
1099 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_cipher_exit_inv()
1104 ctx = crypto_tfm_ctx(base->tfm); in safexcel_cipher_exit_inv()
1127 static int safexcel_skcipher_exit_inv(struct crypto_tfm *tfm) in safexcel_skcipher_exit_inv() argument
1137 skcipher_request_set_tfm(req, __crypto_skcipher_cast(tfm)); in safexcel_skcipher_exit_inv()
1139 return safexcel_cipher_exit_inv(tfm, &req->base, sreq, &result); in safexcel_skcipher_exit_inv()
1142 static int safexcel_aead_exit_inv(struct crypto_tfm *tfm) in safexcel_aead_exit_inv() argument
1152 aead_request_set_tfm(req, __crypto_aead_cast(tfm)); in safexcel_aead_exit_inv()
1154 return safexcel_cipher_exit_inv(tfm, &req->base, sreq, &result); in safexcel_aead_exit_inv()
1161 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(base->tfm); in safexcel_queue_req()
1206 static int safexcel_skcipher_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_cra_init() argument
1208 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_cra_init()
1210 container_of(tfm->__crt_alg, struct safexcel_alg_template, in safexcel_skcipher_cra_init()
1213 crypto_skcipher_set_reqsize(__crypto_skcipher_cast(tfm), in safexcel_skcipher_cra_init()
1225 static int safexcel_cipher_cra_exit(struct crypto_tfm *tfm) in safexcel_cipher_cra_exit() argument
1227 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_cipher_cra_exit()
1239 static void safexcel_skcipher_cra_exit(struct crypto_tfm *tfm) in safexcel_skcipher_cra_exit() argument
1241 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_cra_exit()
1245 if (safexcel_cipher_cra_exit(tfm)) in safexcel_skcipher_cra_exit()
1249 ret = safexcel_skcipher_exit_inv(tfm); in safexcel_skcipher_cra_exit()
1259 static void safexcel_aead_cra_exit(struct crypto_tfm *tfm) in safexcel_aead_cra_exit() argument
1261 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_cra_exit()
1265 if (safexcel_cipher_cra_exit(tfm)) in safexcel_aead_cra_exit()
1269 ret = safexcel_aead_exit_inv(tfm); in safexcel_aead_cra_exit()
1279 static int safexcel_skcipher_aes_ecb_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_aes_ecb_cra_init() argument
1281 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_aes_ecb_cra_init()
1283 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_aes_ecb_cra_init()
1317 static int safexcel_skcipher_aes_cbc_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_aes_cbc_cra_init() argument
1319 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_aes_cbc_cra_init()
1321 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_aes_cbc_cra_init()
1358 struct crypto_tfm *tfm = crypto_skcipher_tfm(ctfm); in safexcel_skcipher_aesctr_setkey() local
1359 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_aesctr_setkey()
1391 static int safexcel_skcipher_aes_ctr_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_aes_ctr_cra_init() argument
1393 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_aes_ctr_cra_init()
1395 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_aes_ctr_cra_init()
1452 static int safexcel_skcipher_des_cbc_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_des_cbc_cra_init() argument
1454 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_des_cbc_cra_init()
1456 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_des_cbc_cra_init()
1491 static int safexcel_skcipher_des_ecb_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_des_ecb_cra_init() argument
1493 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_des_ecb_cra_init()
1495 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_des_ecb_cra_init()
1551 static int safexcel_skcipher_des3_cbc_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_des3_cbc_cra_init() argument
1553 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_des3_cbc_cra_init()
1555 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_des3_cbc_cra_init()
1590 static int safexcel_skcipher_des3_ecb_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_des3_ecb_cra_init() argument
1592 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_des3_ecb_cra_init()
1594 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_des3_ecb_cra_init()
1642 static int safexcel_aead_cra_init(struct crypto_tfm *tfm) in safexcel_aead_cra_init() argument
1644 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_cra_init()
1646 container_of(tfm->__crt_alg, struct safexcel_alg_template, in safexcel_aead_cra_init()
1649 crypto_aead_set_reqsize(__crypto_aead_cast(tfm), in safexcel_aead_cra_init()
1665 static int safexcel_aead_sha1_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha1_cra_init() argument
1667 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha1_cra_init()
1669 safexcel_aead_cra_init(tfm); in safexcel_aead_sha1_cra_init()
1701 static int safexcel_aead_sha256_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha256_cra_init() argument
1703 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha256_cra_init()
1705 safexcel_aead_cra_init(tfm); in safexcel_aead_sha256_cra_init()
1737 static int safexcel_aead_sha224_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha224_cra_init() argument
1739 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha224_cra_init()
1741 safexcel_aead_cra_init(tfm); in safexcel_aead_sha224_cra_init()
1773 static int safexcel_aead_sha512_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha512_cra_init() argument
1775 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha512_cra_init()
1777 safexcel_aead_cra_init(tfm); in safexcel_aead_sha512_cra_init()
1809 static int safexcel_aead_sha384_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha384_cra_init() argument
1811 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha384_cra_init()
1813 safexcel_aead_cra_init(tfm); in safexcel_aead_sha384_cra_init()
1845 static int safexcel_aead_sha1_des3_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha1_des3_cra_init() argument
1847 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha1_des3_cra_init()
1849 safexcel_aead_sha1_cra_init(tfm); in safexcel_aead_sha1_des3_cra_init()
1882 static int safexcel_aead_sha256_des3_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha256_des3_cra_init() argument
1884 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha256_des3_cra_init()
1886 safexcel_aead_sha256_cra_init(tfm); in safexcel_aead_sha256_des3_cra_init()
1919 static int safexcel_aead_sha224_des3_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha224_des3_cra_init() argument
1921 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha224_des3_cra_init()
1923 safexcel_aead_sha224_cra_init(tfm); in safexcel_aead_sha224_des3_cra_init()
1956 static int safexcel_aead_sha512_des3_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha512_des3_cra_init() argument
1958 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha512_des3_cra_init()
1960 safexcel_aead_sha512_cra_init(tfm); in safexcel_aead_sha512_des3_cra_init()
1993 static int safexcel_aead_sha384_des3_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha384_des3_cra_init() argument
1995 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha384_des3_cra_init()
1997 safexcel_aead_sha384_cra_init(tfm); in safexcel_aead_sha384_des3_cra_init()
2030 static int safexcel_aead_sha1_des_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha1_des_cra_init() argument
2032 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha1_des_cra_init()
2034 safexcel_aead_sha1_cra_init(tfm); in safexcel_aead_sha1_des_cra_init()
2067 static int safexcel_aead_sha256_des_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha256_des_cra_init() argument
2069 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha256_des_cra_init()
2071 safexcel_aead_sha256_cra_init(tfm); in safexcel_aead_sha256_des_cra_init()
2104 static int safexcel_aead_sha224_des_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha224_des_cra_init() argument
2106 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha224_des_cra_init()
2108 safexcel_aead_sha224_cra_init(tfm); in safexcel_aead_sha224_des_cra_init()
2141 static int safexcel_aead_sha512_des_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha512_des_cra_init() argument
2143 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha512_des_cra_init()
2145 safexcel_aead_sha512_cra_init(tfm); in safexcel_aead_sha512_des_cra_init()
2178 static int safexcel_aead_sha384_des_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha384_des_cra_init() argument
2180 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha384_des_cra_init()
2182 safexcel_aead_sha384_cra_init(tfm); in safexcel_aead_sha384_des_cra_init()
2215 static int safexcel_aead_sha1_ctr_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha1_ctr_cra_init() argument
2217 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha1_ctr_cra_init()
2219 safexcel_aead_sha1_cra_init(tfm); in safexcel_aead_sha1_ctr_cra_init()
2250 static int safexcel_aead_sha256_ctr_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha256_ctr_cra_init() argument
2252 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha256_ctr_cra_init()
2254 safexcel_aead_sha256_cra_init(tfm); in safexcel_aead_sha256_ctr_cra_init()
2285 static int safexcel_aead_sha224_ctr_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha224_ctr_cra_init() argument
2287 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha224_ctr_cra_init()
2289 safexcel_aead_sha224_cra_init(tfm); in safexcel_aead_sha224_ctr_cra_init()
2320 static int safexcel_aead_sha512_ctr_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha512_ctr_cra_init() argument
2322 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha512_ctr_cra_init()
2324 safexcel_aead_sha512_cra_init(tfm); in safexcel_aead_sha512_ctr_cra_init()
2355 static int safexcel_aead_sha384_ctr_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha384_ctr_cra_init() argument
2357 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha384_ctr_cra_init()
2359 safexcel_aead_sha384_cra_init(tfm); in safexcel_aead_sha384_ctr_cra_init()
2393 struct crypto_tfm *tfm = crypto_skcipher_tfm(ctfm); in safexcel_skcipher_aesxts_setkey() local
2394 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_aesxts_setkey()
2448 static int safexcel_skcipher_aes_xts_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_aes_xts_cra_init() argument
2450 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_aes_xts_cra_init()
2452 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_aes_xts_cra_init()
2507 struct crypto_tfm *tfm = crypto_aead_tfm(ctfm); in safexcel_aead_gcm_setkey() local
2508 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_gcm_setkey()
2555 static int safexcel_aead_gcm_cra_init(struct crypto_tfm *tfm) in safexcel_aead_gcm_cra_init() argument
2557 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_gcm_cra_init()
2559 safexcel_aead_cra_init(tfm); in safexcel_aead_gcm_cra_init()
2568 static void safexcel_aead_gcm_cra_exit(struct crypto_tfm *tfm) in safexcel_aead_gcm_cra_exit() argument
2570 safexcel_aead_cra_exit(tfm); in safexcel_aead_gcm_cra_exit()
2573 static int safexcel_aead_gcm_setauthsize(struct crypto_aead *tfm, in safexcel_aead_gcm_setauthsize() argument
2609 struct crypto_tfm *tfm = crypto_aead_tfm(ctfm); in safexcel_aead_ccm_setkey() local
2610 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_ccm_setkey()
2650 static int safexcel_aead_ccm_cra_init(struct crypto_tfm *tfm) in safexcel_aead_ccm_cra_init() argument
2652 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_ccm_cra_init()
2654 safexcel_aead_cra_init(tfm); in safexcel_aead_ccm_cra_init()
2663 static int safexcel_aead_ccm_setauthsize(struct crypto_aead *tfm, in safexcel_aead_ccm_setauthsize() argument
2756 static int safexcel_skcipher_chacha20_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_chacha20_cra_init() argument
2758 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_chacha20_cra_init()
2760 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_chacha20_cra_init()
2813 static int safexcel_aead_chachapoly_setauthsize(struct crypto_aead *tfm, in safexcel_aead_chachapoly_setauthsize() argument
2826 struct crypto_tfm *tfm = crypto_aead_tfm(aead); in safexcel_aead_chachapoly_crypt() local
2827 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_chachapoly_crypt()
2884 static int safexcel_aead_fallback_cra_init(struct crypto_tfm *tfm) in safexcel_aead_fallback_cra_init() argument
2886 struct crypto_aead *aead = __crypto_aead_cast(tfm); in safexcel_aead_fallback_cra_init()
2888 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_fallback_cra_init()
2890 safexcel_aead_cra_init(tfm); in safexcel_aead_fallback_cra_init()
2906 static int safexcel_aead_chachapoly_cra_init(struct crypto_tfm *tfm) in safexcel_aead_chachapoly_cra_init() argument
2908 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_chachapoly_cra_init()
2910 safexcel_aead_fallback_cra_init(tfm); in safexcel_aead_chachapoly_cra_init()
2920 static void safexcel_aead_fallback_cra_exit(struct crypto_tfm *tfm) in safexcel_aead_fallback_cra_exit() argument
2922 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_fallback_cra_exit()
2925 safexcel_aead_cra_exit(tfm); in safexcel_aead_fallback_cra_exit()
2957 static int safexcel_aead_chachapolyesp_cra_init(struct crypto_tfm *tfm) in safexcel_aead_chachapolyesp_cra_init() argument
2959 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_chachapolyesp_cra_init()
2962 ret = safexcel_aead_chachapoly_cra_init(tfm); in safexcel_aead_chachapolyesp_cra_init()
3000 struct crypto_tfm *tfm = crypto_skcipher_tfm(ctfm); in safexcel_skcipher_sm4_setkey() local
3001 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_sm4_setkey()
3037 static int safexcel_skcipher_sm4_ecb_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_sm4_ecb_cra_init() argument
3039 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_sm4_ecb_cra_init()
3041 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_sm4_ecb_cra_init()
3075 static int safexcel_skcipher_sm4_cbc_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_sm4_cbc_cra_init() argument
3077 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_sm4_cbc_cra_init()
3079 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_sm4_cbc_cra_init()
3116 struct crypto_tfm *tfm = crypto_skcipher_tfm(ctfm); in safexcel_skcipher_sm4ctr_setkey() local
3117 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_sm4ctr_setkey()
3127 static int safexcel_skcipher_sm4_ctr_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_sm4_ctr_cra_init() argument
3129 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_sm4_ctr_cra_init()
3131 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_sm4_ctr_cra_init()
3178 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in safexcel_aead_sm4_blk_decrypt() local
3181 if ((req->cryptlen - crypto_aead_authsize(tfm)) & (SM4_BLOCK_SIZE - 1)) in safexcel_aead_sm4_blk_decrypt()
3188 static int safexcel_aead_sm4cbc_sha1_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sm4cbc_sha1_cra_init() argument
3190 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sm4cbc_sha1_cra_init()
3192 safexcel_aead_cra_init(tfm); in safexcel_aead_sm4cbc_sha1_cra_init()
3229 struct crypto_tfm *tfm = crypto_aead_tfm(ctfm); in safexcel_aead_fallback_setkey() local
3230 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_fallback_setkey()
3240 struct crypto_tfm *tfm = crypto_aead_tfm(ctfm); in safexcel_aead_fallback_setauthsize() local
3241 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_fallback_setauthsize()
3251 struct crypto_tfm *tfm = crypto_aead_tfm(aead); in safexcel_aead_fallback_crypt() local
3252 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_fallback_crypt()
3284 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in safexcel_aead_sm4cbc_sm3_decrypt() local
3287 if ((req->cryptlen - crypto_aead_authsize(tfm)) & (SM4_BLOCK_SIZE - 1)) in safexcel_aead_sm4cbc_sm3_decrypt()
3289 else if (req->cryptlen > crypto_aead_authsize(tfm) || req->assoclen) in safexcel_aead_sm4cbc_sm3_decrypt()
3297 static int safexcel_aead_sm4cbc_sm3_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sm4cbc_sm3_cra_init() argument
3299 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sm4cbc_sm3_cra_init()
3301 safexcel_aead_fallback_cra_init(tfm); in safexcel_aead_sm4cbc_sm3_cra_init()
3337 static int safexcel_aead_sm4ctr_sha1_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sm4ctr_sha1_cra_init() argument
3339 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sm4ctr_sha1_cra_init()
3341 safexcel_aead_sm4cbc_sha1_cra_init(tfm); in safexcel_aead_sm4ctr_sha1_cra_init()
3372 static int safexcel_aead_sm4ctr_sm3_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sm4ctr_sm3_cra_init() argument
3374 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sm4ctr_sm3_cra_init()
3376 safexcel_aead_sm4cbc_sm3_cra_init(tfm); in safexcel_aead_sm4ctr_sm3_cra_init()
3410 struct crypto_tfm *tfm = crypto_aead_tfm(ctfm); in safexcel_rfc4106_gcm_setkey() local
3411 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_rfc4106_gcm_setkey()
3420 static int safexcel_rfc4106_gcm_setauthsize(struct crypto_aead *tfm, in safexcel_rfc4106_gcm_setauthsize() argument
3438 static int safexcel_rfc4106_gcm_cra_init(struct crypto_tfm *tfm) in safexcel_rfc4106_gcm_cra_init() argument
3440 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_rfc4106_gcm_cra_init()
3443 ret = safexcel_aead_gcm_cra_init(tfm); in safexcel_rfc4106_gcm_cra_init()
3475 static int safexcel_rfc4543_gcm_setauthsize(struct crypto_aead *tfm, in safexcel_rfc4543_gcm_setauthsize() argument
3484 static int safexcel_rfc4543_gcm_cra_init(struct crypto_tfm *tfm) in safexcel_rfc4543_gcm_cra_init() argument
3486 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_rfc4543_gcm_cra_init()
3489 ret = safexcel_aead_gcm_cra_init(tfm); in safexcel_rfc4543_gcm_cra_init()
3523 struct crypto_tfm *tfm = crypto_aead_tfm(ctfm); in safexcel_rfc4309_ccm_setkey() local
3524 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_rfc4309_ccm_setkey()
3537 static int safexcel_rfc4309_ccm_setauthsize(struct crypto_aead *tfm, in safexcel_rfc4309_ccm_setauthsize() argument
3575 static int safexcel_rfc4309_ccm_cra_init(struct crypto_tfm *tfm) in safexcel_rfc4309_ccm_cra_init() argument
3577 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_rfc4309_ccm_cra_init()
3580 ret = safexcel_aead_ccm_cra_init(tfm); in safexcel_rfc4309_ccm_cra_init()