Lines Matching refs:csp
464 const struct crypto_session_params *csp) in cesa_prep_aes_key() argument
470 rijndaelKeySetupEnc(ek, cs->cs_key, csp->csp_cipher_klen * 8); in cesa_prep_aes_key()
475 switch (csp->csp_cipher_klen) { in cesa_prep_aes_key()
785 const struct crypto_session_params *csp, struct cesa_request *cr) in cesa_create_chain() argument
796 if (csp->csp_cipher_klen != 0) { in cesa_create_chain()
797 if (csp->csp_cipher_alg == CRYPTO_AES_CBC && in cesa_create_chain()
800 csp->csp_cipher_klen); in cesa_create_chain()
803 csp->csp_cipher_klen); in cesa_create_chain()
806 if (csp->csp_auth_klen != 0) { in cesa_create_chain()
822 if (csp->csp_cipher_alg != 0 && in cesa_create_chain()
825 switch (csp->csp_mode) { in cesa_create_chain()
1561 cesa_cipher_supported(const struct crypto_session_params *csp) in cesa_cipher_supported() argument
1564 switch (csp->csp_cipher_alg) { in cesa_cipher_supported()
1566 if (csp->csp_ivlen != AES_BLOCK_LEN) in cesa_cipher_supported()
1573 if (csp->csp_cipher_klen > CESA_MAX_KEY_LEN) in cesa_cipher_supported()
1581 const struct crypto_session_params *csp) in cesa_auth_supported() argument
1584 switch (csp->csp_auth_alg) { in cesa_auth_supported()
1598 if (csp->csp_auth_klen > CESA_MAX_MKEY_LEN) in cesa_auth_supported()
1605 cesa_probesession(device_t dev, const struct crypto_session_params *csp) in cesa_probesession() argument
1610 if (csp->csp_flags != 0) in cesa_probesession()
1612 switch (csp->csp_mode) { in cesa_probesession()
1614 if (!cesa_auth_supported(sc, csp)) in cesa_probesession()
1618 if (!cesa_cipher_supported(csp)) in cesa_probesession()
1622 if (!cesa_auth_supported(sc, csp) || in cesa_probesession()
1623 !cesa_cipher_supported(csp)) in cesa_probesession()
1634 const struct crypto_session_params *csp) in cesa_newsession() argument
1649 switch (csp->csp_cipher_alg) { in cesa_newsession()
1656 switch (csp->csp_auth_alg) { in cesa_newsession()
1659 cs->cs_hlen = (csp->csp_auth_mlen == 0) ? SHA1_HASH_LEN : in cesa_newsession()
1660 csp->csp_auth_mlen; in cesa_newsession()
1665 cs->cs_hlen = (csp->csp_auth_mlen == 0) ? SHA1_HASH_LEN : in cesa_newsession()
1666 csp->csp_auth_mlen; in cesa_newsession()
1673 cs->cs_hlen = (csp->csp_auth_mlen == 0) ? SHA2_256_HASH_LEN : in cesa_newsession()
1674 csp->csp_auth_mlen; in cesa_newsession()
1680 if (csp->csp_cipher_key != NULL) { in cesa_newsession()
1681 memcpy(cs->cs_key, csp->csp_cipher_key, in cesa_newsession()
1682 csp->csp_cipher_klen); in cesa_newsession()
1683 if (csp->csp_cipher_alg == CRYPTO_AES_CBC) in cesa_newsession()
1684 error = cesa_prep_aes_key(cs, csp); in cesa_newsession()
1688 if (csp->csp_auth_key != NULL) in cesa_newsession()
1689 cesa_set_mkey(cs, csp->csp_auth_alg, csp->csp_auth_key, in cesa_newsession()
1690 csp->csp_auth_klen); in cesa_newsession()
1698 const struct crypto_session_params *csp; in cesa_process() local
1708 csp = crypto_get_params(crp->crp_session); in cesa_process()
1748 if (csp->csp_cipher_alg != 0) in cesa_process()
1753 csp->csp_cipher_klen); in cesa_process()
1754 if (csp->csp_cipher_alg == CRYPTO_AES_CBC) in cesa_process()
1755 error = cesa_prep_aes_key(cs, csp); in cesa_process()
1759 cesa_set_mkey(cs, csp->csp_auth_alg, crp->crp_auth_key, in cesa_process()
1760 csp->csp_auth_klen); in cesa_process()
1764 error = cesa_create_chain(sc, csp, cr); in cesa_process()