Lines Matching refs:csp

88     const struct crypto_session_params *csp);
90 const struct crypto_session_params *csp);
93 struct sec_desc *desc, const struct crypto_session_params *csp,
96 struct sec_desc *desc, const struct crypto_session_params *csp,
102 static bool sec_aesu_newsession(const struct crypto_session_params *csp);
104 const struct crypto_session_params *csp, struct sec_desc *desc,
109 static int sec_mdeu_config(const struct crypto_session_params *csp,
111 static bool sec_mdeu_newsession(const struct crypto_session_params *csp);
113 const struct crypto_session_params *csp, struct sec_desc *desc,
1133 sec_cipher_supported(const struct crypto_session_params *csp) in sec_cipher_supported() argument
1136 switch (csp->csp_cipher_alg) { in sec_cipher_supported()
1139 if (csp->csp_ivlen != AES_BLOCK_LEN) in sec_cipher_supported()
1146 if (csp->csp_cipher_klen == 0 || csp->csp_cipher_klen > SEC_MAX_KEY_LEN) in sec_cipher_supported()
1154 const struct crypto_session_params *csp) in sec_auth_supported() argument
1157 switch (csp->csp_auth_alg) { in sec_auth_supported()
1165 if (csp->csp_auth_klen > SEC_MAX_KEY_LEN) in sec_auth_supported()
1177 sec_probesession(device_t dev, const struct crypto_session_params *csp) in sec_probesession() argument
1181 if (csp->csp_flags != 0) in sec_probesession()
1183 switch (csp->csp_mode) { in sec_probesession()
1185 if (!sec_auth_supported(sc, csp)) in sec_probesession()
1189 if (!sec_cipher_supported(csp)) in sec_probesession()
1193 if (!sec_auth_supported(sc, csp) || !sec_cipher_supported(csp)) in sec_probesession()
1204 const struct crypto_session_params *csp) in sec_newsession() argument
1213 if (eu->sem_newsession(csp)) in sec_newsession()
1220 if (csp->csp_cipher_key != NULL) in sec_newsession()
1221 memcpy(ses->ss_key, csp->csp_cipher_key, csp->csp_cipher_klen); in sec_newsession()
1224 if (csp->csp_auth_key != NULL) in sec_newsession()
1225 memcpy(ses->ss_mkey, csp->csp_auth_key, csp->csp_auth_klen); in sec_newsession()
1227 if (csp->csp_auth_alg != 0) { in sec_newsession()
1228 if (csp->csp_auth_mlen == 0) in sec_newsession()
1229 ses->ss_mlen = crypto_auth_hash(csp)->hashsize; in sec_newsession()
1231 ses->ss_mlen = csp->csp_auth_mlen; in sec_newsession()
1242 const struct crypto_session_params *csp; in sec_process() local
1247 csp = crypto_get_params(crp->crp_session); in sec_process()
1272 if (csp->csp_cipher_alg != 0) in sec_process()
1276 memcpy(ses->ss_key, crp->crp_cipher_key, csp->csp_cipher_klen); in sec_process()
1279 memcpy(ses->ss_mkey, crp->crp_auth_key, csp->csp_auth_klen); in sec_process()
1281 memcpy(desc->sd_desc->shd_key, ses->ss_key, csp->csp_cipher_klen); in sec_process()
1282 memcpy(desc->sd_desc->shd_mkey, ses->ss_mkey, csp->csp_auth_klen); in sec_process()
1284 error = ses->ss_eu->sem_make_desc(sc, csp, desc, crp); in sec_process()
1320 const struct crypto_session_params *csp, struct cryptop *crp) in sec_build_common_ns_desc() argument
1336 offsetof(struct sec_hw_desc, shd_iv), csp->csp_ivlen); in sec_build_common_ns_desc()
1342 offsetof(struct sec_hw_desc, shd_key), csp->csp_cipher_klen); in sec_build_common_ns_desc()
1371 const struct crypto_session_params *csp, struct cryptop *crp) in sec_build_common_s_desc() argument
1377 error = sec_mdeu_config(csp, &eu, &mode, &hashlen); in sec_build_common_s_desc()
1387 offsetof(struct sec_hw_desc, shd_mkey), csp->csp_auth_klen); in sec_build_common_s_desc()
1399 offsetof(struct sec_hw_desc, shd_key), csp->csp_cipher_klen); in sec_build_common_s_desc()
1405 offsetof(struct sec_hw_desc, shd_iv), csp->csp_ivlen); in sec_build_common_s_desc()
1431 sec_aesu_newsession(const struct crypto_session_params *csp) in sec_aesu_newsession() argument
1434 return (csp->csp_cipher_alg == CRYPTO_AES_CBC); in sec_aesu_newsession()
1439 const struct crypto_session_params *csp, struct sec_desc *desc, in sec_aesu_make_desc() argument
1454 if (csp->csp_mode == CSP_MODE_ETA) in sec_aesu_make_desc()
1455 error = sec_build_common_s_desc(sc, desc, csp, crp); in sec_aesu_make_desc()
1457 error = sec_build_common_ns_desc(sc, desc, csp, crp); in sec_aesu_make_desc()
1480 sec_mdeu_config(const struct crypto_session_params *csp, u_int *eu, u_int *mode, in sec_mdeu_config() argument
1487 switch (csp->csp_auth_alg) { in sec_mdeu_config()
1519 sec_mdeu_newsession(const struct crypto_session_params *csp) in sec_mdeu_newsession() argument
1522 return (sec_mdeu_can_handle(csp->csp_auth_alg)); in sec_mdeu_newsession()
1527 const struct crypto_session_params *csp, in sec_mdeu_make_desc() argument
1534 error = sec_mdeu_config(csp, &eu, &mode, &hashlen); in sec_mdeu_make_desc()
1558 shd_mkey), csp->csp_auth_klen); in sec_mdeu_make_desc()