/freebsd/contrib/nvi/vi/ |
H A D | getc.c | 42 cs_init(SCR *sp, VCS *csp) in cs_init() argument 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() 52 csp->cs_cno = 0; in cs_init() 53 csp->cs_flags = CS_EMP; in cs_init() 55 csp->cs_flags = 0; in cs_init() 56 csp->cs_ch = csp->cs_bp[csp->cs_cno]; in cs_init() 68 cs_next(SCR *sp, VCS *csp) in cs_next() argument 72 switch (csp->cs_flags) { in cs_next() 75 if (db_get(sp, ++csp->cs_lno, 0, &p, &csp->cs_len)) { in cs_next() [all …]
|
/freebsd/sys/crypto/openssl/ |
H A D | ossl.c | 105 ossl_lookup_hash(const struct crypto_session_params *csp) in ossl_lookup_hash() argument 108 switch (csp->csp_auth_alg) { in ossl_lookup_hash() 132 ossl_lookup_cipher(const struct crypto_session_params *csp) in ossl_lookup_cipher() argument 135 switch (csp->csp_cipher_alg) { in ossl_lookup_cipher() 137 switch (csp->csp_cipher_klen * 8) { in ossl_lookup_cipher() 147 switch (csp->csp_cipher_klen * 8) { in ossl_lookup_cipher() 157 if (csp->csp_cipher_klen != CHACHA_KEY_SIZE) in ossl_lookup_cipher() 166 ossl_probesession(device_t dev, const struct crypto_session_params *csp) in ossl_probesession() argument 170 if ((csp->csp_flags & ~(CSP_F_SEPARATE_OUTPUT | CSP_F_SEPARATE_AAD)) != in ossl_probesession() 173 switch (csp in ossl_probesession() 217 ossl_newsession_hash(struct ossl_session * s,const struct crypto_session_params * csp) ossl_newsession_hash() argument 250 ossl_newsession_cipher(struct ossl_session * s,const struct crypto_session_params * csp) ossl_newsession_cipher() argument 283 ossl_newsession(device_t dev,crypto_session_t cses,const struct crypto_session_params * csp) ossl_newsession() argument 313 ossl_process_hash(struct ossl_session * s,struct cryptop * crp,const struct crypto_session_params * csp) ossl_process_hash() argument 381 ossl_process_cipher(struct ossl_session * s,struct cryptop * crp,const struct crypto_session_params * csp) ossl_process_cipher() argument 388 ossl_process_eta(struct ossl_session * s,struct cryptop * crp,const struct crypto_session_params * csp) ossl_process_eta() argument 407 ossl_process_aead(struct ossl_session * s,struct cryptop * crp,const struct crypto_session_params * csp) ossl_process_aead() argument 422 const struct crypto_session_params *csp; ossl_process() local [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() 179 crypto_read_iv(crp, counter + (CHACHA_CTR_SIZE - csp->csp_ivlen) / 4); 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() 289 crypto_copyback(crp, crp->crp_digest_start, csp->csp_auth_mlen == 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 [all …]
|
/freebsd/sys/libkern/ |
H A D | iconv.c | 79 static void iconv_unregister_cspair(struct iconv_cspair *csp); 84 struct iconv_cspair *csp; in iconv_mod_unload() local 87 TAILQ_FOREACH(csp, &iconv_cslist, cp_link) { in iconv_mod_unload() 88 if (csp->cp_refcount) { in iconv_mod_unload() 94 while ((csp = TAILQ_FIRST(&iconv_cslist)) != NULL) in iconv_mod_unload() 95 iconv_unregister_cspair(csp); in iconv_mod_unload() 168 struct iconv_cspair *csp; in iconv_lookupcs() local 170 TAILQ_FOREACH(csp, &iconv_cslist, cp_link) { in iconv_lookupcs() 171 if (strcasecmp(csp->cp_to, to) == 0 && in iconv_lookupcs() 172 strcasecmp(csp->cp_from, from) == 0) { in iconv_lookupcs() [all …]
|
/freebsd/sys/opencrypto/ |
H A D | crypto.c | 134 struct crypto_session_params csp; member 489 return (&crypto_session->csp); in crypto_get_params() 493 crypto_auth_hash(const struct crypto_session_params *csp) in crypto_auth_hash() argument 496 switch (csp->csp_auth_alg) { in crypto_auth_hash() 524 switch (csp->csp_auth_klen) { in crypto_auth_hash() 541 switch (csp->csp_auth_klen) { in crypto_auth_hash() 557 crypto_cipher(const struct crypto_session_params *csp) in crypto_cipher() argument 560 switch (csp->csp_cipher_alg) { in crypto_cipher() 598 crypto_select_driver(const struct crypto_session_params *csp, int flags) in crypto_select_driver() argument 617 error = CRYPTODEV_PROBESESSION(cap->cc_dev, csp); in crypto_select_driver() [all …]
|
H A D | cryptosoft.c | 101 const struct crypto_session_params *csp; in swcr_encdec() local 117 csp = crypto_get_params(crp->crp_session); in swcr_encdec() 135 csp->csp_cipher_klen); in swcr_encdec() 142 exf->reinit(ctx, blk, csp->csp_ivlen); in swcr_encdec() 248 const struct crypto_session_params *csp; in swcr_authcompute() local 257 csp = crypto_get_params(crp->crp_session); in swcr_authcompute() 261 csp->csp_auth_klen, &s.ctx); in swcr_authcompute() 265 csp->csp_auth_klen); in swcr_authcompute() 289 if (csp->csp_flags & CSP_F_ESN) in swcr_authcompute() 296 csp->csp_auth_klen, &s.ctx); in swcr_authcompute() [all …]
|
H A D | cryptodev.c | 334 struct crypto_session_params csp; in cse_create() local 377 memset(&csp, 0, sizeof(csp)); in cse_create() 379 csp.csp_flags |= CSP_F_SEPARATE_OUTPUT; in cse_create() 381 csp.csp_auth_alg = mac; in cse_create() 382 csp.csp_auth_klen = sop->mackeylen; in cse_create() 385 csp.csp_cipher_alg = sop->cipher; in cse_create() 386 csp.csp_cipher_klen = sop->keylen; in cse_create() 388 thash = crypto_auth_hash(&csp); in cse_create() 389 txform = crypto_cipher(&csp); in cse_create() 396 csp.csp_mode = CSP_MODE_AEAD; in cse_create() [all …]
|
/freebsd/sys/crypto/aesni/ |
H A D | aesni.c | 70 const struct crypto_session_params *csp); 73 const struct crypto_session_params *csp); 75 const struct crypto_session_params *csp); 153 const struct crypto_session_params *csp) in aesni_auth_supported() argument 159 switch (csp->csp_auth_alg) { in aesni_auth_supported() 176 const struct crypto_session_params *csp) in aesni_cipher_supported() argument 182 switch (csp->csp_cipher_alg) { in aesni_cipher_supported() 185 switch (csp->csp_cipher_klen * 8) { in aesni_cipher_supported() 194 if (csp->csp_ivlen != AES_BLOCK_LEN) in aesni_cipher_supported() 198 switch (csp->csp_cipher_klen * 8) { in aesni_cipher_supported() [all …]
|
/freebsd/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/sys/crypto/armv8/ |
H A D | armv8_crypto.c | 149 const struct crypto_session_params *csp) in armv8_crypto_probesession() argument 155 if ((csp->csp_flags & ~(SUPPORTED_SES)) != 0) in armv8_crypto_probesession() 158 switch (csp->csp_mode) { in armv8_crypto_probesession() 160 switch (csp->csp_cipher_alg) { in armv8_crypto_probesession() 164 if (csp->csp_auth_mlen != 0 && in armv8_crypto_probesession() 165 csp->csp_auth_mlen != GMAC_DIGEST_LEN) in armv8_crypto_probesession() 167 switch (csp->csp_cipher_klen * 8) { in armv8_crypto_probesession() 181 switch (csp->csp_cipher_alg) { in armv8_crypto_probesession() 183 if (csp->csp_ivlen != AES_BLOCK_LEN) in armv8_crypto_probesession() 185 switch (csp->csp_cipher_klen * 8) { in armv8_crypto_probesession() [all …]
|
/freebsd/sys/crypto/blake2/ |
H A D | blake2_cryptodev.c | 53 const struct crypto_session_params *csp); 107 blake2_probesession(device_t dev, const struct crypto_session_params *csp) in blake2_probesession() argument 110 if (csp->csp_flags != 0) in blake2_probesession() 112 switch (csp->csp_mode) { in blake2_probesession() 114 switch (csp->csp_auth_alg) { in blake2_probesession() 130 const struct crypto_session_params *csp) in blake2_newsession() argument 137 error = blake2_cipher_setup(ses, csp); in blake2_newsession() 184 blake2_check_klen(const struct crypto_session_params *csp, unsigned klen) in blake2_check_klen() argument 187 if (csp->csp_auth_alg == CRYPTO_BLAKE2S) in blake2_check_klen() 195 const struct crypto_session_params *csp) in blake2_cipher_setup() argument [all …]
|
/freebsd/sys/crypto/via/ |
H A D | padlock.c | 122 padlock_probesession(device_t dev, const struct crypto_session_params *csp) in padlock_probesession() argument 125 if (csp->csp_flags != 0) in padlock_probesession() 136 switch (csp->csp_mode) { in padlock_probesession() 138 if (!padlock_hash_check(csp)) in padlock_probesession() 142 switch (csp->csp_cipher_alg) { in padlock_probesession() 144 if (csp->csp_ivlen != AES_BLOCK_LEN) in padlock_probesession() 160 const struct crypto_session_params *csp) in padlock_newsession() argument 168 error = padlock_cipher_setup(ses, csp); in padlock_newsession() 174 if (csp->csp_mode == CSP_MODE_ETA) { in padlock_newsession() 177 error = padlock_hash_setup(ses, csp); in padlock_newsession() [all …]
|
H A D | padlock_cipher.c | 119 const struct crypto_session_params *csp) in padlock_cipher_setup() argument 123 if (csp->csp_cipher_klen != 16 && csp->csp_cipher_klen != 24 && in padlock_cipher_setup() 124 csp->csp_cipher_klen != 32) { in padlock_cipher_setup() 133 switch (csp->csp_cipher_klen * 8) { in padlock_cipher_setup() 151 if (csp->csp_cipher_key != NULL) { in padlock_cipher_setup() 152 padlock_cipher_key_setup(ses, csp->csp_cipher_key, in padlock_cipher_setup() 153 csp->csp_cipher_klen); in padlock_cipher_setup() 182 const struct crypto_session_params *csp) in padlock_cipher_process() argument 199 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/sys/crypto/ccp/ |
H A D | ccp.c | 313 const struct crypto_session_params *csp) in ccp_auth_supported() argument 318 switch (csp->csp_auth_alg) { in ccp_auth_supported() 323 if (csp->csp_auth_key == NULL) in ccp_auth_supported() 334 const struct crypto_session_params *csp) in ccp_cipher_supported() argument 339 switch (csp->csp_cipher_alg) { in ccp_cipher_supported() 341 if (csp->csp_ivlen != AES_BLOCK_LEN) in ccp_cipher_supported() 345 if (csp->csp_ivlen != AES_BLOCK_LEN) in ccp_cipher_supported() 349 if (csp->csp_ivlen != AES_XTS_IV_LEN) in ccp_cipher_supported() 355 return (ccp_aes_check_keylen(csp->csp_cipher_alg, in ccp_cipher_supported() 356 csp->csp_cipher_klen)); in ccp_cipher_supported() [all …]
|
/freebsd/sys/dev/sec/ |
H A D | sec.c | 87 const struct crypto_session_params *csp); 89 const struct crypto_session_params *csp); 92 struct sec_desc *desc, const struct crypto_session_params *csp, 95 struct sec_desc *desc, const struct crypto_session_params *csp, 101 static bool sec_aesu_newsession(const struct crypto_session_params *csp); 103 const struct crypto_session_params *csp, struct sec_desc *desc, 108 static int sec_mdeu_config(const struct crypto_session_params *csp, 110 static bool sec_mdeu_newsession(const struct crypto_session_params *csp); 112 const struct crypto_session_params *csp, struct sec_desc *desc, 1132 sec_cipher_supported(const struct crypto_session_params *csp) in sec_cipher_supported() argument [all …]
|
/freebsd/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/sys/kgssapi/krb5/ |
H A D | kcrypto_aes.c | 77 struct crypto_session_params csp; in aes_set_key() local 90 memset(&csp, 0, sizeof(csp)); in aes_set_key() 91 csp.csp_mode = CSP_MODE_DIGEST; in aes_set_key() 92 csp.csp_auth_alg = CRYPTO_SHA1_HMAC; in aes_set_key() 93 csp.csp_auth_klen = ks->ks_class->ec_keybits / 8; in aes_set_key() 94 csp.csp_auth_mlen = 12; in aes_set_key() 95 csp.csp_auth_key = ks->ks_key; in aes_set_key() 96 crypto_newsession(&as->as_session_sha1, &csp, in aes_set_key() 99 memset(&csp, 0, sizeof(csp)); in aes_set_key() 100 csp.csp_mode = CSP_MODE_CIPHER; in aes_set_key() [all …]
|
/freebsd/sys/dev/glxsb/ |
H A D | glxsb_hash.c | 106 const struct crypto_session_params *csp) in glxsb_hash_setup() argument 109 ses->ses_axf = crypto_auth_hash(csp); in glxsb_hash_setup() 110 if (csp->csp_auth_mlen == 0) in glxsb_hash_setup() 113 ses->ses_mlen = csp->csp_auth_mlen; in glxsb_hash_setup() 124 if (csp->csp_auth_key != NULL) { in glxsb_hash_setup() 125 glxsb_hash_key_setup(ses, csp->csp_auth_key, in glxsb_hash_setup() 126 csp->csp_auth_klen); in glxsb_hash_setup() 133 const struct crypto_session_params *csp, struct cryptop *crp) in glxsb_hash_process() argument 139 csp->csp_auth_klen); in glxsb_hash_process()
|
H A D | glxsb.c | 480 glxsb_crypto_probesession(device_t dev, const struct crypto_session_params *csp) in glxsb_crypto_probesession() argument 483 if (csp->csp_flags != 0) in glxsb_crypto_probesession() 491 switch (csp->csp_mode) { in glxsb_crypto_probesession() 493 switch (csp->csp_auth_alg) { in glxsb_crypto_probesession() 506 switch (csp->csp_cipher_alg) { in glxsb_crypto_probesession() 508 if (csp->csp_cipher_klen * 8 != 128) in glxsb_crypto_probesession() 522 const struct crypto_session_params *csp) in glxsb_crypto_newsession() argument 531 if (csp->csp_cipher_key != NULL) in glxsb_crypto_newsession() 532 bcopy(csp->csp_cipher_key, ses->ses_key, sizeof(ses->ses_key)); in glxsb_crypto_newsession() 534 if (csp->csp_auth_alg != 0) { in glxsb_crypto_newsession() [all …]
|
/freebsd/sys/dev/cesa/ |
H A D | cesa.c | 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() [all …]
|
/freebsd/sys/geom/eli/ |
H A D | g_eli_crypto.c | 61 struct crypto_session_params csp; in g_eli_crypto_cipher() local 69 memset(&csp, 0, sizeof(csp)); in g_eli_crypto_cipher() 70 csp.csp_mode = CSP_MODE_CIPHER; in g_eli_crypto_cipher() 71 csp.csp_cipher_alg = algo; in g_eli_crypto_cipher() 72 csp.csp_ivlen = g_eli_ivlen(algo); in g_eli_crypto_cipher() 73 csp.csp_cipher_key = key; in g_eli_crypto_cipher() 74 csp.csp_cipher_klen = keysize / 8; in g_eli_crypto_cipher() 75 error = crypto_newsession(&sid, &csp, CRYPTOCAP_F_SOFTWARE); in g_eli_crypto_cipher()
|
/freebsd/sys/dev/safexcel/ |
H A D | safexcel.c | 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() [all …]
|
/freebsd/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()
|
/freebsd/sys/dev/safe/ |
H A D | safe.c | 657 const struct crypto_session_params *csp) in safe_auth_supported() argument 660 switch (csp->csp_auth_alg) { in safe_auth_supported() 673 const struct crypto_session_params *csp) in safe_cipher_supported() argument 676 switch (csp->csp_cipher_alg) { in safe_cipher_supported() 680 if (csp->csp_ivlen != 16) in safe_cipher_supported() 682 if (csp->csp_cipher_klen != 16 && in safe_cipher_supported() 683 csp->csp_cipher_klen != 24 && in safe_cipher_supported() 684 csp->csp_cipher_klen != 32) in safe_cipher_supported() 692 safe_probesession(device_t dev, const struct crypto_session_params *csp) in safe_probesession() argument 696 if (csp->csp_flags != 0) in safe_probesession() [all …]
|