• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/sys/mips/cavium/cryptocteon/

Lines Matching defs:csp

100 cryptocteon_auth_supported(const struct crypto_session_params *csp)
104 switch (csp->csp_auth_alg) {
112 if (csp->csp_auth_klen > hash_len)
118 cryptocteon_cipher_supported(const struct crypto_session_params *csp)
121 switch (csp->csp_cipher_alg) {
123 if (csp->csp_ivlen != 16)
125 if (csp->csp_cipher_klen != 16 &&
126 csp->csp_cipher_klen != 24 &&
127 csp->csp_cipher_klen != 32)
138 cryptocteon_probesession(device_t dev, const struct crypto_session_params *csp)
141 if (csp->csp_flags != 0)
143 switch (csp->csp_mode) {
145 if (!cryptocteon_auth_supported(csp))
149 if (!cryptocteon_cipher_supported(csp))
153 if (!cryptocteon_auth_supported(csp) ||
154 !cryptocteon_cipher_supported(csp))
164 cryptocteon_calc_hash(const struct crypto_session_params *csp, const char *key,
170 memcpy(hash_key, key, csp->csp_auth_klen);
171 octo_calc_hash(csp->csp_auth_alg == CRYPTO_SHA1_HMAC, hash_key,
178 const struct crypto_session_params *csp)
187 ocd->octo_encklen = csp->csp_cipher_klen;
188 if (csp->csp_cipher_key != NULL)
189 memcpy(ocd->octo_enckey, csp->csp_cipher_key,
192 if (csp->csp_auth_key != NULL)
193 cryptocteon_calc_hash(csp, csp->csp_auth_key, ocd);
195 ocd->octo_mlen = csp->csp_auth_mlen;
196 if (csp->csp_auth_mlen == 0) {
197 switch (csp->csp_auth_alg) {
204 switch (csp->csp_mode) {
206 switch (csp->csp_auth_alg) {
214 switch (csp->csp_cipher_alg) {
222 switch (csp->csp_cipher_alg) {
224 switch (csp->csp_auth_alg) {
247 const struct crypto_session_params *csp;
263 csp = crypto_get_params(crp->crp_session);
330 if (csp->csp_cipher_alg != 0) {
334 crypto_copydata(crp, crp->crp_iv_start, csp->csp_ivlen,
381 cryptocteon_calc_hash(csp, crp->crp_auth_key, od);
390 if (csp->csp_auth_alg != 0) {