Lines Matching refs:csp
1356 safexcel_setkey_hmac(const struct crypto_session_params *csp, in safexcel_setkey_hmac() argument
1362 ahash = crypto_auth_hash(csp); in safexcel_setkey_hmac()
1385 const struct crypto_session_params *csp; in safexcel_set_context() local
1390 csp = crypto_get_params(sess->cses); in safexcel_set_context()
1391 aklen = csp->csp_auth_klen; in safexcel_set_context()
1392 cklen = csp->csp_cipher_klen; in safexcel_set_context()
1393 if (csp->csp_cipher_alg == CRYPTO_AES_XTS) in safexcel_set_context()
1400 if (csp->csp_cipher_alg != 0) { in safexcel_set_context()
1403 } else if (csp->csp_auth_alg == CRYPTO_AES_NIST_GMAC) { in safexcel_set_context()
1410 switch (csp->csp_cipher_alg) { in safexcel_set_context()
1424 switch (csp->csp_auth_alg) { in safexcel_set_context()
1434 safexcel_setkey_hmac(csp, akey, aklen, in safexcel_set_context()
1441 alg = csp->csp_cipher_alg; in safexcel_set_context()
1443 alg = csp->csp_auth_alg; in safexcel_set_context()
1463 if (csp->csp_auth_alg != 0) in safexcel_set_context()
1469 if (csp->csp_auth_alg != 0) in safexcel_set_context()
1475 if (CRYPTO_OP_IS_ENCRYPT(op) || csp->csp_auth_alg != 0) { in safexcel_set_context()
1484 if (csp->csp_cipher_alg == CRYPTO_AES_NIST_GCM_16) { in safexcel_set_context()
1687 const struct crypto_session_params *csp; in safexcel_instr_ccm() local
1694 csp = crypto_get_params(crp->crp_session); in safexcel_instr_ccm()
1708 L = 15 - csp->csp_ivlen; in safexcel_instr_ccm()
1713 memcpy(&a0[1], req->iv, csp->csp_ivlen); in safexcel_instr_ccm()
1731 memcpy(&b0[1], req->iv, csp->csp_ivlen); in safexcel_instr_ccm()
1874 const struct crypto_session_params *csp; in safexcel_set_token() local
1885 csp = crypto_get_params(crp->crp_session); in safexcel_set_token()
1898 akey = csp->csp_auth_key; in safexcel_set_token()
1900 ckey = csp->csp_cipher_key; in safexcel_set_token()
1923 if (csp->csp_cipher_alg == 0 && in safexcel_set_token()
1924 csp->csp_auth_alg != CRYPTO_AES_NIST_GMAC) { in safexcel_set_token()
1933 switch (csp->csp_cipher_alg) { in safexcel_set_token()
1950 if (csp->csp_auth_alg != 0) in safexcel_set_token()
1956 switch (csp->csp_auth_alg) { in safexcel_set_token()
1973 panic("unhandled auth request %d", csp->csp_auth_alg); in safexcel_set_token()
2110 const struct crypto_session_params *csp; in safexcel_create_chain_cb() local
2128 csp = crypto_get_params(crp->crp_session); in safexcel_create_chain_cb()
2153 if (csp->csp_cipher_alg != 0) { in safexcel_create_chain_cb()
2246 safexcel_probe_cipher(const struct crypto_session_params *csp) in safexcel_probe_cipher() argument
2248 switch (csp->csp_cipher_alg) { in safexcel_probe_cipher()
2251 if (csp->csp_ivlen != AES_BLOCK_LEN) in safexcel_probe_cipher()
2255 if (csp->csp_ivlen != AES_XTS_IV_LEN) in safexcel_probe_cipher()
2270 safexcel_probesession(device_t dev, const struct crypto_session_params *csp) in safexcel_probesession() argument
2272 if (csp->csp_flags != 0) in safexcel_probesession()
2275 switch (csp->csp_mode) { in safexcel_probesession()
2277 if (!safexcel_probe_cipher(csp)) in safexcel_probesession()
2281 switch (csp->csp_auth_alg) { in safexcel_probesession()
2283 if (csp->csp_ivlen != AES_GCM_IV_LEN) in safexcel_probesession()
2302 switch (csp->csp_cipher_alg) { in safexcel_probesession()
2311 if (!safexcel_probe_cipher(csp)) in safexcel_probesession()
2313 switch (csp->csp_cipher_alg) { in safexcel_probesession()
2320 if (csp->csp_auth_alg != CRYPTO_SHA1_HMAC && in safexcel_probesession()
2321 csp->csp_auth_alg != CRYPTO_SHA2_224_HMAC && in safexcel_probesession()
2322 csp->csp_auth_alg != CRYPTO_SHA2_256_HMAC && in safexcel_probesession()
2323 csp->csp_auth_alg != CRYPTO_SHA2_384_HMAC && in safexcel_probesession()
2324 csp->csp_auth_alg != CRYPTO_SHA2_512_HMAC) in safexcel_probesession()
2440 const struct crypto_session_params *csp) in safexcel_newsession() argument
2447 switch (csp->csp_auth_alg) { in safexcel_newsession()
2454 sess->hash = safexcel_sha_hashid(csp->csp_auth_alg); in safexcel_newsession()
2455 sess->digestlen = safexcel_sha_hashlen(csp->csp_auth_alg); in safexcel_newsession()
2456 sess->statelen = safexcel_sha_statelen(csp->csp_auth_alg); in safexcel_newsession()
2464 sess->hash = safexcel_sha_hashid(csp->csp_auth_alg); in safexcel_newsession()
2465 sess->digestlen = safexcel_sha_hashlen(csp->csp_auth_alg); in safexcel_newsession()
2466 sess->statelen = safexcel_sha_statelen(csp->csp_auth_alg); in safexcel_newsession()
2472 sess->alg = safexcel_aes_algid(csp->csp_auth_klen); in safexcel_newsession()
2477 switch (csp->csp_cipher_alg) { in safexcel_newsession()
2482 sess->alg = safexcel_aes_algid(csp->csp_cipher_klen); in safexcel_newsession()
2486 sess->hash = safexcel_aes_ccm_hashid(csp->csp_cipher_klen); in safexcel_newsession()
2489 sess->alg = safexcel_aes_algid(csp->csp_cipher_klen); in safexcel_newsession()
2493 sess->alg = safexcel_aes_algid(csp->csp_cipher_klen); in safexcel_newsession()
2497 sess->alg = safexcel_aes_algid(csp->csp_cipher_klen); in safexcel_newsession()
2501 sess->alg = safexcel_aes_algid(csp->csp_cipher_klen / 2); in safexcel_newsession()
2506 if (csp->csp_auth_mlen != 0) in safexcel_newsession()
2507 sess->digestlen = csp->csp_auth_mlen; in safexcel_newsession()
2510 CRYPTO_OP_ENCRYPT, csp->csp_cipher_key, csp->csp_auth_key, in safexcel_newsession()
2513 CRYPTO_OP_DECRYPT, csp->csp_cipher_key, csp->csp_auth_key, in safexcel_newsession()