/freebsd/contrib/bearssl/src/symcipher/ |
H A D | aes_pwr8_cbcenc.c | 43 long cc; in cbcenc_128() local 51 cc = 0; in cbcenc_128() 57 lxvw4x(32, %[cc], %[sk]) in cbcenc_128() 58 addi(%[cc], %[cc], 16) in cbcenc_128() 59 lxvw4x(33, %[cc], %[sk]) in cbcenc_128() 60 addi(%[cc], %[cc], 16) in cbcenc_128() 61 lxvw4x(34, %[cc], %[sk]) in cbcenc_128() 62 addi(%[cc], %[cc], 16) in cbcenc_128() 63 lxvw4x(35, %[cc], %[sk]) in cbcenc_128() 64 addi(%[cc], %[cc], 16) in cbcenc_128() [all …]
|
H A D | aes_pwr8.c | 38 long cc; in key_schedule_128() local 47 cc = 0; in key_schedule_128() 93 li(%[cc], 10) in key_schedule_128() 94 mtctr(%[cc]) in key_schedule_128() 136 : [sk] "+b" (sk), [cc] "+b" (cc) in key_schedule_128() 148 long cc; in key_schedule_192() local 156 cc = 0; in key_schedule_192() 182 li(%[cc], 8) in key_schedule_192() 184 lxvw4x(35, %[cc], %[key]) in key_schedule_192() 199 li(%[cc], 8) in key_schedule_192() [all …]
|
/freebsd/contrib/bearssl/src/ssl/ |
H A D | ssl_lru.c | 96 static inline uint32_t get_ ## name(br_ssl_session_cache_lru *cc, uint32_t x) \ 98 return br_dec32be(cc->store + x + (off)); \ 100 static inline void set_ ## name(br_ssl_session_cache_lru *cc, \ 103 br_enc32be(cc->store + x + (off), val); \ 126 mask_id(br_ssl_session_cache_lru *cc, in GETSET() 133 br_hmac_key_init(&hkc, cc->hash, cc->index_key, sizeof cc->index_key); in GETSET() 148 find_node(br_ssl_session_cache_lru *cc, const unsigned char *id, in find_node() argument 153 x = cc->root; in find_node() 158 r = memcmp(id, cc->store + x + SESSION_ID_OFF, SESSION_ID_LEN); in find_node() 161 x = get_left(cc, x); in find_node() [all …]
|
H A D | ssl_engine.c | 469 rng_init(br_ssl_engine_context *cc) in rng_init() argument 473 if (cc->rng_init_done != 0) { in rng_init() 489 h = br_multihash_getimpl(&cc->mhash, br_sha256_ID); in rng_init() 491 h = br_multihash_getimpl(&cc->mhash, br_sha384_ID); in rng_init() 493 h = br_multihash_getimpl(&cc->mhash, in rng_init() 496 br_ssl_engine_fail(cc, BR_ERR_BAD_STATE); in rng_init() 501 br_hmac_drbg_init(&cc->rng, h, NULL, 0); in rng_init() 502 cc->rng_init_done = 1; in rng_init() 508 br_ssl_engine_init_rand(br_ssl_engine_context *cc) in br_ssl_engine_init_rand() argument 510 if (!rng_init(cc)) { in br_ssl_engine_init_rand() [all …]
|
H A D | ssl_rec_cbc.c | 28 in_cbc_init(br_sslrec_in_cbc_context *cc, in in_cbc_init() argument 35 cc->vtable = &br_sslrec_in_cbc_vtable; in in_cbc_init() 36 cc->seq = 0; in in_cbc_init() 37 bc_impl->init(&cc->bc.vtable, bc_key, bc_key_len); in in_cbc_init() 38 br_hmac_key_init(&cc->mac, dig_impl, mac_key, mac_key_len); in in_cbc_init() 39 cc->mac_len = mac_out_len; in in_cbc_init() 41 memset(cc->iv, 0, sizeof cc->iv); in in_cbc_init() 42 cc->explicit_IV = 1; in in_cbc_init() 44 memcpy(cc->iv, iv, bc_impl->block_size); in in_cbc_init() 45 cc->explicit_IV = 0; in in_cbc_init() [all …]
|
H A D | ssl_rec_gcm.c | 33 gen_gcm_init(br_sslrec_gcm_context *cc, in gen_gcm_init() argument 41 cc->seq = 0; in gen_gcm_init() 42 bc_impl->init(&cc->bc.vtable, key, key_len); in gen_gcm_init() 43 cc->gh = gh_impl; in gen_gcm_init() 44 memcpy(cc->iv, iv, sizeof cc->iv); in gen_gcm_init() 45 memset(cc->h, 0, sizeof cc->h); in gen_gcm_init() 47 bc_impl->run(&cc->bc.vtable, tmp, 0, cc->h, sizeof cc->h); in gen_gcm_init() 51 in_gcm_init(br_sslrec_gcm_context *cc, in in_gcm_init() argument 57 cc->vtable.in = &br_sslrec_in_gcm_vtable; in in_gcm_init() 58 gen_gcm_init(cc, bc_impl, key, key_len, gh_impl, iv); in in_gcm_init() [all …]
|
H A D | ssl_rec_ccm.c | 33 gen_ccm_init(br_sslrec_ccm_context *cc, in gen_ccm_init() argument 38 cc->seq = 0; in gen_ccm_init() 39 bc_impl->init(&cc->bc.vtable, key, key_len); in gen_ccm_init() 40 memcpy(cc->iv, iv, sizeof cc->iv); in gen_ccm_init() 41 cc->tag_len = tag_len; in gen_ccm_init() 45 in_ccm_init(br_sslrec_ccm_context *cc, in in_ccm_init() argument 50 cc->vtable.in = &br_sslrec_in_ccm_vtable; in in_ccm_init() 51 gen_ccm_init(cc, bc_impl, key, key_len, iv, tag_len); in in_ccm_init() 55 ccm_check_length(const br_sslrec_ccm_context *cc, size_t rlen) in ccm_check_length() argument 63 over = 8 + cc->tag_len; in ccm_check_length() [all …]
|
H A D | ssl_rec_chapol.c | 28 gen_chapol_init(br_sslrec_chapol_context *cc, in gen_chapol_init() argument 32 cc->seq = 0; in gen_chapol_init() 33 cc->ichacha = ichacha; in gen_chapol_init() 34 cc->ipoly = ipoly; in gen_chapol_init() 35 memcpy(cc->key, key, sizeof cc->key); in gen_chapol_init() 36 memcpy(cc->iv, iv, sizeof cc->iv); in gen_chapol_init() 40 gen_chapol_process(br_sslrec_chapol_context *cc, in gen_chapol_process() argument 49 seq = cc->seq ++; in gen_chapol_process() 54 memcpy(nonce, cc->iv, 12); in gen_chapol_process() 59 cc->ipoly(cc->key, nonce, data, len, header, sizeof header, in gen_chapol_process() [all …]
|
H A D | ssl_client.c | 29 br_ssl_client_zero(br_ssl_client_context *cc) in br_ssl_client_zero() argument 37 memset(cc, 0, sizeof *cc); in br_ssl_client_zero() 42 br_ssl_client_reset(br_ssl_client_context *cc, in br_ssl_client_reset() argument 47 br_ssl_engine_set_buffer(&cc->eng, NULL, 0, 0); in br_ssl_client_reset() 48 cc->eng.version_out = cc->eng.version_min; in br_ssl_client_reset() 50 br_ssl_client_forget_session(cc); in br_ssl_client_reset() 52 if (!br_ssl_engine_init_rand(&cc->eng)) { in br_ssl_client_reset() 62 cc->eng.reneg = 0; in br_ssl_client_reset() 65 cc->eng.server_name[0] = 0; in br_ssl_client_reset() 68 if (n > sizeof cc->eng.server_name) { in br_ssl_client_reset() [all …]
|
H A D | ssl_client_full.c | 29 br_ssl_client_init_full(br_ssl_client_context *cc, in br_ssl_client_init_full() argument 120 br_ssl_client_zero(cc); in br_ssl_client_init_full() 121 br_ssl_engine_set_versions(&cc->eng, BR_TLS10, BR_TLS12); in br_ssl_client_init_full() 136 br_ssl_engine_set_suites(&cc->eng, suites, in br_ssl_client_init_full() 138 br_ssl_client_set_default_rsapub(cc); in br_ssl_client_init_full() 139 br_ssl_engine_set_default_rsavrfy(&cc->eng); in br_ssl_client_init_full() 140 br_ssl_engine_set_default_ecdsa(&cc->eng); in br_ssl_client_init_full() 141 br_x509_minimal_set_rsa(xc, br_ssl_engine_get_rsavrfy(&cc->eng)); in br_ssl_client_init_full() 143 br_ssl_engine_get_ec(&cc->eng), in br_ssl_client_init_full() 144 br_ssl_engine_get_ecdsa(&cc->eng)); in br_ssl_client_init_full() [all …]
|
H A D | ssl_engine_default_aesgcm.c | 29 br_ssl_engine_set_default_aes_gcm(br_ssl_engine_context *cc) in br_ssl_engine_set_default_aes_gcm() argument 36 br_ssl_engine_set_gcm(cc, in br_ssl_engine_set_default_aes_gcm() 42 br_ssl_engine_set_aes_ctr(cc, ictr); in br_ssl_engine_set_default_aes_gcm() 45 br_ssl_engine_set_aes_ctr(cc, &br_aes_ct64_ctr_vtable); in br_ssl_engine_set_default_aes_gcm() 47 br_ssl_engine_set_aes_ctr(cc, &br_aes_ct_ctr_vtable); in br_ssl_engine_set_default_aes_gcm() 53 br_ssl_engine_set_aes_ctr(cc, ictr); in br_ssl_engine_set_default_aes_gcm() 56 br_ssl_engine_set_aes_ctr(cc, &br_aes_ct64_ctr_vtable); in br_ssl_engine_set_default_aes_gcm() 58 br_ssl_engine_set_aes_ctr(cc, &br_aes_ct_ctr_vtable); in br_ssl_engine_set_default_aes_gcm() 63 br_ssl_engine_set_aes_ctr(cc, &br_aes_ct64_ctr_vtable); in br_ssl_engine_set_default_aes_gcm() 65 br_ssl_engine_set_aes_ctr(cc, &br_aes_ct_ctr_vtable); in br_ssl_engine_set_default_aes_gcm() [all …]
|
/freebsd/sys/kern/ |
H A D | kern_timeout.c | 179 #define cc_exec_curr(cc, dir) cc->cc_exec_entity[dir].cc_curr argument 180 #define cc_exec_last_func(cc, dir) cc->cc_exec_entity[dir].cc_last_func argument 181 #define cc_exec_last_arg(cc, dir) cc->cc_exec_entity[dir].cc_last_arg argument 182 #define cc_exec_next(cc) cc->cc_next argument 183 #define cc_exec_cancel(cc, dir) cc->cc_exec_entity[dir].cc_cancel argument 184 #define cc_exec_waiting(cc, dir) cc->cc_exec_entity[dir].cc_waiting argument 186 #define cc_migration_func(cc, dir) cc->cc_exec_entity[dir].ce_migration_func argument 187 #define cc_migration_arg(cc, dir) cc->cc_exec_entity[dir].ce_migration_arg argument 188 #define cc_migration_cpu(cc, dir) cc->cc_exec_entity[dir].ce_migration_cpu argument 189 #define cc_migration_time(cc, dir) cc->cc_exec_entity[dir].ce_migration_time argument [all …]
|
/freebsd/sys/opencrypto/ |
H A D | criov.c | 300 crypto_cursor_init(struct crypto_buffer_cursor *cc, in crypto_cursor_init() argument 303 memset(cc, 0, sizeof(*cc)); in crypto_cursor_init() 304 cc->cc_type = cb->cb_type; in crypto_cursor_init() 305 switch (cc->cc_type) { in crypto_cursor_init() 307 cc->cc_buf = cb->cb_buf; in crypto_cursor_init() 308 cc->cc_buf_len = cb->cb_buf_len; in crypto_cursor_init() 312 cc->cc_mbuf = cb->cb_mbuf; in crypto_cursor_init() 315 cc->cc_vmpage = cb->cb_vm_page; in crypto_cursor_init() 316 cc->cc_buf_len = cb->cb_vm_page_len; in crypto_cursor_init() 317 cc->cc_offset = cb->cb_vm_page_offset; in crypto_cursor_init() [all …]
|
/freebsd/crypto/openssh/ |
H A D | cipher.c | 197 cipher_ctx_is_plaintext(struct sshcipher_ctx *cc) in cipher_ctx_is_plaintext() argument 199 return cc->plaintext; in cipher_ctx_is_plaintext() 237 cipher_warning_message(const struct sshcipher_ctx *cc) in cipher_warning_message() argument 239 if (cc == NULL || cc->cipher == NULL) in cipher_warning_message() 250 struct sshcipher_ctx *cc = NULL; in cipher_init() local 258 if ((cc = calloc(sizeof(*cc), 1)) == NULL) in cipher_init() 261 cc->plaintext = (cipher->flags & CFLAG_NONE) != 0; in cipher_init() 262 cc->encrypt = do_encrypt; in cipher_init() 270 cc->cipher = cipher; in cipher_init() 271 if ((cc->cipher->flags & CFLAG_CHACHAPOLY) != 0) { in cipher_init() [all …]
|
/freebsd/contrib/bearssl/samples/ |
H A D | custom_profile.c | 47 example_client_profile(br_ssl_client_context *cc in example_client_profile() argument 99 br_ssl_client_zero(cc); in example_client_profile() 108 br_ssl_engine_set_versions(&cc->eng, BR_TLS10, BR_TLS12); in example_client_profile() 122 br_ssl_engine_set_prf10(&cc->eng, &br_tls10_prf); in example_client_profile() 123 br_ssl_engine_set_prf_sha256(&cc->eng, &br_tls12_sha256_prf); in example_client_profile() 124 br_ssl_engine_set_prf_sha384(&cc->eng, &br_tls12_sha384_prf); in example_client_profile() 152 br_ssl_engine_set_hash(&cc->eng, br_md5_ID, &br_md5_vtable); in example_client_profile() 153 br_ssl_engine_set_hash(&cc->eng, br_sha1_ID, &br_sha1_vtable); in example_client_profile() 154 br_ssl_engine_set_hash(&cc->eng, br_sha224_ID, &br_sha224_vtable); in example_client_profile() 155 br_ssl_engine_set_hash(&cc->eng, br_sha256_ID, &br_sha256_vtable); in example_client_profile() [all …]
|
/freebsd/contrib/bearssl/inc/ |
H A D | bearssl_ssl.h | 1128 br_ssl_engine_get_flags(br_ssl_engine_context *cc) in br_ssl_engine_get_flags() argument 1130 return cc->flags; in br_ssl_engine_get_flags() 1140 br_ssl_engine_set_all_flags(br_ssl_engine_context *cc, uint32_t flags) in br_ssl_engine_set_all_flags() argument 1142 cc->flags = flags; in br_ssl_engine_set_all_flags() 1155 br_ssl_engine_add_flags(br_ssl_engine_context *cc, uint32_t flags) in br_ssl_engine_add_flags() argument 1157 cc->flags |= flags; in br_ssl_engine_add_flags() 1170 br_ssl_engine_remove_flags(br_ssl_engine_context *cc, uint32_t flags) in br_ssl_engine_remove_flags() argument 1172 cc->flags &= ~flags; in br_ssl_engine_remove_flags() 1250 br_ssl_engine_set_versions(br_ssl_engine_context *cc, in br_ssl_engine_set_versions() argument 1253 cc->version_min = (uint16_t)version_min; in br_ssl_engine_set_versions() [all …]
|
/freebsd/contrib/bearssl/src/hash/ |
H A D | md5sha1.c | 29 br_md5sha1_init(br_md5sha1_context *cc) in br_md5sha1_init() argument 31 cc->vtable = &br_md5sha1_vtable; in br_md5sha1_init() 32 memcpy(cc->val_md5, br_md5_IV, sizeof cc->val_md5); in br_md5sha1_init() 33 memcpy(cc->val_sha1, br_sha1_IV, sizeof cc->val_sha1); in br_md5sha1_init() 34 cc->count = 0; in br_md5sha1_init() 39 br_md5sha1_update(br_md5sha1_context *cc, const void *data, size_t len) in br_md5sha1_update() argument 45 ptr = (size_t)cc->count & 63; in br_md5sha1_update() 53 memcpy(cc->buf + ptr, buf, clen); in br_md5sha1_update() 57 cc->count += (uint64_t)clen; in br_md5sha1_update() 59 br_md5_round(cc->buf, cc->val_md5); in br_md5sha1_update() [all …]
|
/freebsd/contrib/tzdata/ |
H A D | checktab.awk | 20 cc = $1 22 if (cc !~ /^[A-Z][A-Z]$/) { 24 iso_table, iso_NR, cc >>"/dev/stderr" 27 if (cc <= cc0) { 28 if (cc == cc0) { 35 iso_table, iso_NR, cc, s \ 39 cc0 = cc 42 iso_table, iso_NR, name2cc[name], cc \ 46 name2cc[name] = cc 47 cc2name[cc] = name [all …]
|
/freebsd/contrib/libdiff/lib/ |
H A D | diff_output_unidiff.c | 46 diff_chunk_context_empty(const struct diff_chunk_context *cc) in diff_chunk_context_empty() argument 48 return diff_range_empty(&cc->chunk); in diff_chunk_context_empty() 104 diff_chunk_context_get(struct diff_chunk_context *cc, const struct diff_result *r, in diff_chunk_context_get() argument 113 *cc = (struct diff_chunk_context){ in diff_chunk_context_get() 130 diff_chunk_contexts_touch(const struct diff_chunk_context *cc, in diff_chunk_contexts_touch() argument 133 return diff_ranges_touch(&cc->chunk, &other->chunk) in diff_chunk_contexts_touch() 134 || diff_ranges_touch(&cc->left, &other->left) in diff_chunk_contexts_touch() 135 || diff_ranges_touch(&cc->right, &other->right); in diff_chunk_contexts_touch() 139 diff_chunk_contexts_merge(struct diff_chunk_context *cc, in diff_chunk_contexts_merge() argument 142 diff_ranges_merge(&cc->chunk, &other->chunk); in diff_chunk_contexts_merge() [all …]
|
/freebsd/tests/sys/capsicum/ |
H A D | Makefile | 22 capsicum-test-main.cc \ 23 capsicum-test.cc \ 24 capability-fd.cc \ 25 copy_file_range.cc \ 26 fexecve.cc \ 27 procdesc.cc \ 28 capmode.cc \ 29 fcntl.cc \ 30 ioctl.cc \ 31 openat.cc \ [all …]
|
/freebsd/contrib/bearssl/src/ec/ |
H A D | ec_c25519_m62.c | 118 uint64_t cc, w; in f255_sub() local 133 cc = -(w >> 51) & 0x3FF; in f255_sub() 134 w = a[1] - b[1] - cc; in f255_sub() 136 cc = -(w >> 51) & 0x3FF; in f255_sub() 137 w = a[2] - b[2] - cc; in f255_sub() 139 cc = -(w >> 51) & 0x3FF; in f255_sub() 140 w = a[3] - b[3] - cc; in f255_sub() 142 cc = -(w >> 51) & 0x3FF; in f255_sub() 143 d[4] = ((uint64_t)1 << 61) + a[4] - b[4] - cc; in f255_sub() 192 uint64_t t[10], hi, lo, w, cc; in f255_mul() local [all …]
|
H A D | ec_prime_i15.c | 454 const curve_params *cc, const uint16_t *code) in run_code() argument 492 ctl |= NOT(br_i15_sub(t[d], cc->p, 0)); in run_code() 493 br_i15_sub(t[d], cc->p, ctl); in run_code() 496 br_i15_add(t[d], cc->p, br_i15_sub(t[d], t[a], 1)); in run_code() 499 br_i15_montymul(t[d], t[a], t[b], cc->p, cc->p0i); in run_code() 502 plen = (cc->p[0] - (cc->p[0] >> 4) + 7) >> 3; in run_code() 503 br_i15_encode(tp, plen, cc->p); in run_code() 506 cc->p, cc->p0i, t[a], t[b]); in run_code() 533 point_zero(jacobian *P, const curve_params *cc) in point_zero() argument 536 P->c[0][0] = P->c[1][0] = P->c[2][0] = cc->p[0]; in point_zero() [all …]
|
H A D | ec_prime_i31.c | 453 const curve_params *cc, const uint16_t *code) in run_code() argument 491 ctl |= NOT(br_i31_sub(t[d], cc->p, 0)); in run_code() 492 br_i31_sub(t[d], cc->p, ctl); in run_code() 495 br_i31_add(t[d], cc->p, br_i31_sub(t[d], t[a], 1)); in run_code() 498 br_i31_montymul(t[d], t[a], t[b], cc->p, cc->p0i); in run_code() 501 plen = (cc->p[0] - (cc->p[0] >> 5) + 7) >> 3; in run_code() 502 br_i31_encode(tp, plen, cc->p); in run_code() 505 cc->p, cc->p0i, t[a], t[b]); in run_code() 532 point_zero(jacobian *P, const curve_params *cc) in point_zero() argument 535 P->c[0][0] = P->c[1][0] = P->c[2][0] = cc->p[0]; in point_zero() [all …]
|
/freebsd/contrib/bearssl/tools/ |
H A D | sslio.c | 75 run_command(br_ssl_engine_context *cc, unsigned char *buf, size_t len) in run_command() argument 97 br_ssl_engine_close(cc); in run_command() 100 if (br_ssl_engine_renegotiate(cc)) { in run_command() 115 br_ssl_client_forget_session((br_ssl_client_context *)cc); in run_command() 119 br_ssl_engine_get_session_parameters(cc, &slot); in run_command() 135 br_ssl_engine_set_session_parameters(cc, &slot); in run_command() 247 run_ssl_engine(br_ssl_engine_context *cc, unsigned long fd, unsigned flags) in run_ssl_engine() argument 274 if (cc->iaes_cbcenc != 0) { in run_ssl_engine() 276 get_algo_name(cc->iaes_cbcenc, 0)); in run_ssl_engine() 278 if (cc->iaes_cbcdec != 0) { in run_ssl_engine() [all …]
|
/freebsd/sys/powerpc/fpu/ |
H A D | fpu_compare.c | 77 int cc; in fpu_compare() local 89 cc = FPSCR_FU; in fpu_compare() 91 cc |= FPSCR_VXSNAN; in fpu_compare() 94 cc |= FPSCR_VXVC; in fpu_compare() 104 cc = FPSCR_FE; in fpu_compare() 109 cc = FPSCR_FL; in fpu_compare() 114 cc = FPSCR_FG; in fpu_compare() 134 #define opposite_cc(cc) ((cc) == FPSCR_FL ? FPSCR_FG : FPSCR_FL) in fpu_compare() argument 137 cc = diff(FPSCR_FL); in fpu_compare() 141 cc = diff(FPSCR_FG); in fpu_compare() [all …]
|