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()
1355 static int safexcel_skcipher_aes_cfb_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_aes_cfb_cra_init() argument
1357 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_aes_cfb_cra_init()
1359 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_aes_cfb_cra_init()
1393 static int safexcel_skcipher_aes_ofb_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_aes_ofb_cra_init() argument
1395 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_aes_ofb_cra_init()
1397 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_aes_ofb_cra_init()
1434 struct crypto_tfm *tfm = crypto_skcipher_tfm(ctfm); in safexcel_skcipher_aesctr_setkey() local
1435 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_aesctr_setkey()
1467 static int safexcel_skcipher_aes_ctr_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_aes_ctr_cra_init() argument
1469 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_aes_ctr_cra_init()
1471 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_aes_ctr_cra_init()
1528 static int safexcel_skcipher_des_cbc_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_des_cbc_cra_init() argument
1530 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_des_cbc_cra_init()
1532 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_des_cbc_cra_init()
1567 static int safexcel_skcipher_des_ecb_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_des_ecb_cra_init() argument
1569 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_des_ecb_cra_init()
1571 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_des_ecb_cra_init()
1627 static int safexcel_skcipher_des3_cbc_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_des3_cbc_cra_init() argument
1629 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_des3_cbc_cra_init()
1631 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_des3_cbc_cra_init()
1666 static int safexcel_skcipher_des3_ecb_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_des3_ecb_cra_init() argument
1668 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_des3_ecb_cra_init()
1670 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_des3_ecb_cra_init()
1718 static int safexcel_aead_cra_init(struct crypto_tfm *tfm) in safexcel_aead_cra_init() argument
1720 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_cra_init()
1722 container_of(tfm->__crt_alg, struct safexcel_alg_template, in safexcel_aead_cra_init()
1725 crypto_aead_set_reqsize(__crypto_aead_cast(tfm), in safexcel_aead_cra_init()
1741 static int safexcel_aead_sha1_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha1_cra_init() argument
1743 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha1_cra_init()
1745 safexcel_aead_cra_init(tfm); in safexcel_aead_sha1_cra_init()
1777 static int safexcel_aead_sha256_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha256_cra_init() argument
1779 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha256_cra_init()
1781 safexcel_aead_cra_init(tfm); in safexcel_aead_sha256_cra_init()
1813 static int safexcel_aead_sha224_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha224_cra_init() argument
1815 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha224_cra_init()
1817 safexcel_aead_cra_init(tfm); in safexcel_aead_sha224_cra_init()
1849 static int safexcel_aead_sha512_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha512_cra_init() argument
1851 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha512_cra_init()
1853 safexcel_aead_cra_init(tfm); in safexcel_aead_sha512_cra_init()
1885 static int safexcel_aead_sha384_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha384_cra_init() argument
1887 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha384_cra_init()
1889 safexcel_aead_cra_init(tfm); in safexcel_aead_sha384_cra_init()
1921 static int safexcel_aead_sha1_des3_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha1_des3_cra_init() argument
1923 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha1_des3_cra_init()
1925 safexcel_aead_sha1_cra_init(tfm); in safexcel_aead_sha1_des3_cra_init()
1958 static int safexcel_aead_sha256_des3_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha256_des3_cra_init() argument
1960 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha256_des3_cra_init()
1962 safexcel_aead_sha256_cra_init(tfm); in safexcel_aead_sha256_des3_cra_init()
1995 static int safexcel_aead_sha224_des3_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha224_des3_cra_init() argument
1997 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha224_des3_cra_init()
1999 safexcel_aead_sha224_cra_init(tfm); in safexcel_aead_sha224_des3_cra_init()
2032 static int safexcel_aead_sha512_des3_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha512_des3_cra_init() argument
2034 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha512_des3_cra_init()
2036 safexcel_aead_sha512_cra_init(tfm); in safexcel_aead_sha512_des3_cra_init()
2069 static int safexcel_aead_sha384_des3_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha384_des3_cra_init() argument
2071 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha384_des3_cra_init()
2073 safexcel_aead_sha384_cra_init(tfm); in safexcel_aead_sha384_des3_cra_init()
2106 static int safexcel_aead_sha1_des_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha1_des_cra_init() argument
2108 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha1_des_cra_init()
2110 safexcel_aead_sha1_cra_init(tfm); in safexcel_aead_sha1_des_cra_init()
2143 static int safexcel_aead_sha256_des_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha256_des_cra_init() argument
2145 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha256_des_cra_init()
2147 safexcel_aead_sha256_cra_init(tfm); in safexcel_aead_sha256_des_cra_init()
2180 static int safexcel_aead_sha224_des_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha224_des_cra_init() argument
2182 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha224_des_cra_init()
2184 safexcel_aead_sha224_cra_init(tfm); in safexcel_aead_sha224_des_cra_init()
2217 static int safexcel_aead_sha512_des_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha512_des_cra_init() argument
2219 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha512_des_cra_init()
2221 safexcel_aead_sha512_cra_init(tfm); in safexcel_aead_sha512_des_cra_init()
2254 static int safexcel_aead_sha384_des_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha384_des_cra_init() argument
2256 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha384_des_cra_init()
2258 safexcel_aead_sha384_cra_init(tfm); in safexcel_aead_sha384_des_cra_init()
2291 static int safexcel_aead_sha1_ctr_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha1_ctr_cra_init() argument
2293 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha1_ctr_cra_init()
2295 safexcel_aead_sha1_cra_init(tfm); in safexcel_aead_sha1_ctr_cra_init()
2326 static int safexcel_aead_sha256_ctr_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha256_ctr_cra_init() argument
2328 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha256_ctr_cra_init()
2330 safexcel_aead_sha256_cra_init(tfm); in safexcel_aead_sha256_ctr_cra_init()
2361 static int safexcel_aead_sha224_ctr_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha224_ctr_cra_init() argument
2363 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha224_ctr_cra_init()
2365 safexcel_aead_sha224_cra_init(tfm); in safexcel_aead_sha224_ctr_cra_init()
2396 static int safexcel_aead_sha512_ctr_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha512_ctr_cra_init() argument
2398 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha512_ctr_cra_init()
2400 safexcel_aead_sha512_cra_init(tfm); in safexcel_aead_sha512_ctr_cra_init()
2431 static int safexcel_aead_sha384_ctr_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha384_ctr_cra_init() argument
2433 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha384_ctr_cra_init()
2435 safexcel_aead_sha384_cra_init(tfm); in safexcel_aead_sha384_ctr_cra_init()
2469 struct crypto_tfm *tfm = crypto_skcipher_tfm(ctfm); in safexcel_skcipher_aesxts_setkey() local
2470 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_aesxts_setkey()
2524 static int safexcel_skcipher_aes_xts_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_aes_xts_cra_init() argument
2526 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_aes_xts_cra_init()
2528 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_aes_xts_cra_init()
2583 struct crypto_tfm *tfm = crypto_aead_tfm(ctfm); in safexcel_aead_gcm_setkey() local
2584 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_gcm_setkey()
2631 static int safexcel_aead_gcm_cra_init(struct crypto_tfm *tfm) in safexcel_aead_gcm_cra_init() argument
2633 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_gcm_cra_init()
2635 safexcel_aead_cra_init(tfm); in safexcel_aead_gcm_cra_init()
2644 static void safexcel_aead_gcm_cra_exit(struct crypto_tfm *tfm) in safexcel_aead_gcm_cra_exit() argument
2646 safexcel_aead_cra_exit(tfm); in safexcel_aead_gcm_cra_exit()
2649 static int safexcel_aead_gcm_setauthsize(struct crypto_aead *tfm, in safexcel_aead_gcm_setauthsize() argument
2685 struct crypto_tfm *tfm = crypto_aead_tfm(ctfm); in safexcel_aead_ccm_setkey() local
2686 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_ccm_setkey()
2726 static int safexcel_aead_ccm_cra_init(struct crypto_tfm *tfm) in safexcel_aead_ccm_cra_init() argument
2728 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_ccm_cra_init()
2730 safexcel_aead_cra_init(tfm); in safexcel_aead_ccm_cra_init()
2739 static int safexcel_aead_ccm_setauthsize(struct crypto_aead *tfm, in safexcel_aead_ccm_setauthsize() argument
2832 static int safexcel_skcipher_chacha20_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_chacha20_cra_init() argument
2834 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_chacha20_cra_init()
2836 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_chacha20_cra_init()
2889 static int safexcel_aead_chachapoly_setauthsize(struct crypto_aead *tfm, in safexcel_aead_chachapoly_setauthsize() argument
2902 struct crypto_tfm *tfm = crypto_aead_tfm(aead); in safexcel_aead_chachapoly_crypt() local
2903 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_chachapoly_crypt()
2960 static int safexcel_aead_fallback_cra_init(struct crypto_tfm *tfm) in safexcel_aead_fallback_cra_init() argument
2962 struct crypto_aead *aead = __crypto_aead_cast(tfm); in safexcel_aead_fallback_cra_init()
2964 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_fallback_cra_init()
2966 safexcel_aead_cra_init(tfm); in safexcel_aead_fallback_cra_init()
2982 static int safexcel_aead_chachapoly_cra_init(struct crypto_tfm *tfm) in safexcel_aead_chachapoly_cra_init() argument
2984 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_chachapoly_cra_init()
2986 safexcel_aead_fallback_cra_init(tfm); in safexcel_aead_chachapoly_cra_init()
2996 static void safexcel_aead_fallback_cra_exit(struct crypto_tfm *tfm) in safexcel_aead_fallback_cra_exit() argument
2998 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_fallback_cra_exit()
3001 safexcel_aead_cra_exit(tfm); in safexcel_aead_fallback_cra_exit()
3033 static int safexcel_aead_chachapolyesp_cra_init(struct crypto_tfm *tfm) in safexcel_aead_chachapolyesp_cra_init() argument
3035 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_chachapolyesp_cra_init()
3038 ret = safexcel_aead_chachapoly_cra_init(tfm); in safexcel_aead_chachapolyesp_cra_init()
3076 struct crypto_tfm *tfm = crypto_skcipher_tfm(ctfm); in safexcel_skcipher_sm4_setkey() local
3077 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_sm4_setkey()
3113 static int safexcel_skcipher_sm4_ecb_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_sm4_ecb_cra_init() argument
3115 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_sm4_ecb_cra_init()
3117 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_sm4_ecb_cra_init()
3151 static int safexcel_skcipher_sm4_cbc_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_sm4_cbc_cra_init() argument
3153 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_sm4_cbc_cra_init()
3155 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_sm4_cbc_cra_init()
3189 static int safexcel_skcipher_sm4_ofb_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_sm4_ofb_cra_init() argument
3191 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_sm4_ofb_cra_init()
3193 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_sm4_ofb_cra_init()
3227 static int safexcel_skcipher_sm4_cfb_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_sm4_cfb_cra_init() argument
3229 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_sm4_cfb_cra_init()
3231 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_sm4_cfb_cra_init()
3268 struct crypto_tfm *tfm = crypto_skcipher_tfm(ctfm); in safexcel_skcipher_sm4ctr_setkey() local
3269 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_sm4ctr_setkey()
3279 static int safexcel_skcipher_sm4_ctr_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_sm4_ctr_cra_init() argument
3281 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_sm4_ctr_cra_init()
3283 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_sm4_ctr_cra_init()
3330 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in safexcel_aead_sm4_blk_decrypt() local
3333 if ((req->cryptlen - crypto_aead_authsize(tfm)) & (SM4_BLOCK_SIZE - 1)) in safexcel_aead_sm4_blk_decrypt()
3340 static int safexcel_aead_sm4cbc_sha1_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sm4cbc_sha1_cra_init() argument
3342 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sm4cbc_sha1_cra_init()
3344 safexcel_aead_cra_init(tfm); in safexcel_aead_sm4cbc_sha1_cra_init()
3381 struct crypto_tfm *tfm = crypto_aead_tfm(ctfm); in safexcel_aead_fallback_setkey() local
3382 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_fallback_setkey()
3392 struct crypto_tfm *tfm = crypto_aead_tfm(ctfm); in safexcel_aead_fallback_setauthsize() local
3393 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_fallback_setauthsize()
3403 struct crypto_tfm *tfm = crypto_aead_tfm(aead); in safexcel_aead_fallback_crypt() local
3404 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_fallback_crypt()
3436 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in safexcel_aead_sm4cbc_sm3_decrypt() local
3439 if ((req->cryptlen - crypto_aead_authsize(tfm)) & (SM4_BLOCK_SIZE - 1)) in safexcel_aead_sm4cbc_sm3_decrypt()
3441 else if (req->cryptlen > crypto_aead_authsize(tfm) || req->assoclen) in safexcel_aead_sm4cbc_sm3_decrypt()
3449 static int safexcel_aead_sm4cbc_sm3_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sm4cbc_sm3_cra_init() argument
3451 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sm4cbc_sm3_cra_init()
3453 safexcel_aead_fallback_cra_init(tfm); in safexcel_aead_sm4cbc_sm3_cra_init()
3489 static int safexcel_aead_sm4ctr_sha1_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sm4ctr_sha1_cra_init() argument
3491 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sm4ctr_sha1_cra_init()
3493 safexcel_aead_sm4cbc_sha1_cra_init(tfm); in safexcel_aead_sm4ctr_sha1_cra_init()
3524 static int safexcel_aead_sm4ctr_sm3_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sm4ctr_sm3_cra_init() argument
3526 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sm4ctr_sm3_cra_init()
3528 safexcel_aead_sm4cbc_sm3_cra_init(tfm); in safexcel_aead_sm4ctr_sm3_cra_init()
3562 struct crypto_tfm *tfm = crypto_aead_tfm(ctfm); in safexcel_rfc4106_gcm_setkey() local
3563 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_rfc4106_gcm_setkey()
3572 static int safexcel_rfc4106_gcm_setauthsize(struct crypto_aead *tfm, in safexcel_rfc4106_gcm_setauthsize() argument
3590 static int safexcel_rfc4106_gcm_cra_init(struct crypto_tfm *tfm) in safexcel_rfc4106_gcm_cra_init() argument
3592 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_rfc4106_gcm_cra_init()
3595 ret = safexcel_aead_gcm_cra_init(tfm); in safexcel_rfc4106_gcm_cra_init()
3627 static int safexcel_rfc4543_gcm_setauthsize(struct crypto_aead *tfm, in safexcel_rfc4543_gcm_setauthsize() argument
3636 static int safexcel_rfc4543_gcm_cra_init(struct crypto_tfm *tfm) in safexcel_rfc4543_gcm_cra_init() argument
3638 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_rfc4543_gcm_cra_init()
3641 ret = safexcel_aead_gcm_cra_init(tfm); in safexcel_rfc4543_gcm_cra_init()
3675 struct crypto_tfm *tfm = crypto_aead_tfm(ctfm); in safexcel_rfc4309_ccm_setkey() local
3676 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_rfc4309_ccm_setkey()
3689 static int safexcel_rfc4309_ccm_setauthsize(struct crypto_aead *tfm, in safexcel_rfc4309_ccm_setauthsize() argument
3727 static int safexcel_rfc4309_ccm_cra_init(struct crypto_tfm *tfm) in safexcel_rfc4309_ccm_cra_init() argument
3729 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_rfc4309_ccm_cra_init()
3732 ret = safexcel_aead_ccm_cra_init(tfm); in safexcel_rfc4309_ccm_cra_init()