Lines Matching refs:csp

463     const struct crypto_session_params *csp)  in cesa_prep_aes_key()  argument
469 rijndaelKeySetupEnc(ek, cs->cs_key, csp->csp_cipher_klen * 8); in cesa_prep_aes_key()
474 switch (csp->csp_cipher_klen) { in cesa_prep_aes_key()
784 const struct crypto_session_params *csp, struct cesa_request *cr) in cesa_create_chain() argument
795 if (csp->csp_cipher_klen != 0) { in cesa_create_chain()
796 if (csp->csp_cipher_alg == CRYPTO_AES_CBC && in cesa_create_chain()
799 csp->csp_cipher_klen); in cesa_create_chain()
802 csp->csp_cipher_klen); in cesa_create_chain()
805 if (csp->csp_auth_klen != 0) { in cesa_create_chain()
821 if (csp->csp_cipher_alg != 0 && in cesa_create_chain()
824 switch (csp->csp_mode) { in cesa_create_chain()
1560 cesa_cipher_supported(const struct crypto_session_params *csp) in cesa_cipher_supported() argument
1563 switch (csp->csp_cipher_alg) { in cesa_cipher_supported()
1565 if (csp->csp_ivlen != AES_BLOCK_LEN) in cesa_cipher_supported()
1572 if (csp->csp_cipher_klen > CESA_MAX_KEY_LEN) in cesa_cipher_supported()
1580 const struct crypto_session_params *csp) in cesa_auth_supported() argument
1583 switch (csp->csp_auth_alg) { in cesa_auth_supported()
1597 if (csp->csp_auth_klen > CESA_MAX_MKEY_LEN) in cesa_auth_supported()
1604 cesa_probesession(device_t dev, const struct crypto_session_params *csp) in cesa_probesession() argument
1609 if (csp->csp_flags != 0) in cesa_probesession()
1611 switch (csp->csp_mode) { in cesa_probesession()
1613 if (!cesa_auth_supported(sc, csp)) in cesa_probesession()
1617 if (!cesa_cipher_supported(csp)) in cesa_probesession()
1621 if (!cesa_auth_supported(sc, csp) || in cesa_probesession()
1622 !cesa_cipher_supported(csp)) in cesa_probesession()
1633 const struct crypto_session_params *csp) in cesa_newsession() argument
1648 switch (csp->csp_cipher_alg) { in cesa_newsession()
1655 switch (csp->csp_auth_alg) { in cesa_newsession()
1658 cs->cs_hlen = (csp->csp_auth_mlen == 0) ? SHA1_HASH_LEN : in cesa_newsession()
1659 csp->csp_auth_mlen; in cesa_newsession()
1664 cs->cs_hlen = (csp->csp_auth_mlen == 0) ? SHA1_HASH_LEN : in cesa_newsession()
1665 csp->csp_auth_mlen; in cesa_newsession()
1672 cs->cs_hlen = (csp->csp_auth_mlen == 0) ? SHA2_256_HASH_LEN : in cesa_newsession()
1673 csp->csp_auth_mlen; in cesa_newsession()
1679 if (csp->csp_cipher_key != NULL) { in cesa_newsession()
1680 memcpy(cs->cs_key, csp->csp_cipher_key, in cesa_newsession()
1681 csp->csp_cipher_klen); in cesa_newsession()
1682 if (csp->csp_cipher_alg == CRYPTO_AES_CBC) in cesa_newsession()
1683 error = cesa_prep_aes_key(cs, csp); in cesa_newsession()
1687 if (csp->csp_auth_key != NULL) in cesa_newsession()
1688 cesa_set_mkey(cs, csp->csp_auth_alg, csp->csp_auth_key, in cesa_newsession()
1689 csp->csp_auth_klen); in cesa_newsession()
1697 const struct crypto_session_params *csp; in cesa_process() local
1707 csp = crypto_get_params(crp->crp_session); in cesa_process()
1747 if (csp->csp_cipher_alg != 0) in cesa_process()
1752 csp->csp_cipher_klen); in cesa_process()
1753 if (csp->csp_cipher_alg == CRYPTO_AES_CBC) in cesa_process()
1754 error = cesa_prep_aes_key(cs, csp); in cesa_process()
1758 cesa_set_mkey(cs, csp->csp_auth_alg, crp->crp_auth_key, in cesa_process()
1759 csp->csp_auth_klen); in cesa_process()
1763 error = cesa_create_chain(sc, csp, cr); in cesa_process()