Home
last modified time | relevance | path

Searched refs:hc (Results 1 – 25 of 94) sorted by relevance

1234

/freebsd/contrib/bearssl/src/kdf/
H A Dhkdf.c31 br_hkdf_init(br_hkdf_context *hc, const br_hash_class *digest_vtable, in br_hkdf_init() argument
43 br_hmac_init(&hc->u.hmac_ctx, &kc, 0); in br_hkdf_init()
44 hc->dig_len = br_hmac_size(&hc->u.hmac_ctx); in br_hkdf_init()
49 br_hkdf_inject(br_hkdf_context *hc, const void *ikm, size_t ikm_len) in br_hkdf_inject() argument
51 br_hmac_update(&hc->u.hmac_ctx, ikm, ikm_len); in br_hkdf_inject()
56 br_hkdf_flip(br_hkdf_context *hc) in br_hkdf_flip() argument
60 br_hmac_out(&hc->u.hmac_ctx, tmp); in br_hkdf_flip()
61 br_hmac_key_init(&hc->u.prk_ctx, in br_hkdf_flip()
62 br_hmac_get_digest(&hc->u.hmac_ctx), tmp, hc->dig_len); in br_hkdf_flip()
63 hc->ptr = hc->dig_len; in br_hkdf_flip()
[all …]
/freebsd/contrib/bearssl/src/rand/
H A Dhmac_drbg.c48 br_hmac_context hc; in br_hmac_drbg_generate() local
60 br_hmac_init(&hc, &kc, 0); in br_hmac_drbg_generate()
61 br_hmac_update(&hc, ctx->V, hlen); in br_hmac_drbg_generate()
62 br_hmac_out(&hc, ctx->V); in br_hmac_drbg_generate()
79 br_hmac_init(&hc, &kc, 0); in br_hmac_drbg_generate()
80 br_hmac_update(&hc, ctx->V, hlen); in br_hmac_drbg_generate()
82 br_hmac_update(&hc, &x, 1); in br_hmac_drbg_generate()
83 br_hmac_out(&hc, ctx->K); in br_hmac_drbg_generate()
85 br_hmac_init(&hc, &kc, 0); in br_hmac_drbg_generate()
86 br_hmac_update(&hc, ctx->V, hlen); in br_hmac_drbg_generate()
[all …]
/freebsd/contrib/bearssl/src/mac/
H A Dhmac.c38 process_key(const br_hash_class **hc, void *ks, in process_key() argument
44 blen = block_size(*hc); in process_key()
50 (*hc)->init(hc); in process_key()
51 (*hc)->update(hc, tmp, blen); in process_key()
52 (*hc)->state(hc, ks); in process_key()
60 br_hash_compat_context hc; in br_hmac_key_init() local
64 hc.vtable = dig; in br_hmac_key_init()
66 dig->init(&hc.vtable); in br_hmac_key_init()
67 dig->update(&hc.vtable, key, key_len); in br_hmac_key_init()
68 dig->out(&hc.vtable, kbuf); in br_hmac_key_init()
[all …]
H A Dhmac_ct.c66 br_hash_compat_context hc; in br_hmac_outCT() local
77 hc = ctx->dig; in br_hmac_outCT()
82 dig = hc.vtable; in br_hmac_outCT()
94 count = dig->state(&hc.vtable, tmp1); in br_hmac_outCT()
107 dig->update(&hc.vtable, data, zlen); in br_hmac_outCT()
177 dig->update(&hc.vtable, x, 1); in br_hmac_outCT()
179 dig->state(&hc.vtable, tmp1); in br_hmac_outCT()
187 dig->init(&hc.vtable); in br_hmac_outCT()
188 dig->set_state(&hc.vtable, ctx->kso, (uint64_t)bs); in br_hmac_outCT()
189 dig->update(&hc.vtable, tmp2, hlen); in br_hmac_outCT()
[all …]
/freebsd/contrib/bearssl/src/hash/
H A Dmultihash.c91 const br_hash_class *hc; in br_multihash_init() local
93 hc = ctx->impl[i - 1]; in br_multihash_init()
94 if (hc != NULL) { in br_multihash_init()
97 hc->init(&g.vtable); in br_multihash_init()
98 hc->state(&g.vtable, in br_multihash_init()
129 const br_hash_class *hc; in br_multihash_update() local
131 hc = ctx->impl[i - 1]; in br_multihash_update()
132 if (hc != NULL) { in br_multihash_update()
138 hc->set_state(&g.vtable, in br_multihash_update()
140 hc->update(&g.vtable, ctx->buf, 128); in br_multihash_update()
[all …]
H A Dmgf1.c39 br_hash_compat_context hc; in br_mgf1_xor() local
43 hc.vtable = dig; in br_mgf1_xor()
44 dig->init(&hc.vtable); in br_mgf1_xor()
45 dig->update(&hc.vtable, seed, seed_len); in br_mgf1_xor()
47 dig->update(&hc.vtable, tmp, 4); in br_mgf1_xor()
48 dig->out(&hc.vtable, tmp); in br_mgf1_xor()
/freebsd/contrib/bearssl/src/ssl/
H A Dprf.c37 br_hmac_context hc; in br_tls_phash() local
47 br_hmac_init(&hc, &kc, 0); in br_tls_phash()
48 br_hmac_update(&hc, label, label_len); in br_tls_phash()
50 br_hmac_update(&hc, seed[u].data, seed[u].len); in br_tls_phash()
52 br_hmac_out(&hc, a); in br_tls_phash()
54 br_hmac_init(&hc, &kc, 0); in br_tls_phash()
55 br_hmac_update(&hc, a, hlen); in br_tls_phash()
56 br_hmac_update(&hc, label, label_len); in br_tls_phash()
58 br_hmac_update(&hc, seed[u].data, seed[u].len); in br_tls_phash()
60 br_hmac_out(&hc, tmp); in br_tls_phash()
[all …]
H A Dssl_rec_cbc.c111 br_hmac_context hc; in cbc_decrypt() local
204 br_hmac_init(&hc, &cc->mac, cc->mac_len); in cbc_decrypt()
205 br_hmac_update(&hc, tmp2, 13); in cbc_decrypt()
206 br_hmac_outCT(&hc, buf, len_nomac, min_len, max_len, tmp2); in cbc_decrypt()
316 br_hmac_context hc; in cbc_encrypt() local
343 br_hmac_init(&hc, &cc->mac, blen); in cbc_encrypt()
344 br_hmac_update(&hc, tmp, 8); in cbc_encrypt()
345 br_hmac_out(&hc, buf - blen); in cbc_encrypt()
384 br_hmac_init(&hc, &cc->mac, cc->mac_len); in cbc_encrypt()
385 br_hmac_update(&hc, tmp, 13); in cbc_encrypt()
[all …]
H A Dssl_client_full.c151 const br_hash_class *hc; in br_ssl_client_init_full() local
153 hc = hashes[id - 1]; in br_ssl_client_init_full()
154 br_ssl_engine_set_hash(&cc->eng, id, hc); in br_ssl_client_init_full()
155 br_x509_minimal_set_hash(xc, id, hc); in br_ssl_client_init_full()
H A Dssl_server_full_rsa.c111 const br_hash_class *hc; in br_ssl_server_init_full_rsa() local
113 hc = hashes[id - 1]; in br_ssl_server_init_full_rsa()
114 br_ssl_engine_set_hash(&cc->eng, id, hc); in br_ssl_server_init_full_rsa()
H A Dssl_scert_single_ec.c102 const br_hash_class *hc; in se_do_sign() local
106 hc = br_multihash_getimpl(pc->mhash, algo_id); in se_do_sign()
107 if (hc == NULL) { in se_do_sign()
114 return pc->iecdsa(pc->iec, hc, hv, pc->sk, data); in se_do_sign()
H A Dssl_server_full_ec.c128 const br_hash_class *hc; in br_ssl_server_init_full_ec() local
130 hc = hashes[id - 1]; in br_ssl_server_init_full_ec()
131 br_ssl_engine_set_hash(&cc->eng, id, hc); in br_ssl_server_init_full_ec()
H A Dssl_ccert_single_ec.c112 const br_hash_class *hc; in cc_do_sign() local
116 hc = br_multihash_getimpl(zc->mhash, hash_id); in cc_do_sign()
117 if (hc == NULL) { in cc_do_sign()
123 return zc->iecdsa(zc->iec, hc, hv, zc->sk, data); in cc_do_sign()
/freebsd/sys/powerpc/ps3/
H A Dps3-hvcall.S3 #define hc .long 0x44000022 macro
12 hc
29 hc
44 hc
62 hc
82 hc
105 hc
118 hc
131 hc
144 hc
[all …]
/freebsd/crypto/openssh/
H A Dumac.c538 static void nh_transform(nh_ctx *hc, const UINT8 *buf, UINT32 nbytes) in nh_transform() argument
547 key = hc->nh_key + hc->bytes_hashed; in nh_transform()
548 nh_aux(key, buf, hc->state, nbytes); in nh_transform()
583 static void nh_reset(nh_ctx *hc) in nh_reset() argument
586 hc->bytes_hashed = 0; in nh_reset()
587 hc->next_data_empty = 0; in nh_reset()
588 hc->state[0] = 0; in nh_reset()
590 hc->state[1] = 0; in nh_reset()
593 hc->state[2] = 0; in nh_reset()
596 hc->state[3] = 0; in nh_reset()
[all …]
/freebsd/sys/dev/hyperv/vmbus/x86/
H A Dhyperv_x86.c116 uint64_t hc, hc_orig; in hypercall_page_setup() local
124 hc = ((paddr >> PAGE_SHIFT) << MSR_HV_HYPERCALL_PGSHIFT) | in hypercall_page_setup()
126 wrmsr(MSR_HV_HYPERCALL, hc); in hypercall_page_setup()
131 hc = rdmsr(MSR_HV_HYPERCALL); in hypercall_page_setup()
132 if ((hc & MSR_HV_HYPERCALL_ENABLE) == 0) { in hypercall_page_setup()
144 uint64_t hc; in hypercall_disable() local
146 hc = rdmsr(MSR_HV_HYPERCALL); in hypercall_disable()
147 wrmsr(MSR_HV_HYPERCALL, (hc & MSR_HV_HYPERCALL_RSVD_MASK)); in hypercall_disable()
/freebsd/contrib/bearssl/src/rsa/
H A Drsa_pss_sig_pad.c35 br_hash_compat_context hc; in br_rsa_pss_sig_pad() local
74 hf_data->init(&hc.vtable); in br_rsa_pss_sig_pad()
76 hf_data->update(&hc.vtable, seed, 8); in br_rsa_pss_sig_pad()
77 hf_data->update(&hc.vtable, hash, hash_len); in br_rsa_pss_sig_pad()
78 hf_data->update(&hc.vtable, salt, salt_len); in br_rsa_pss_sig_pad()
79 hf_data->out(&hc.vtable, seed); in br_rsa_pss_sig_pad()
H A Drsa_pss_sig_unpad.c35 br_hash_compat_context hc; in br_rsa_pss_sig_unpad() local
105 hf_data->init(&hc.vtable); in br_rsa_pss_sig_unpad()
107 hf_data->update(&hc.vtable, tmp, 8); in br_rsa_pss_sig_unpad()
108 hf_data->update(&hc.vtable, hash, hash_len); in br_rsa_pss_sig_unpad()
109 hf_data->update(&hc.vtable, salt, salt_len); in br_rsa_pss_sig_unpad()
110 hf_data->out(&hc.vtable, tmp); in br_rsa_pss_sig_unpad()
H A Drsa_oaep_pad.c35 br_hash_compat_context hc; in hash_data() local
37 hc.vtable = dig; in hash_data()
38 dig->init(&hc.vtable); in hash_data()
39 dig->update(&hc.vtable, src, len); in hash_data()
40 dig->out(&hc.vtable, dst); in hash_data()
H A Drsa_oaep_unpad.c35 br_hash_compat_context hc; in xor_hash_data() local
40 hc.vtable = dig; in xor_hash_data()
41 dig->init(&hc.vtable); in xor_hash_data()
42 dig->update(&hc.vtable, src, len); in xor_hash_data()
43 dig->out(&hc.vtable, tmp); in xor_hash_data()
/freebsd/contrib/bearssl/inc/
H A Dbearssl_kdf.h150 void br_hkdf_init(br_hkdf_context *hc, const br_hash_class *digest_vtable,
173 void br_hkdf_inject(br_hkdf_context *hc, const void *ikm, size_t ikm_len);
183 void br_hkdf_flip(br_hkdf_context *hc);
202 size_t br_hkdf_produce(br_hkdf_context *hc,
264 void br_shake_flip(br_shake_context *hc);
/freebsd/contrib/bearssl/tools/
H A Dserver.c518 const br_hash_class *hc; in sp_do_sign() local
527 hc = get_hash_impl(algo_id); in sp_do_sign()
528 if (hc == NULL) { in sp_do_sign()
536 hc->init(&zc.vtable); in sp_do_sign()
537 hc->update(&zc.vtable, data, hv_len); in sp_do_sign()
538 hc->out(&zc.vtable, hv); in sp_do_sign()
539 hv_len = (hc->desc >> BR_HASHDESC_OUT_OFF) in sp_do_sign()
546 const br_hash_class *hc; in sp_do_sign() local
580 hc = get_hash_impl(algo_id); in sp_do_sign()
581 if (hc == NULL) { in sp_do_sign()
[all …]
/freebsd/contrib/bearssl/src/x509/
H A Dx509_minimal_full.c54 const br_hash_class *hc; in br_x509_minimal_init_full() local
56 hc = hashes[id - 1]; in br_x509_minimal_init_full()
57 br_x509_minimal_set_hash(xc, id, hc); in br_x509_minimal_init_full()
/freebsd/sys/powerpc/pseries/
H A Dphyp-hvcall.S28 #define hc .long 0x44000022 macro
44 hc /* invoke the hypervisor */
63 hc /* invoke the hypervisor */
/freebsd/sys/dev/sound/pci/
H A Dhdspe-pcm.c84 hdspe_channel_play_ports(struct hdspe_channel *hc) in hdspe_channel_play_ports() argument
86 return (hc->ports & (HDSPE_CHAN_AIO_ALL | HDSPE_CHAN_RAY_ALL)); in hdspe_channel_play_ports()
90 hdspe_channel_rec_ports(struct hdspe_channel *hc) in hdspe_channel_rec_ports() argument
92 return (hc->ports & (HDSPE_CHAN_AIO_ALL_REC | HDSPE_CHAN_RAY_ALL)); in hdspe_channel_rec_ports()
302 if (hdspe_channel_play_ports(scp->hc)) in hdspemixer_init()
305 if (hdspe_channel_rec_ports(scp->hc)) in hdspemixer_init()
702 ch->ports = hdspe_channel_play_ports(scp->hc); in hdspechan_init()
704 ch->ports = hdspe_channel_rec_ports(scp->hc); in hdspechan_init()
1049 if (scp->hc->ports & HDSPE_CHAN_AIO_ALL) in hdspe_pcm_attach()
1051 else if (scp->hc->ports & HDSPE_CHAN_RAY_ALL) in hdspe_pcm_attach()
[all …]

1234