| /freebsd-14.2/contrib/nvi/vi/ |
| H A D | getc.c | 46 if (db_eget(sp, csp->cs_lno, &csp->cs_bp, &csp->cs_len, &isempty)) { in cs_init() 51 if (csp->cs_len == 0 || v_isempty(csp->cs_bp, csp->cs_len)) { in cs_init() 56 csp->cs_ch = csp->cs_bp[csp->cs_cno]; in cs_init() 86 csp->cs_ch = csp->cs_bp[csp->cs_cno = 0]; in cs_next() 91 if (csp->cs_cno == csp->cs_len - 1) in cs_next() 94 csp->cs_ch = csp->cs_bp[++csp->cs_cno]; in cs_next() 168 --csp->cs_lno, DBG_FATAL, &csp->cs_bp, &csp->cs_len)) { in cs_prev() 172 if (csp->cs_len == 0 || v_isempty(csp->cs_bp, csp->cs_len)) { in cs_prev() 177 csp->cs_cno = csp->cs_len - 1; in cs_prev() 178 csp->cs_ch = csp->cs_bp[csp->cs_cno]; in cs_prev() [all …]
|
| /freebsd-14.2/sys/crypto/openssl/ |
| H A D | ossl.c | 109 switch (csp->csp_auth_alg) { in ossl_lookup_hash() 136 switch (csp->csp_cipher_alg) { in ossl_lookup_cipher() 174 switch (csp->csp_mode) { in ossl_probesession() 222 axf = ossl_lookup_hash(csp); in ossl_newsession_hash() 224 if (csp->csp_auth_mlen == 0) in ossl_newsession_hash() 229 if (csp->csp_auth_klen == 0) { in ossl_newsession_hash() 237 csp->csp_auth_klen); in ossl_newsession_hash() 290 switch (csp->csp_mode) { in ossl_newsession() 292 ossl_newsession_hash(s, csp); in ossl_newsession() 329 csp->csp_auth_klen); in ossl_process_hash() [all …]
|
| H A D | ossl_chacha20.c | 57 const struct crypto_session_params *csp) in ossl_chacha20() argument 72 cipher_key = csp->csp_cipher_key; in ossl_chacha20() 157 const struct crypto_session_params *csp) in ossl_chacha20_poly1305_encrypt() argument 174 cipher_key = csp->csp_cipher_key; in ossl_chacha20_poly1305_encrypt() 241 if (csp->csp_ivlen == 8 && next_counter < counter[0]) { in ossl_chacha20_poly1305_encrypt() 250 if (csp->csp_ivlen == 8 && counter[0] == 0) in ossl_chacha20_poly1305_encrypt() 290 POLY1305_HASH_LEN : csp->csp_auth_mlen, tag); in ossl_chacha20_poly1305_encrypt() 303 const struct crypto_session_params *csp) in ossl_chacha20_poly1305_decrypt() argument 321 cipher_key = csp->csp_cipher_key; in ossl_chacha20_poly1305_decrypt() 366 mlen = csp->csp_auth_mlen == 0 ? POLY1305_HASH_LEN : csp->csp_auth_mlen; in ossl_chacha20_poly1305_decrypt() [all …]
|
| /freebsd-14.2/sys/libkern/ |
| H A D | iconv.c | 175 *cspp = csp; in iconv_lookupcs() 201 bzero(csp, csize); in iconv_register_cspair() 203 csp->cp_dcp = dcp; in iconv_register_cspair() 207 csp->cp_to = cp; in iconv_register_cspair() 213 csp->cp_from = cp; in iconv_register_cspair() 216 csp->cp_data = data; in iconv_register_cspair() 219 *cspp = csp; in iconv_register_cspair() 227 if (csp->cp_data) in iconv_unregister_cspair() 229 free(csp, M_ICONV); in iconv_unregister_cspair() 250 return ICONV_CONVERTER_OPEN(csp->cp_dcp, csp, NULL, handle); in iconv_open() [all …]
|
| /freebsd-14.2/sys/opencrypto/ |
| H A D | crypto.c | 757 if (csp->csp_ivlen < 0 || csp->csp_cipher_klen < 0 || in check_csp() 758 csp->csp_auth_klen < 0 || csp->csp_auth_mlen < 0) in check_csp() 760 if (csp->csp_auth_key != NULL && csp->csp_auth_klen == 0) in check_csp() 773 if (csp->csp_cipher_klen != 0 || csp->csp_ivlen != 0 || in check_csp() 805 if (csp->csp_ivlen < 7 || csp->csp_ivlen > 13) in check_csp() 850 if (csp->csp_auth_alg != 0 || csp->csp_auth_klen != 0) in check_csp() 859 if (csp->csp_ivlen < 7 || csp->csp_ivlen > 13) in check_csp() 870 if (csp->csp_ivlen != 8 && csp->csp_ivlen != 12) in check_csp() 988 res->csp = *csp; in crypto_newsession() 1276 csp = &crp->crp_session->csp; in crp_sanity() [all …]
|
| H A D | cryptosoft.c | 136 csp->csp_cipher_klen); in swcr_encdec() 266 csp->csp_auth_klen); in swcr_authcompute() 698 ivlen = csp->csp_ivlen; in swcr_ccm_cbc_mac() 767 ivlen = csp->csp_ivlen; in swcr_ccm() 1276 txf = crypto_cipher(csp); in swcr_setup_cipher() 1285 csp->csp_cipher_key, csp->csp_cipher_klen); in swcr_setup_cipher() 1304 if (csp->csp_auth_mlen < 0 || csp->csp_auth_mlen > axf->hashsize) in swcr_setup_auth() 1310 if (csp->csp_auth_klen == 0 || csp->csp_auth_key != NULL) { in swcr_setup_auth() 1459 txf = crypto_cipher(csp); in swcr_cipher_supported() 1475 switch (csp->csp_mode) { in swcr_probesession() [all …]
|
| H A D | cryptodev.c | 378 memset(&csp, 0, sizeof(csp)); in cse_create() 382 csp.csp_auth_alg = mac; in cse_create() 390 txform = crypto_cipher(&csp); in cse_create() 409 switch (csp.csp_mode) { in cse_create() 433 csp.csp_cipher_key = key; in cse_create() 455 csp.csp_auth_key = mackey; in cse_create() 465 if (csp.csp_ivlen == 0) { in cse_create() 471 csp.csp_ivlen = sop->ivlen; in cse_create() 509 cse->ivsize = csp.csp_ivlen; in cse_create() 687 switch (csp->csp_mode) { in cryptodev_op() [all …]
|
| /freebsd-14.2/sys/crypto/aesni/ |
| H A D | aesni.c | 160 switch (csp->csp_auth_alg) { in aesni_auth_supported() 183 switch (csp->csp_cipher_alg) { in aesni_cipher_supported() 227 switch (csp->csp_mode) { in aesni_probesession() 292 switch (csp->csp_mode) { in aesni_newsession() 509 switch (csp->csp_auth_alg) { in aesni_cipher_setup() 540 if (csp->csp_auth_mlen == 0) in aesni_cipher_setup() 563 aesni_cipher_setup_common(ses, csp, csp->csp_cipher_key, in aesni_cipher_setup() 564 csp->csp_cipher_klen); in aesni_cipher_setup() 683 csp->csp_cipher_klen); in aesni_cipher_crypt() 786 key = csp->csp_auth_key; in aesni_cipher_mac() [all …]
|
| /freebsd-14.2/sys/dev/qat/include/ |
| H A D | qat_ocf_utils.h | 20 is_gmac_exception(const struct crypto_session_params *csp) in is_gmac_exception() argument 22 if (CSP_MODE_DIGEST == csp->csp_mode) in is_gmac_exception() 23 if (CRYPTO_AES_NIST_GMAC == csp->csp_auth_alg) in is_gmac_exception() 30 is_sep_aad_supported(const struct crypto_session_params *csp) in is_sep_aad_supported() argument 32 if (CPA_TRUE == is_gmac_exception(csp)) in is_sep_aad_supported() 35 if (CSP_MODE_AEAD == csp->csp_mode) in is_sep_aad_supported() 36 if (CRYPTO_AES_NIST_GCM_16 == csp->csp_cipher_alg || in is_sep_aad_supported() 37 CRYPTO_AES_NIST_GMAC == csp->csp_cipher_alg) in is_sep_aad_supported() 44 is_use_sep_digest(const struct crypto_session_params *csp) in is_use_sep_digest() argument 50 if (CSP_MODE_DIGEST == csp->csp_mode || CSP_MODE_ETA == csp->csp_mode || in is_use_sep_digest() [all …]
|
| /freebsd-14.2/sys/crypto/armv8/ |
| H A D | armv8_crypto.c | 159 switch (csp->csp_mode) { in armv8_crypto_probesession() 161 switch (csp->csp_cipher_alg) { in armv8_crypto_probesession() 165 if (csp->csp_auth_mlen != 0 && in armv8_crypto_probesession() 168 switch (csp->csp_cipher_klen * 8) { in armv8_crypto_probesession() 182 switch (csp->csp_cipher_alg) { in armv8_crypto_probesession() 186 switch (csp->csp_cipher_klen * 8) { in armv8_crypto_probesession() 198 switch (csp->csp_cipher_klen * 8) { in armv8_crypto_probesession() 268 error = armv8_crypto_cipher_setup(ses, csp, csp->csp_cipher_key, in armv8_crypto_newsession() 269 csp->csp_cipher_klen); in armv8_crypto_newsession() 341 csp->csp_cipher_klen); in armv8_crypto_cipher_process() [all …]
|
| /freebsd-14.2/sys/crypto/blake2/ |
| H A D | blake2_cryptodev.c | 111 if (csp->csp_flags != 0) in blake2_probesession() 113 switch (csp->csp_mode) { in blake2_probesession() 115 switch (csp->csp_auth_alg) { in blake2_probesession() 202 if (!blake2_check_klen(csp, csp->csp_auth_klen)) in blake2_cipher_setup() 205 if (csp->csp_auth_mlen < 0) in blake2_cipher_setup() 208 switch (csp->csp_auth_alg) { in blake2_cipher_setup() 222 if (csp->csp_auth_mlen == 0) in blake2_cipher_setup() 225 ses->mlen = csp->csp_auth_mlen; in blake2_cipher_setup() 268 key = csp->csp_auth_key; in blake2_cipher_process() 269 klen = csp->csp_auth_klen; in blake2_cipher_process() [all …]
|
| /freebsd-14.2/sys/crypto/via/ |
| H A D | padlock.c | 126 if (csp->csp_flags != 0) in padlock_probesession() 137 switch (csp->csp_mode) { in padlock_probesession() 139 if (!padlock_hash_check(csp)) in padlock_probesession() 143 switch (csp->csp_cipher_alg) { in padlock_probesession() 145 if (csp->csp_ivlen != AES_BLOCK_LEN) in padlock_probesession() 169 error = padlock_cipher_setup(ses, csp); in padlock_newsession() 175 if (csp->csp_mode == CSP_MODE_ETA) { in padlock_newsession() 178 error = padlock_hash_setup(ses, csp); in padlock_newsession() 208 const struct crypto_session_params *csp; in padlock_process() local 221 if (csp->csp_mode == CSP_MODE_ETA && in padlock_process() [all …]
|
| H A D | padlock_cipher.c | 120 const struct crypto_session_params *csp) in padlock_cipher_setup() argument 124 if (csp->csp_cipher_klen != 16 && csp->csp_cipher_klen != 24 && in padlock_cipher_setup() 125 csp->csp_cipher_klen != 32) { in padlock_cipher_setup() 134 switch (csp->csp_cipher_klen * 8) { in padlock_cipher_setup() 152 if (csp->csp_cipher_key != NULL) { in padlock_cipher_setup() 153 padlock_cipher_key_setup(ses, csp->csp_cipher_key, in padlock_cipher_setup() 154 csp->csp_cipher_klen); in padlock_cipher_setup() 183 const struct crypto_session_params *csp) in padlock_cipher_process() argument 200 csp->csp_cipher_klen); in padlock_cipher_process()
|
| H A D | padlock.h | 72 const struct crypto_session_params *csp); 74 struct cryptop *crp, const struct crypto_session_params *csp); 75 bool padlock_hash_check(const struct crypto_session_params *csp); 77 const struct crypto_session_params *csp); 79 struct cryptop *crp, const struct crypto_session_params *csp);
|
| /freebsd-14.2/sys/crypto/ccp/ |
| H A D | ccp.c | 318 switch (csp->csp_auth_alg) { in ccp_auth_supported() 356 csp->csp_cipher_klen)); in ccp_cipher_supported() 364 if (csp->csp_flags != 0) in ccp_probesession() 367 switch (csp->csp_mode) { in ccp_probesession() 410 switch (csp->csp_auth_alg) { in ccp_newsession() 470 switch (csp->csp_mode) { in ccp_newsession() 486 if (csp->csp_auth_mlen == 0) in ccp_newsession() 493 if (csp->csp_auth_mlen == 0) in ccp_newsession() 497 ccp_init_hmac_digest(s, csp->csp_auth_key, csp->csp_auth_klen); in ccp_newsession() 503 csp->csp_cipher_key, csp->csp_cipher_klen); in ccp_newsession() [all …]
|
| /freebsd-14.2/contrib/byacc/ |
| H A D | closure.c | 111 Value_t *csp; in closure() local 126 for (csp = nucleus; csp < csend; ++csp) in closure() 128 int symbol = ritem[*csp]; in closure() 141 csp = nucleus; in closure() 153 while (csp < csend && *csp < itemno) in closure() 154 *itemsetend++ = *csp++; in closure() 156 while (csp < csend && *csp == itemno) in closure() 157 ++csp; in closure() 164 while (csp < csend) in closure() 165 *itemsetend++ = *csp++; in closure()
|
| /freebsd-14.2/sys/dev/sec/ |
| H A D | sec.c | 1146 if (csp->csp_cipher_klen == 0 || csp->csp_cipher_klen > SEC_MAX_KEY_LEN) in sec_cipher_supported() 1157 switch (csp->csp_auth_alg) { in sec_auth_supported() 1181 if (csp->csp_flags != 0) in sec_probesession() 1183 switch (csp->csp_mode) { in sec_probesession() 1193 if (!sec_auth_supported(sc, csp) || !sec_cipher_supported(csp)) in sec_probesession() 1213 if (eu->sem_newsession(csp)) in sec_newsession() 1221 memcpy(ses->ss_key, csp->csp_cipher_key, csp->csp_cipher_klen); in sec_newsession() 1225 memcpy(ses->ss_mkey, csp->csp_auth_key, csp->csp_auth_klen); in sec_newsession() 1227 if (csp->csp_auth_alg != 0) { in sec_newsession() 1228 if (csp->csp_auth_mlen == 0) in sec_newsession() [all …]
|
| /freebsd-14.2/sys/dev/qat/qat/ |
| H A D | qat_ocf.c | 159 switch (csp->csp_mode) { in qat_ocf_probesession() 257 if (NULL == csp) { in qat_ocf_session_init() 270 csp->csp_cipher_key; in qat_ocf_session_init() 272 csp->csp_cipher_klen; in qat_ocf_session_init() 280 csp->csp_auth_key; in qat_ocf_session_init() 282 csp->csp_auth_klen; in qat_ocf_session_init() 293 if (csp->csp_cipher_alg) { in qat_ocf_session_init() 326 if (csp->csp_auth_alg) { in qat_ocf_session_init() 407 csp->csp_auth_mlen; in qat_ocf_session_init() 429 switch (csp->csp_mode) { in qat_ocf_session_init() [all …]
|
| /freebsd-14.2/sys/kgssapi/krb5/ |
| H A D | kcrypto_aes.c | 78 struct crypto_session_params csp; in aes_set_key() local 91 memset(&csp, 0, sizeof(csp)); in aes_set_key() 92 csp.csp_mode = CSP_MODE_DIGEST; in aes_set_key() 93 csp.csp_auth_alg = CRYPTO_SHA1_HMAC; in aes_set_key() 95 csp.csp_auth_mlen = 12; in aes_set_key() 96 csp.csp_auth_key = ks->ks_key; in aes_set_key() 100 memset(&csp, 0, sizeof(csp)); in aes_set_key() 101 csp.csp_mode = CSP_MODE_CIPHER; in aes_set_key() 102 csp.csp_cipher_alg = CRYPTO_AES_CBC; in aes_set_key() 104 csp.csp_cipher_key = ks->ks_key; in aes_set_key() [all …]
|
| /freebsd-14.2/sys/dev/glxsb/ |
| H A D | glxsb_hash.c | 107 const struct crypto_session_params *csp) in glxsb_hash_setup() argument 110 ses->ses_axf = crypto_auth_hash(csp); in glxsb_hash_setup() 111 if (csp->csp_auth_mlen == 0) in glxsb_hash_setup() 114 ses->ses_mlen = csp->csp_auth_mlen; in glxsb_hash_setup() 125 if (csp->csp_auth_key != NULL) { in glxsb_hash_setup() 126 glxsb_hash_key_setup(ses, csp->csp_auth_key, in glxsb_hash_setup() 127 csp->csp_auth_klen); in glxsb_hash_setup() 134 const struct crypto_session_params *csp, struct cryptop *crp) in glxsb_hash_process() argument 140 csp->csp_auth_klen); in glxsb_hash_process()
|
| H A D | glxsb.c | 484 if (csp->csp_flags != 0) in glxsb_crypto_probesession() 492 switch (csp->csp_mode) { in glxsb_crypto_probesession() 494 switch (csp->csp_auth_alg) { in glxsb_crypto_probesession() 507 switch (csp->csp_cipher_alg) { in glxsb_crypto_probesession() 509 if (csp->csp_cipher_klen * 8 != 128) in glxsb_crypto_probesession() 532 if (csp->csp_cipher_key != NULL) in glxsb_crypto_newsession() 535 if (csp->csp_auth_alg != 0) { in glxsb_crypto_newsession() 536 error = glxsb_hash_setup(ses, csp); in glxsb_crypto_newsession() 709 const struct crypto_session_params *csp; in glxsb_crypto_task() local 719 if (csp->csp_mode == CSP_MODE_ETA && in glxsb_crypto_task() [all …]
|
| /freebsd-14.2/sys/geom/eli/ |
| H A D | g_eli_crypto.c | 62 struct crypto_session_params csp; in g_eli_crypto_cipher() local 70 memset(&csp, 0, sizeof(csp)); in g_eli_crypto_cipher() 71 csp.csp_mode = CSP_MODE_CIPHER; in g_eli_crypto_cipher() 72 csp.csp_cipher_alg = algo; in g_eli_crypto_cipher() 73 csp.csp_ivlen = g_eli_ivlen(algo); in g_eli_crypto_cipher() 74 csp.csp_cipher_key = key; in g_eli_crypto_cipher() 75 csp.csp_cipher_klen = keysize / 8; in g_eli_crypto_cipher() 76 error = crypto_newsession(&sid, &csp, CRYPTOCAP_F_SOFTWARE); in g_eli_crypto_cipher()
|
| /freebsd-14.2/sys/dev/cesa/ |
| H A D | cesa.c | 800 csp->csp_cipher_klen); in cesa_create_chain() 825 switch (csp->csp_mode) { in cesa_create_chain() 1610 if (csp->csp_flags != 0) in cesa_probesession() 1612 switch (csp->csp_mode) { in cesa_probesession() 1660 csp->csp_auth_mlen; in cesa_newsession() 1666 csp->csp_auth_mlen; in cesa_newsession() 1674 csp->csp_auth_mlen; in cesa_newsession() 1682 csp->csp_cipher_klen); 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() [all …]
|
| /freebsd-14.2/sys/dev/safexcel/ |
| H A D | safexcel.c | 1392 aklen = csp->csp_auth_klen; in safexcel_set_context() 1425 switch (csp->csp_auth_alg) { in safexcel_set_context() 1442 alg = csp->csp_cipher_alg; in safexcel_set_context() 1444 alg = csp->csp_auth_alg; in safexcel_set_context() 1709 L = 15 - csp->csp_ivlen; in safexcel_instr_ccm() 1899 akey = csp->csp_auth_key; in safexcel_set_token() 1951 if (csp->csp_auth_alg != 0) in safexcel_set_token() 2273 if (csp->csp_flags != 0) in safexcel_probesession() 2276 switch (csp->csp_mode) { in safexcel_probesession() 2511 CRYPTO_OP_ENCRYPT, csp->csp_cipher_key, csp->csp_auth_key, in safexcel_newsession() [all …]
|
| /freebsd-14.2/sys/contrib/openzfs/cmd/zed/ |
| H A D | zed_exec.c | 330 const char **csp; in zed_exec_process() local 351 csp = class_strings; in zed_exec_process() 354 *csp++ = class; in zed_exec_process() 357 *csp++ = subclass; in zed_exec_process() 360 *csp++ = allclass; in zed_exec_process() 362 *csp = NULL; in zed_exec_process() 368 for (csp = class_strings; *csp; csp++) { in zed_exec_process() 369 n = strlen(*csp); in zed_exec_process() 370 if ((strncmp(z, *csp, n) == 0) && !isalpha(z[n])) in zed_exec_process()
|