• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/sys/dev/safexcel/

Lines Matching refs:csp

1359 safexcel_setkey_hmac(const struct crypto_session_params *csp,
1365 ahash = crypto_auth_hash(csp);
1388 const struct crypto_session_params *csp;
1393 csp = crypto_get_params(sess->cses);
1394 aklen = csp->csp_auth_klen;
1395 cklen = csp->csp_cipher_klen;
1396 if (csp->csp_cipher_alg == CRYPTO_AES_XTS)
1403 if (csp->csp_cipher_alg != 0) {
1406 } else if (csp->csp_auth_alg == CRYPTO_AES_NIST_GMAC) {
1413 switch (csp->csp_cipher_alg) {
1427 switch (csp->csp_auth_alg) {
1437 safexcel_setkey_hmac(csp, akey, aklen,
1444 alg = csp->csp_cipher_alg;
1446 alg = csp->csp_auth_alg;
1466 if (csp->csp_auth_alg != 0)
1472 if (csp->csp_auth_alg != 0)
1478 if (CRYPTO_OP_IS_ENCRYPT(op) || csp->csp_auth_alg != 0) {
1487 if (csp->csp_cipher_alg == CRYPTO_AES_NIST_GCM_16) {
1624 const struct crypto_session_params *csp;
1629 csp = crypto_get_params(crp->crp_session);
1877 const struct crypto_session_params *csp;
1888 csp = crypto_get_params(crp->crp_session);
1901 akey = csp->csp_auth_key;
1903 ckey = csp->csp_cipher_key;
1926 if (csp->csp_cipher_alg == 0 &&
1927 csp->csp_auth_alg != CRYPTO_AES_NIST_GMAC) {
1936 switch (csp->csp_cipher_alg) {
1953 if (csp->csp_auth_alg != 0)
1959 switch (csp->csp_auth_alg) {
1976 panic("unhandled auth request %d", csp->csp_auth_alg);
2113 const struct crypto_session_params *csp;
2131 csp = crypto_get_params(crp->crp_session);
2156 if (csp->csp_cipher_alg != 0) {
2249 safexcel_probe_cipher(const struct crypto_session_params *csp)
2251 switch (csp->csp_cipher_alg) {
2254 if (csp->csp_ivlen != AES_BLOCK_LEN)
2258 if (csp->csp_ivlen != AES_XTS_IV_LEN)
2273 safexcel_probesession(device_t dev, const struct crypto_session_params *csp)
2275 if (csp->csp_flags != 0)
2278 switch (csp->csp_mode) {
2280 if (!safexcel_probe_cipher(csp))
2284 switch (csp->csp_auth_alg) {
2286 if (csp->csp_ivlen != AES_GCM_IV_LEN)
2305 switch (csp->csp_cipher_alg) {
2307 if (csp->csp_ivlen != AES_GCM_IV_LEN)
2311 if (csp->csp_ivlen != AES_CCM_IV_LEN)
2319 if (!safexcel_probe_cipher(csp))
2321 switch (csp->csp_cipher_alg) {
2328 if (csp->csp_auth_alg != CRYPTO_SHA1_HMAC &&
2329 csp->csp_auth_alg != CRYPTO_SHA2_224_HMAC &&
2330 csp->csp_auth_alg != CRYPTO_SHA2_256_HMAC &&
2331 csp->csp_auth_alg != CRYPTO_SHA2_384_HMAC &&
2332 csp->csp_auth_alg != CRYPTO_SHA2_512_HMAC)
2448 const struct crypto_session_params *csp)
2457 switch (csp->csp_auth_alg) {
2464 sess->hash = safexcel_sha_hashid(csp->csp_auth_alg);
2465 sess->digestlen = safexcel_sha_hashlen(csp->csp_auth_alg);
2466 sess->statelen = safexcel_sha_statelen(csp->csp_auth_alg);
2474 sess->hash = safexcel_sha_hashid(csp->csp_auth_alg);
2475 sess->digestlen = safexcel_sha_hashlen(csp->csp_auth_alg);
2476 sess->statelen = safexcel_sha_statelen(csp->csp_auth_alg);
2482 sess->alg = safexcel_aes_algid(csp->csp_auth_klen);
2487 switch (csp->csp_cipher_alg) {
2492 sess->alg = safexcel_aes_algid(csp->csp_cipher_klen);
2496 sess->hash = safexcel_aes_ccm_hashid(csp->csp_cipher_klen);
2499 sess->alg = safexcel_aes_algid(csp->csp_cipher_klen);
2503 sess->alg = safexcel_aes_algid(csp->csp_cipher_klen);
2507 sess->alg = safexcel_aes_algid(csp->csp_cipher_klen);
2511 sess->alg = safexcel_aes_algid(csp->csp_cipher_klen / 2);
2516 if (csp->csp_auth_mlen != 0)
2517 sess->digestlen = csp->csp_auth_mlen;
2519 if ((csp->csp_cipher_alg == 0 || csp->csp_cipher_key != NULL) &&
2520 (csp->csp_auth_alg == 0 || csp->csp_auth_key != NULL)) {
2522 CRYPTO_OP_ENCRYPT, csp->csp_cipher_key, csp->csp_auth_key,
2525 CRYPTO_OP_DECRYPT, csp->csp_cipher_key, csp->csp_auth_key,
2535 const struct crypto_session_params *csp;
2544 csp = crypto_get_params(crp->crp_session);