Lines Matching refs:tfm
375 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()
1055 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in safexcel_aead_send() local
1056 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(req->base.tfm); in safexcel_aead_send()
1068 crypto_aead_authsize(tfm), req->iv, in safexcel_aead_send()
1074 static int safexcel_cipher_exit_inv(struct crypto_tfm *tfm, in safexcel_cipher_exit_inv() argument
1079 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_cipher_exit_inv()
1085 ctx = crypto_tfm_ctx(base->tfm); in safexcel_cipher_exit_inv()
1108 static int safexcel_skcipher_exit_inv(struct crypto_tfm *tfm) in safexcel_skcipher_exit_inv() argument
1118 skcipher_request_set_tfm(req, __crypto_skcipher_cast(tfm)); in safexcel_skcipher_exit_inv()
1120 return safexcel_cipher_exit_inv(tfm, &req->base, sreq, &result); in safexcel_skcipher_exit_inv()
1123 static int safexcel_aead_exit_inv(struct crypto_tfm *tfm) in safexcel_aead_exit_inv() argument
1133 aead_request_set_tfm(req, __crypto_aead_cast(tfm)); in safexcel_aead_exit_inv()
1135 return safexcel_cipher_exit_inv(tfm, &req->base, sreq, &result); in safexcel_aead_exit_inv()
1142 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(base->tfm); in safexcel_queue_req()
1187 static int safexcel_skcipher_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_cra_init() argument
1189 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_cra_init()
1191 container_of(tfm->__crt_alg, struct safexcel_alg_template, in safexcel_skcipher_cra_init()
1194 crypto_skcipher_set_reqsize(__crypto_skcipher_cast(tfm), in safexcel_skcipher_cra_init()
1206 static int safexcel_cipher_cra_exit(struct crypto_tfm *tfm) in safexcel_cipher_cra_exit() argument
1208 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_cipher_cra_exit()
1220 static void safexcel_skcipher_cra_exit(struct crypto_tfm *tfm) in safexcel_skcipher_cra_exit() argument
1222 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_cra_exit()
1226 if (safexcel_cipher_cra_exit(tfm)) in safexcel_skcipher_cra_exit()
1230 ret = safexcel_skcipher_exit_inv(tfm); in safexcel_skcipher_cra_exit()
1240 static void safexcel_aead_cra_exit(struct crypto_tfm *tfm) in safexcel_aead_cra_exit() argument
1242 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_cra_exit()
1246 if (safexcel_cipher_cra_exit(tfm)) in safexcel_aead_cra_exit()
1250 ret = safexcel_aead_exit_inv(tfm); in safexcel_aead_cra_exit()
1260 static int safexcel_skcipher_aes_ecb_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_aes_ecb_cra_init() argument
1262 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_aes_ecb_cra_init()
1264 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_aes_ecb_cra_init()
1298 static int safexcel_skcipher_aes_cbc_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_aes_cbc_cra_init() argument
1300 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_aes_cbc_cra_init()
1302 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_aes_cbc_cra_init()
1336 static int safexcel_skcipher_aes_cfb_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_aes_cfb_cra_init() argument
1338 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_aes_cfb_cra_init()
1340 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_aes_cfb_cra_init()
1374 static int safexcel_skcipher_aes_ofb_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_aes_ofb_cra_init() argument
1376 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_aes_ofb_cra_init()
1378 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_aes_ofb_cra_init()
1415 struct crypto_tfm *tfm = crypto_skcipher_tfm(ctfm); in safexcel_skcipher_aesctr_setkey() local
1416 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_aesctr_setkey()
1448 static int safexcel_skcipher_aes_ctr_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_aes_ctr_cra_init() argument
1450 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_aes_ctr_cra_init()
1452 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_aes_ctr_cra_init()
1509 static int safexcel_skcipher_des_cbc_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_des_cbc_cra_init() argument
1511 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_des_cbc_cra_init()
1513 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_des_cbc_cra_init()
1548 static int safexcel_skcipher_des_ecb_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_des_ecb_cra_init() argument
1550 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_des_ecb_cra_init()
1552 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_des_ecb_cra_init()
1608 static int safexcel_skcipher_des3_cbc_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_des3_cbc_cra_init() argument
1610 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_des3_cbc_cra_init()
1612 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_des3_cbc_cra_init()
1647 static int safexcel_skcipher_des3_ecb_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_des3_ecb_cra_init() argument
1649 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_des3_ecb_cra_init()
1651 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_des3_ecb_cra_init()
1699 static int safexcel_aead_cra_init(struct crypto_tfm *tfm) in safexcel_aead_cra_init() argument
1701 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_cra_init()
1703 container_of(tfm->__crt_alg, struct safexcel_alg_template, in safexcel_aead_cra_init()
1706 crypto_aead_set_reqsize(__crypto_aead_cast(tfm), in safexcel_aead_cra_init()
1722 static int safexcel_aead_sha1_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha1_cra_init() argument
1724 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha1_cra_init()
1726 safexcel_aead_cra_init(tfm); in safexcel_aead_sha1_cra_init()
1758 static int safexcel_aead_sha256_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha256_cra_init() argument
1760 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha256_cra_init()
1762 safexcel_aead_cra_init(tfm); in safexcel_aead_sha256_cra_init()
1794 static int safexcel_aead_sha224_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha224_cra_init() argument
1796 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha224_cra_init()
1798 safexcel_aead_cra_init(tfm); in safexcel_aead_sha224_cra_init()
1830 static int safexcel_aead_sha512_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha512_cra_init() argument
1832 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha512_cra_init()
1834 safexcel_aead_cra_init(tfm); in safexcel_aead_sha512_cra_init()
1866 static int safexcel_aead_sha384_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha384_cra_init() argument
1868 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha384_cra_init()
1870 safexcel_aead_cra_init(tfm); in safexcel_aead_sha384_cra_init()
1902 static int safexcel_aead_sha1_des3_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha1_des3_cra_init() argument
1904 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha1_des3_cra_init()
1906 safexcel_aead_sha1_cra_init(tfm); in safexcel_aead_sha1_des3_cra_init()
1939 static int safexcel_aead_sha256_des3_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha256_des3_cra_init() argument
1941 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha256_des3_cra_init()
1943 safexcel_aead_sha256_cra_init(tfm); in safexcel_aead_sha256_des3_cra_init()
1976 static int safexcel_aead_sha224_des3_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha224_des3_cra_init() argument
1978 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha224_des3_cra_init()
1980 safexcel_aead_sha224_cra_init(tfm); in safexcel_aead_sha224_des3_cra_init()
2013 static int safexcel_aead_sha512_des3_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha512_des3_cra_init() argument
2015 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha512_des3_cra_init()
2017 safexcel_aead_sha512_cra_init(tfm); in safexcel_aead_sha512_des3_cra_init()
2050 static int safexcel_aead_sha384_des3_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha384_des3_cra_init() argument
2052 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha384_des3_cra_init()
2054 safexcel_aead_sha384_cra_init(tfm); in safexcel_aead_sha384_des3_cra_init()
2087 static int safexcel_aead_sha1_des_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha1_des_cra_init() argument
2089 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha1_des_cra_init()
2091 safexcel_aead_sha1_cra_init(tfm); in safexcel_aead_sha1_des_cra_init()
2124 static int safexcel_aead_sha256_des_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha256_des_cra_init() argument
2126 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha256_des_cra_init()
2128 safexcel_aead_sha256_cra_init(tfm); in safexcel_aead_sha256_des_cra_init()
2161 static int safexcel_aead_sha224_des_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha224_des_cra_init() argument
2163 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha224_des_cra_init()
2165 safexcel_aead_sha224_cra_init(tfm); in safexcel_aead_sha224_des_cra_init()
2198 static int safexcel_aead_sha512_des_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha512_des_cra_init() argument
2200 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha512_des_cra_init()
2202 safexcel_aead_sha512_cra_init(tfm); in safexcel_aead_sha512_des_cra_init()
2235 static int safexcel_aead_sha384_des_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha384_des_cra_init() argument
2237 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha384_des_cra_init()
2239 safexcel_aead_sha384_cra_init(tfm); in safexcel_aead_sha384_des_cra_init()
2272 static int safexcel_aead_sha1_ctr_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha1_ctr_cra_init() argument
2274 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha1_ctr_cra_init()
2276 safexcel_aead_sha1_cra_init(tfm); in safexcel_aead_sha1_ctr_cra_init()
2307 static int safexcel_aead_sha256_ctr_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha256_ctr_cra_init() argument
2309 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha256_ctr_cra_init()
2311 safexcel_aead_sha256_cra_init(tfm); in safexcel_aead_sha256_ctr_cra_init()
2342 static int safexcel_aead_sha224_ctr_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha224_ctr_cra_init() argument
2344 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha224_ctr_cra_init()
2346 safexcel_aead_sha224_cra_init(tfm); in safexcel_aead_sha224_ctr_cra_init()
2377 static int safexcel_aead_sha512_ctr_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha512_ctr_cra_init() argument
2379 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha512_ctr_cra_init()
2381 safexcel_aead_sha512_cra_init(tfm); in safexcel_aead_sha512_ctr_cra_init()
2412 static int safexcel_aead_sha384_ctr_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sha384_ctr_cra_init() argument
2414 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sha384_ctr_cra_init()
2416 safexcel_aead_sha384_cra_init(tfm); in safexcel_aead_sha384_ctr_cra_init()
2450 struct crypto_tfm *tfm = crypto_skcipher_tfm(ctfm); in safexcel_skcipher_aesxts_setkey() local
2451 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_aesxts_setkey()
2505 static int safexcel_skcipher_aes_xts_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_aes_xts_cra_init() argument
2507 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_aes_xts_cra_init()
2509 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_aes_xts_cra_init()
2564 struct crypto_tfm *tfm = crypto_aead_tfm(ctfm); in safexcel_aead_gcm_setkey() local
2565 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_gcm_setkey()
2619 static int safexcel_aead_gcm_cra_init(struct crypto_tfm *tfm) in safexcel_aead_gcm_cra_init() argument
2621 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_gcm_cra_init()
2623 safexcel_aead_cra_init(tfm); in safexcel_aead_gcm_cra_init()
2633 static void safexcel_aead_gcm_cra_exit(struct crypto_tfm *tfm) in safexcel_aead_gcm_cra_exit() argument
2635 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_gcm_cra_exit()
2638 safexcel_aead_cra_exit(tfm); in safexcel_aead_gcm_cra_exit()
2641 static int safexcel_aead_gcm_setauthsize(struct crypto_aead *tfm, in safexcel_aead_gcm_setauthsize() argument
2677 struct crypto_tfm *tfm = crypto_aead_tfm(ctfm); in safexcel_aead_ccm_setkey() local
2678 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_ccm_setkey()
2718 static int safexcel_aead_ccm_cra_init(struct crypto_tfm *tfm) in safexcel_aead_ccm_cra_init() argument
2720 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_ccm_cra_init()
2722 safexcel_aead_cra_init(tfm); in safexcel_aead_ccm_cra_init()
2731 static int safexcel_aead_ccm_setauthsize(struct crypto_aead *tfm, in safexcel_aead_ccm_setauthsize() argument
2824 static int safexcel_skcipher_chacha20_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_chacha20_cra_init() argument
2826 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_chacha20_cra_init()
2828 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_chacha20_cra_init()
2881 static int safexcel_aead_chachapoly_setauthsize(struct crypto_aead *tfm, in safexcel_aead_chachapoly_setauthsize() argument
2894 struct crypto_tfm *tfm = crypto_aead_tfm(aead); in safexcel_aead_chachapoly_crypt() local
2895 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_chachapoly_crypt()
2952 static int safexcel_aead_fallback_cra_init(struct crypto_tfm *tfm) in safexcel_aead_fallback_cra_init() argument
2954 struct crypto_aead *aead = __crypto_aead_cast(tfm); in safexcel_aead_fallback_cra_init()
2956 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_fallback_cra_init()
2958 safexcel_aead_cra_init(tfm); in safexcel_aead_fallback_cra_init()
2974 static int safexcel_aead_chachapoly_cra_init(struct crypto_tfm *tfm) in safexcel_aead_chachapoly_cra_init() argument
2976 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_chachapoly_cra_init()
2978 safexcel_aead_fallback_cra_init(tfm); in safexcel_aead_chachapoly_cra_init()
2988 static void safexcel_aead_fallback_cra_exit(struct crypto_tfm *tfm) in safexcel_aead_fallback_cra_exit() argument
2990 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_fallback_cra_exit()
2993 safexcel_aead_cra_exit(tfm); in safexcel_aead_fallback_cra_exit()
3025 static int safexcel_aead_chachapolyesp_cra_init(struct crypto_tfm *tfm) in safexcel_aead_chachapolyesp_cra_init() argument
3027 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_chachapolyesp_cra_init()
3030 ret = safexcel_aead_chachapoly_cra_init(tfm); in safexcel_aead_chachapolyesp_cra_init()
3068 struct crypto_tfm *tfm = crypto_skcipher_tfm(ctfm); in safexcel_skcipher_sm4_setkey() local
3069 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_sm4_setkey()
3105 static int safexcel_skcipher_sm4_ecb_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_sm4_ecb_cra_init() argument
3107 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_sm4_ecb_cra_init()
3109 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_sm4_ecb_cra_init()
3143 static int safexcel_skcipher_sm4_cbc_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_sm4_cbc_cra_init() argument
3145 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_sm4_cbc_cra_init()
3147 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_sm4_cbc_cra_init()
3181 static int safexcel_skcipher_sm4_ofb_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_sm4_ofb_cra_init() argument
3183 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_sm4_ofb_cra_init()
3185 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_sm4_ofb_cra_init()
3219 static int safexcel_skcipher_sm4_cfb_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_sm4_cfb_cra_init() argument
3221 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_sm4_cfb_cra_init()
3223 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_sm4_cfb_cra_init()
3260 struct crypto_tfm *tfm = crypto_skcipher_tfm(ctfm); in safexcel_skcipher_sm4ctr_setkey() local
3261 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_sm4ctr_setkey()
3271 static int safexcel_skcipher_sm4_ctr_cra_init(struct crypto_tfm *tfm) in safexcel_skcipher_sm4_ctr_cra_init() argument
3273 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_skcipher_sm4_ctr_cra_init()
3275 safexcel_skcipher_cra_init(tfm); in safexcel_skcipher_sm4_ctr_cra_init()
3322 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in safexcel_aead_sm4_blk_decrypt() local
3325 if ((req->cryptlen - crypto_aead_authsize(tfm)) & (SM4_BLOCK_SIZE - 1)) in safexcel_aead_sm4_blk_decrypt()
3332 static int safexcel_aead_sm4cbc_sha1_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sm4cbc_sha1_cra_init() argument
3334 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sm4cbc_sha1_cra_init()
3336 safexcel_aead_cra_init(tfm); in safexcel_aead_sm4cbc_sha1_cra_init()
3373 struct crypto_tfm *tfm = crypto_aead_tfm(ctfm); in safexcel_aead_fallback_setkey() local
3374 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_fallback_setkey()
3384 struct crypto_tfm *tfm = crypto_aead_tfm(ctfm); in safexcel_aead_fallback_setauthsize() local
3385 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_fallback_setauthsize()
3395 struct crypto_tfm *tfm = crypto_aead_tfm(aead); in safexcel_aead_fallback_crypt() local
3396 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_fallback_crypt()
3428 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in safexcel_aead_sm4cbc_sm3_decrypt() local
3431 if ((req->cryptlen - crypto_aead_authsize(tfm)) & (SM4_BLOCK_SIZE - 1)) in safexcel_aead_sm4cbc_sm3_decrypt()
3433 else if (req->cryptlen > crypto_aead_authsize(tfm) || req->assoclen) in safexcel_aead_sm4cbc_sm3_decrypt()
3441 static int safexcel_aead_sm4cbc_sm3_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sm4cbc_sm3_cra_init() argument
3443 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sm4cbc_sm3_cra_init()
3445 safexcel_aead_fallback_cra_init(tfm); in safexcel_aead_sm4cbc_sm3_cra_init()
3481 static int safexcel_aead_sm4ctr_sha1_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sm4ctr_sha1_cra_init() argument
3483 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sm4ctr_sha1_cra_init()
3485 safexcel_aead_sm4cbc_sha1_cra_init(tfm); in safexcel_aead_sm4ctr_sha1_cra_init()
3516 static int safexcel_aead_sm4ctr_sm3_cra_init(struct crypto_tfm *tfm) in safexcel_aead_sm4ctr_sm3_cra_init() argument
3518 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_aead_sm4ctr_sm3_cra_init()
3520 safexcel_aead_sm4cbc_sm3_cra_init(tfm); in safexcel_aead_sm4ctr_sm3_cra_init()
3554 struct crypto_tfm *tfm = crypto_aead_tfm(ctfm); in safexcel_rfc4106_gcm_setkey() local
3555 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_rfc4106_gcm_setkey()
3564 static int safexcel_rfc4106_gcm_setauthsize(struct crypto_aead *tfm, in safexcel_rfc4106_gcm_setauthsize() argument
3582 static int safexcel_rfc4106_gcm_cra_init(struct crypto_tfm *tfm) in safexcel_rfc4106_gcm_cra_init() argument
3584 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_rfc4106_gcm_cra_init()
3587 ret = safexcel_aead_gcm_cra_init(tfm); in safexcel_rfc4106_gcm_cra_init()
3619 static int safexcel_rfc4543_gcm_setauthsize(struct crypto_aead *tfm, in safexcel_rfc4543_gcm_setauthsize() argument
3628 static int safexcel_rfc4543_gcm_cra_init(struct crypto_tfm *tfm) in safexcel_rfc4543_gcm_cra_init() argument
3630 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_rfc4543_gcm_cra_init()
3633 ret = safexcel_aead_gcm_cra_init(tfm); in safexcel_rfc4543_gcm_cra_init()
3667 struct crypto_tfm *tfm = crypto_aead_tfm(ctfm); in safexcel_rfc4309_ccm_setkey() local
3668 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_rfc4309_ccm_setkey()
3681 static int safexcel_rfc4309_ccm_setauthsize(struct crypto_aead *tfm, in safexcel_rfc4309_ccm_setauthsize() argument
3719 static int safexcel_rfc4309_ccm_cra_init(struct crypto_tfm *tfm) in safexcel_rfc4309_ccm_cra_init() argument
3721 struct safexcel_cipher_ctx *ctx = crypto_tfm_ctx(tfm); in safexcel_rfc4309_ccm_cra_init()
3724 ret = safexcel_aead_ccm_cra_init(tfm); in safexcel_rfc4309_ccm_cra_init()