Lines Matching refs:csp

87     const struct crypto_session_params *csp);
89 const struct crypto_session_params *csp);
92 struct sec_desc *desc, const struct crypto_session_params *csp,
95 struct sec_desc *desc, const struct crypto_session_params *csp,
101 static bool sec_aesu_newsession(const struct crypto_session_params *csp);
103 const struct crypto_session_params *csp, struct sec_desc *desc,
108 static int sec_mdeu_config(const struct crypto_session_params *csp,
110 static bool sec_mdeu_newsession(const struct crypto_session_params *csp);
112 const struct crypto_session_params *csp, struct sec_desc *desc,
1132 sec_cipher_supported(const struct crypto_session_params *csp) in sec_cipher_supported() argument
1135 switch (csp->csp_cipher_alg) { in sec_cipher_supported()
1138 if (csp->csp_ivlen != AES_BLOCK_LEN) in sec_cipher_supported()
1145 if (csp->csp_cipher_klen == 0 || csp->csp_cipher_klen > SEC_MAX_KEY_LEN) in sec_cipher_supported()
1153 const struct crypto_session_params *csp) in sec_auth_supported() argument
1156 switch (csp->csp_auth_alg) { in sec_auth_supported()
1164 if (csp->csp_auth_klen > SEC_MAX_KEY_LEN) in sec_auth_supported()
1176 sec_probesession(device_t dev, const struct crypto_session_params *csp) in sec_probesession() argument
1180 if (csp->csp_flags != 0) in sec_probesession()
1182 switch (csp->csp_mode) { in sec_probesession()
1184 if (!sec_auth_supported(sc, csp)) in sec_probesession()
1188 if (!sec_cipher_supported(csp)) in sec_probesession()
1192 if (!sec_auth_supported(sc, csp) || !sec_cipher_supported(csp)) in sec_probesession()
1203 const struct crypto_session_params *csp) in sec_newsession() argument
1212 if (eu->sem_newsession(csp)) in sec_newsession()
1219 if (csp->csp_cipher_key != NULL) in sec_newsession()
1220 memcpy(ses->ss_key, csp->csp_cipher_key, csp->csp_cipher_klen); in sec_newsession()
1223 if (csp->csp_auth_key != NULL) in sec_newsession()
1224 memcpy(ses->ss_mkey, csp->csp_auth_key, csp->csp_auth_klen); in sec_newsession()
1226 if (csp->csp_auth_alg != 0) { in sec_newsession()
1227 if (csp->csp_auth_mlen == 0) in sec_newsession()
1228 ses->ss_mlen = crypto_auth_hash(csp)->hashsize; in sec_newsession()
1230 ses->ss_mlen = csp->csp_auth_mlen; in sec_newsession()
1241 const struct crypto_session_params *csp; in sec_process() local
1246 csp = crypto_get_params(crp->crp_session); in sec_process()
1271 if (csp->csp_cipher_alg != 0) in sec_process()
1275 memcpy(ses->ss_key, crp->crp_cipher_key, csp->csp_cipher_klen); in sec_process()
1278 memcpy(ses->ss_mkey, crp->crp_auth_key, csp->csp_auth_klen); in sec_process()
1280 memcpy(desc->sd_desc->shd_key, ses->ss_key, csp->csp_cipher_klen); in sec_process()
1281 memcpy(desc->sd_desc->shd_mkey, ses->ss_mkey, csp->csp_auth_klen); in sec_process()
1283 error = ses->ss_eu->sem_make_desc(sc, csp, desc, crp); in sec_process()
1319 const struct crypto_session_params *csp, struct cryptop *crp) in sec_build_common_ns_desc() argument
1335 offsetof(struct sec_hw_desc, shd_iv), csp->csp_ivlen); in sec_build_common_ns_desc()
1341 offsetof(struct sec_hw_desc, shd_key), csp->csp_cipher_klen); in sec_build_common_ns_desc()
1370 const struct crypto_session_params *csp, struct cryptop *crp) in sec_build_common_s_desc() argument
1376 error = sec_mdeu_config(csp, &eu, &mode, &hashlen); in sec_build_common_s_desc()
1386 offsetof(struct sec_hw_desc, shd_mkey), csp->csp_auth_klen); in sec_build_common_s_desc()
1398 offsetof(struct sec_hw_desc, shd_key), csp->csp_cipher_klen); in sec_build_common_s_desc()
1404 offsetof(struct sec_hw_desc, shd_iv), csp->csp_ivlen); in sec_build_common_s_desc()
1430 sec_aesu_newsession(const struct crypto_session_params *csp) in sec_aesu_newsession() argument
1433 return (csp->csp_cipher_alg == CRYPTO_AES_CBC); in sec_aesu_newsession()
1438 const struct crypto_session_params *csp, struct sec_desc *desc, in sec_aesu_make_desc() argument
1453 if (csp->csp_mode == CSP_MODE_ETA) in sec_aesu_make_desc()
1454 error = sec_build_common_s_desc(sc, desc, csp, crp); in sec_aesu_make_desc()
1456 error = sec_build_common_ns_desc(sc, desc, csp, crp); in sec_aesu_make_desc()
1479 sec_mdeu_config(const struct crypto_session_params *csp, u_int *eu, u_int *mode, in sec_mdeu_config() argument
1486 switch (csp->csp_auth_alg) { in sec_mdeu_config()
1518 sec_mdeu_newsession(const struct crypto_session_params *csp) in sec_mdeu_newsession() argument
1521 return (sec_mdeu_can_handle(csp->csp_auth_alg)); in sec_mdeu_newsession()
1526 const struct crypto_session_params *csp, in sec_mdeu_make_desc() argument
1533 error = sec_mdeu_config(csp, &eu, &mode, &hashlen); in sec_mdeu_make_desc()
1557 shd_mkey), csp->csp_auth_klen); in sec_mdeu_make_desc()