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()
676 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(base->tfm); in safexcel_send_req()
902 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(base->tfm); in safexcel_handle_inv_result()
983 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in safexcel_aead_handle_result() local
994 req->cryptlen + crypto_aead_authsize(tfm), in safexcel_aead_handle_result()
1004 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(base->tfm); in safexcel_cipher_send_inv()
1022 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(req->base.tfm); in safexcel_skcipher_send()
1054 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in safexcel_aead_send() local
1055 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(req->base.tfm); in safexcel_aead_send()
1067 crypto_aead_authsize(tfm), req->iv, in safexcel_aead_send()
1073 static int safexcel_cipher_exit_inv(struct crypto_tfm *tfm, in safexcel_cipher_exit_inv() argument
1078 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_cipher_exit_inv()
1084 ctx = crypto_tfm_ctx(base->tfm); in safexcel_cipher_exit_inv()
1107 static int safexcel_skcipher_exit_inv(struct crypto_tfm *tfm) in safexcel_skcipher_exit_inv() argument
1117 skcipher_request_set_tfm(req, __crypto_skcipher_cast(tfm)); in safexcel_skcipher_exit_inv()
1119 return safexcel_cipher_exit_inv(tfm, &req->base, sreq, &result); in safexcel_skcipher_exit_inv()
1122 static int safexcel_aead_exit_inv(struct crypto_tfm *tfm) in safexcel_aead_exit_inv() argument
1132 aead_request_set_tfm(req, __crypto_aead_cast(tfm)); in safexcel_aead_exit_inv()
1134 return safexcel_cipher_exit_inv(tfm, &req->base, sreq, &result); in safexcel_aead_exit_inv()
1141 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(base->tfm); in safexcel_queue_req()
1186 static int safexcel_skcipher_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_cra_init() argument
1188 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_cra_init()
1190 container_of(tfm->__crt_alg, struct safexcel_alg_template, in safexcel_skcipher_cra_init()
1193 crypto_skcipher_set_reqsize(__crypto_skcipher_cast(tfm), in safexcel_skcipher_cra_init()
1205 static int safexcel_cipher_cra_exit(struct crypto_tfm *tfm) in safexcel_cipher_cra_exit() argument
1207 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_cipher_cra_exit()
1219 static void safexcel_skcipher_cra_exit(struct crypto_tfm *tfm) in safexcel_skcipher_cra_exit() argument
1221 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_cra_exit()
1225 if (safexcel_cipher_cra_exit(tfm)) in safexcel_skcipher_cra_exit()
1229 ret = safexcel_skcipher_exit_inv(tfm); in safexcel_skcipher_cra_exit()
1239 static void safexcel_aead_cra_exit(struct crypto_tfm *tfm) in safexcel_aead_cra_exit() argument
1241 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_cra_exit()
1245 if (safexcel_cipher_cra_exit(tfm)) in safexcel_aead_cra_exit()
1249 ret = safexcel_aead_exit_inv(tfm); in safexcel_aead_cra_exit()
1259 static int safexcel_skcipher_aes_ecb_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_aes_ecb_cra_init() argument
1261 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_aes_ecb_cra_init()
1263 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_aes_ecb_cra_init()
1297 static int safexcel_skcipher_aes_cbc_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_aes_cbc_cra_init() argument
1299 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_aes_cbc_cra_init()
1301 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_aes_cbc_cra_init()
1335 static int safexcel_skcipher_aes_cfb_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_aes_cfb_cra_init() argument
1337 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_aes_cfb_cra_init()
1339 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_aes_cfb_cra_init()
1373 static int safexcel_skcipher_aes_ofb_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_aes_ofb_cra_init() argument
1375 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_aes_ofb_cra_init()
1377 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_aes_ofb_cra_init()
1414 struct crypto_tfm *tfm = crypto_skcipher_tfm(ctfm); in safexcel_skcipher_aesctr_setkey() local
1415 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_aesctr_setkey()
1447 static int safexcel_skcipher_aes_ctr_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_aes_ctr_cra_init() argument
1449 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_aes_ctr_cra_init()
1451 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_aes_ctr_cra_init()
1508 static int safexcel_skcipher_des_cbc_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_des_cbc_cra_init() argument
1510 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_des_cbc_cra_init()
1512 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_des_cbc_cra_init()
1547 static int safexcel_skcipher_des_ecb_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_des_ecb_cra_init() argument
1549 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_des_ecb_cra_init()
1551 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_des_ecb_cra_init()
1607 static int safexcel_skcipher_des3_cbc_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_des3_cbc_cra_init() argument
1609 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_des3_cbc_cra_init()
1611 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_des3_cbc_cra_init()
1646 static int safexcel_skcipher_des3_ecb_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_des3_ecb_cra_init() argument
1648 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_des3_ecb_cra_init()
1650 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_des3_ecb_cra_init()
1698 static int safexcel_aead_cra_init(struct crypto_tfm *tfm) in safexcel_aead_cra_init() argument
1700 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_cra_init()
1702 container_of(tfm->__crt_alg, struct safexcel_alg_template, in safexcel_aead_cra_init()
1705 crypto_aead_set_reqsize(__crypto_aead_cast(tfm), in safexcel_aead_cra_init()
1721 static int safexcel_aead_sha1_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha1_cra_init() argument
1723 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha1_cra_init()
1725 safexcel_aead_cra_init(tfm); in safexcel_aead_sha1_cra_init()
1757 static int safexcel_aead_sha256_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha256_cra_init() argument
1759 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha256_cra_init()
1761 safexcel_aead_cra_init(tfm); in safexcel_aead_sha256_cra_init()
1793 static int safexcel_aead_sha224_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha224_cra_init() argument
1795 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha224_cra_init()
1797 safexcel_aead_cra_init(tfm); in safexcel_aead_sha224_cra_init()
1829 static int safexcel_aead_sha512_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha512_cra_init() argument
1831 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha512_cra_init()
1833 safexcel_aead_cra_init(tfm); in safexcel_aead_sha512_cra_init()
1865 static int safexcel_aead_sha384_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha384_cra_init() argument
1867 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha384_cra_init()
1869 safexcel_aead_cra_init(tfm); in safexcel_aead_sha384_cra_init()
1901 static int safexcel_aead_sha1_des3_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha1_des3_cra_init() argument
1903 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha1_des3_cra_init()
1905 safexcel_aead_sha1_cra_init(tfm); in safexcel_aead_sha1_des3_cra_init()
1938 static int safexcel_aead_sha256_des3_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha256_des3_cra_init() argument
1940 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha256_des3_cra_init()
1942 safexcel_aead_sha256_cra_init(tfm); in safexcel_aead_sha256_des3_cra_init()
1975 static int safexcel_aead_sha224_des3_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha224_des3_cra_init() argument
1977 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha224_des3_cra_init()
1979 safexcel_aead_sha224_cra_init(tfm); in safexcel_aead_sha224_des3_cra_init()
2012 static int safexcel_aead_sha512_des3_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha512_des3_cra_init() argument
2014 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha512_des3_cra_init()
2016 safexcel_aead_sha512_cra_init(tfm); in safexcel_aead_sha512_des3_cra_init()
2049 static int safexcel_aead_sha384_des3_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha384_des3_cra_init() argument
2051 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha384_des3_cra_init()
2053 safexcel_aead_sha384_cra_init(tfm); in safexcel_aead_sha384_des3_cra_init()
2086 static int safexcel_aead_sha1_des_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha1_des_cra_init() argument
2088 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha1_des_cra_init()
2090 safexcel_aead_sha1_cra_init(tfm); in safexcel_aead_sha1_des_cra_init()
2123 static int safexcel_aead_sha256_des_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha256_des_cra_init() argument
2125 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha256_des_cra_init()
2127 safexcel_aead_sha256_cra_init(tfm); in safexcel_aead_sha256_des_cra_init()
2160 static int safexcel_aead_sha224_des_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha224_des_cra_init() argument
2162 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha224_des_cra_init()
2164 safexcel_aead_sha224_cra_init(tfm); in safexcel_aead_sha224_des_cra_init()
2197 static int safexcel_aead_sha512_des_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha512_des_cra_init() argument
2199 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha512_des_cra_init()
2201 safexcel_aead_sha512_cra_init(tfm); in safexcel_aead_sha512_des_cra_init()
2234 static int safexcel_aead_sha384_des_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha384_des_cra_init() argument
2236 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha384_des_cra_init()
2238 safexcel_aead_sha384_cra_init(tfm); in safexcel_aead_sha384_des_cra_init()
2271 static int safexcel_aead_sha1_ctr_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha1_ctr_cra_init() argument
2273 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha1_ctr_cra_init()
2275 safexcel_aead_sha1_cra_init(tfm); in safexcel_aead_sha1_ctr_cra_init()
2306 static int safexcel_aead_sha256_ctr_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha256_ctr_cra_init() argument
2308 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha256_ctr_cra_init()
2310 safexcel_aead_sha256_cra_init(tfm); in safexcel_aead_sha256_ctr_cra_init()
2341 static int safexcel_aead_sha224_ctr_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha224_ctr_cra_init() argument
2343 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha224_ctr_cra_init()
2345 safexcel_aead_sha224_cra_init(tfm); in safexcel_aead_sha224_ctr_cra_init()
2376 static int safexcel_aead_sha512_ctr_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha512_ctr_cra_init() argument
2378 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha512_ctr_cra_init()
2380 safexcel_aead_sha512_cra_init(tfm); in safexcel_aead_sha512_ctr_cra_init()
2411 static int safexcel_aead_sha384_ctr_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha384_ctr_cra_init() argument
2413 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha384_ctr_cra_init()
2415 safexcel_aead_sha384_cra_init(tfm); in safexcel_aead_sha384_ctr_cra_init()
2449 struct crypto_tfm *tfm = crypto_skcipher_tfm(ctfm); in safexcel_skcipher_aesxts_setkey() local
2450 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_aesxts_setkey()
2504 static int safexcel_skcipher_aes_xts_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_aes_xts_cra_init() argument
2506 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_aes_xts_cra_init()
2508 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_aes_xts_cra_init()
2563 struct crypto_tfm *tfm = crypto_aead_tfm(ctfm); in safexcel_aead_gcm_setkey() local
2564 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_gcm_setkey()
2618 static int safexcel_aead_gcm_cra_init(struct crypto_tfm *tfm) in safexcel_aead_gcm_cra_init() argument
2620 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_gcm_cra_init()
2622 safexcel_aead_cra_init(tfm); in safexcel_aead_gcm_cra_init()
2632 static void safexcel_aead_gcm_cra_exit(struct crypto_tfm *tfm) in safexcel_aead_gcm_cra_exit() argument
2634 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_gcm_cra_exit()
2637 safexcel_aead_cra_exit(tfm); in safexcel_aead_gcm_cra_exit()
2640 static int safexcel_aead_gcm_setauthsize(struct crypto_aead *tfm, in safexcel_aead_gcm_setauthsize() argument
2676 struct crypto_tfm *tfm = crypto_aead_tfm(ctfm); in safexcel_aead_ccm_setkey() local
2677 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_ccm_setkey()
2717 static int safexcel_aead_ccm_cra_init(struct crypto_tfm *tfm) in safexcel_aead_ccm_cra_init() argument
2719 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_ccm_cra_init()
2721 safexcel_aead_cra_init(tfm); in safexcel_aead_ccm_cra_init()
2730 static int safexcel_aead_ccm_setauthsize(struct crypto_aead *tfm, in safexcel_aead_ccm_setauthsize() argument
2823 static int safexcel_skcipher_chacha20_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_chacha20_cra_init() argument
2825 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_chacha20_cra_init()
2827 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_chacha20_cra_init()
2880 static int safexcel_aead_chachapoly_setauthsize(struct crypto_aead *tfm, in safexcel_aead_chachapoly_setauthsize() argument
2893 struct crypto_tfm *tfm = crypto_aead_tfm(aead); in safexcel_aead_chachapoly_crypt() local
2894 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_chachapoly_crypt()
2951 static int safexcel_aead_fallback_cra_init(struct crypto_tfm *tfm) in safexcel_aead_fallback_cra_init() argument
2953 struct crypto_aead *aead = __crypto_aead_cast(tfm); in safexcel_aead_fallback_cra_init()
2955 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_fallback_cra_init()
2957 safexcel_aead_cra_init(tfm); in safexcel_aead_fallback_cra_init()
2973 static int safexcel_aead_chachapoly_cra_init(struct crypto_tfm *tfm) in safexcel_aead_chachapoly_cra_init() argument
2975 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_chachapoly_cra_init()
2977 safexcel_aead_fallback_cra_init(tfm); in safexcel_aead_chachapoly_cra_init()
2987 static void safexcel_aead_fallback_cra_exit(struct crypto_tfm *tfm) in safexcel_aead_fallback_cra_exit() argument
2989 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_fallback_cra_exit()
2992 safexcel_aead_cra_exit(tfm); in safexcel_aead_fallback_cra_exit()
3024 static int safexcel_aead_chachapolyesp_cra_init(struct crypto_tfm *tfm) in safexcel_aead_chachapolyesp_cra_init() argument
3026 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_chachapolyesp_cra_init()
3029 ret = safexcel_aead_chachapoly_cra_init(tfm); in safexcel_aead_chachapolyesp_cra_init()
3067 struct crypto_tfm *tfm = crypto_skcipher_tfm(ctfm); in safexcel_skcipher_sm4_setkey() local
3068 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_sm4_setkey()
3104 static int safexcel_skcipher_sm4_ecb_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_sm4_ecb_cra_init() argument
3106 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_sm4_ecb_cra_init()
3108 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_sm4_ecb_cra_init()
3142 static int safexcel_skcipher_sm4_cbc_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_sm4_cbc_cra_init() argument
3144 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_sm4_cbc_cra_init()
3146 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_sm4_cbc_cra_init()
3180 static int safexcel_skcipher_sm4_ofb_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_sm4_ofb_cra_init() argument
3182 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_sm4_ofb_cra_init()
3184 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_sm4_ofb_cra_init()
3218 static int safexcel_skcipher_sm4_cfb_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_sm4_cfb_cra_init() argument
3220 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_sm4_cfb_cra_init()
3222 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_sm4_cfb_cra_init()
3259 struct crypto_tfm *tfm = crypto_skcipher_tfm(ctfm); in safexcel_skcipher_sm4ctr_setkey() local
3260 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_sm4ctr_setkey()
3270 static int safexcel_skcipher_sm4_ctr_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_sm4_ctr_cra_init() argument
3272 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_sm4_ctr_cra_init()
3274 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_sm4_ctr_cra_init()
3321 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in safexcel_aead_sm4_blk_decrypt() local
3324 if ((req->cryptlen - crypto_aead_authsize(tfm)) & (SM4_BLOCK_SIZE - 1)) in safexcel_aead_sm4_blk_decrypt()
3331 static int safexcel_aead_sm4cbc_sha1_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sm4cbc_sha1_cra_init() argument
3333 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sm4cbc_sha1_cra_init()
3335 safexcel_aead_cra_init(tfm); in safexcel_aead_sm4cbc_sha1_cra_init()
3372 struct crypto_tfm *tfm = crypto_aead_tfm(ctfm); in safexcel_aead_fallback_setkey() local
3373 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_fallback_setkey()
3383 struct crypto_tfm *tfm = crypto_aead_tfm(ctfm); in safexcel_aead_fallback_setauthsize() local
3384 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_fallback_setauthsize()
3394 struct crypto_tfm *tfm = crypto_aead_tfm(aead); in safexcel_aead_fallback_crypt() local
3395 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_fallback_crypt()
3427 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in safexcel_aead_sm4cbc_sm3_decrypt() local
3430 if ((req->cryptlen - crypto_aead_authsize(tfm)) & (SM4_BLOCK_SIZE - 1)) in safexcel_aead_sm4cbc_sm3_decrypt()
3432 else if (req->cryptlen > crypto_aead_authsize(tfm) || req->assoclen) in safexcel_aead_sm4cbc_sm3_decrypt()
3440 static int safexcel_aead_sm4cbc_sm3_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sm4cbc_sm3_cra_init() argument
3442 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sm4cbc_sm3_cra_init()
3444 safexcel_aead_fallback_cra_init(tfm); in safexcel_aead_sm4cbc_sm3_cra_init()
3480 static int safexcel_aead_sm4ctr_sha1_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sm4ctr_sha1_cra_init() argument
3482 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sm4ctr_sha1_cra_init()
3484 safexcel_aead_sm4cbc_sha1_cra_init(tfm); in safexcel_aead_sm4ctr_sha1_cra_init()
3515 static int safexcel_aead_sm4ctr_sm3_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sm4ctr_sm3_cra_init() argument
3517 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sm4ctr_sm3_cra_init()
3519 safexcel_aead_sm4cbc_sm3_cra_init(tfm); in safexcel_aead_sm4ctr_sm3_cra_init()
3553 struct crypto_tfm *tfm = crypto_aead_tfm(ctfm); in safexcel_rfc4106_gcm_setkey() local
3554 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_rfc4106_gcm_setkey()
3563 static int safexcel_rfc4106_gcm_setauthsize(struct crypto_aead *tfm, in safexcel_rfc4106_gcm_setauthsize() argument
3581 static int safexcel_rfc4106_gcm_cra_init(struct crypto_tfm *tfm) in safexcel_rfc4106_gcm_cra_init() argument
3583 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_rfc4106_gcm_cra_init()
3586 ret = safexcel_aead_gcm_cra_init(tfm); in safexcel_rfc4106_gcm_cra_init()
3618 static int safexcel_rfc4543_gcm_setauthsize(struct crypto_aead *tfm, in safexcel_rfc4543_gcm_setauthsize() argument
3627 static int safexcel_rfc4543_gcm_cra_init(struct crypto_tfm *tfm) in safexcel_rfc4543_gcm_cra_init() argument
3629 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_rfc4543_gcm_cra_init()
3632 ret = safexcel_aead_gcm_cra_init(tfm); in safexcel_rfc4543_gcm_cra_init()
3666 struct crypto_tfm *tfm = crypto_aead_tfm(ctfm); in safexcel_rfc4309_ccm_setkey() local
3667 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_rfc4309_ccm_setkey()
3680 static int safexcel_rfc4309_ccm_setauthsize(struct crypto_aead *tfm, in safexcel_rfc4309_ccm_setauthsize() argument
3718 static int safexcel_rfc4309_ccm_cra_init(struct crypto_tfm *tfm) in safexcel_rfc4309_ccm_cra_init() argument
3720 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_rfc4309_ccm_cra_init()
3723 ret = safexcel_aead_ccm_cra_init(tfm); in safexcel_rfc4309_ccm_cra_init()