Home
last modified time | relevance | path

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

1234

/freebsd-14.2/contrib/bearssl/src/kdf/
H A Dhkdf.c44 hc->dig_len = br_hmac_size(&hc->u.hmac_ctx); in br_hkdf_init()
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()
64 hc->chunk_num = 0; in br_hkdf_flip()
78 if (hc->ptr == hc->dig_len) { in br_hkdf_produce()
82 hc->chunk_num ++; in br_hkdf_produce()
89 br_hmac_update(&hmac_ctx, hc->buf, hc->dig_len); in br_hkdf_produce()
94 hc->ptr = 0; in br_hkdf_produce()
96 clen = hc->dig_len - hc->ptr; in br_hkdf_produce()
100 memcpy(out, hc->buf + hc->ptr, clen); in br_hkdf_produce()
[all …]
/freebsd-14.2/contrib/bearssl/src/rand/
H A Dhmac_drbg.c48 br_hmac_context hc; in br_hmac_drbg_generate() local
62 br_hmac_out(&hc, ctx->V); in br_hmac_drbg_generate()
79 br_hmac_init(&hc, &kc, 0); 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()
87 br_hmac_out(&hc, ctx->V); in br_hmac_drbg_generate()
96 br_hmac_context hc; in br_hmac_drbg_update() local
112 br_hmac_out(&hc, ctx->K); in br_hmac_drbg_update()
120 br_hmac_out(&hc, ctx->V); in br_hmac_drbg_update()
137 br_hmac_out(&hc, ctx->K); in br_hmac_drbg_update()
[all …]
/freebsd-14.2/contrib/bearssl/src/mac/
H A Dhmac.c44 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()
68 dig->out(&hc.vtable, kbuf); in br_hmac_key_init()
108 br_hash_compat_context hc; in br_hmac_out() local
115 dig->init(&hc.vtable); in br_hmac_out()
[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-14.2/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()
131 hc = ctx->impl[i - 1]; in br_multihash_update()
132 if (hc != NULL) { in br_multihash_update()
153 const br_hash_class *hc; in br_multihash_out() local
157 hc = ctx->impl[id - 1]; in br_multihash_out()
158 if (hc == NULL) { in br_multihash_out()
[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-14.2/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()
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()
60 br_hmac_out(&hc, tmp); in br_tls_phash()
69 br_hmac_init(&hc, &kc, 0); in br_tls_phash()
70 br_hmac_update(&hc, a, hlen); 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()
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()
386 br_hmac_update(&hc, buf, len); 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_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_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_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-14.2/sys/powerpc/ps3/
H A Dps3-hvcall.S12 hc
29 hc
44 hc
62 hc
82 hc
105 hc
118 hc
131 hc
144 hc
157 hc
[all …]
/freebsd-14.2/crypto/openssh/
H A Dumac.c547 key = hc->nh_key + hc->bytes_hashed; in nh_transform()
606 kdf(hc->nh_key, prf_key, 1, sizeof(hc->nh_key)); in nh_init()
607 endian_convert_if_le(hc->nh_key, 4, sizeof(hc->nh_key)); in nh_init()
624 nh_transform(hc,hc->data,HASH_BUF_BYTES); in nh_update()
682 zero_pad(hc->data + hc->next_data_empty, in nh_final()
684 nh_transform(hc, hc->data, nh_len); in nh_final()
685 hc->bytes_hashed += hc->next_data_empty; in nh_final()
689 nh_transform(hc, hc->data, nh_len); in nh_final()
840 hc->poly_accum[i] = poly64(hc->poly_accum[i], in poly_hash()
842 hc->poly_accum[i] = poly64(hc->poly_accum[i], in poly_hash()
[all …]
/freebsd-14.2/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-14.2/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-14.2/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-14.2/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()
538 hc->out(&zc.vtable, hv); 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()
1081 const br_hash_class *hc; in do_server() local
1087 dnhash = hc; in do_server()
[all …]
H A Dclient.c371 const br_hash_class *hc; in cc_do_sign() local
408 hc = get_hash_impl(hash_id); in cc_do_sign()
409 if (hc == NULL) { in cc_do_sign()
426 br_ec_get_default(), hc, hv, &zc->sk->key.ec, data); in cc_do_sign()
897 const br_hash_class *hc; in do_client() local
900 hc = hash_functions[u].hclass; in do_client()
903 dnhash = hc; in do_client()
987 const br_hash_class *hc; in do_client() local
990 hc = hash_functions[u].hclass; in do_client()
993 br_ssl_engine_set_hash(&cc.eng, id, hc); in do_client()
[all …]
/freebsd-14.2/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-14.2/sys/powerpc/pseries/
H A Dphyp-hvcall.S28 #define hc .long 0x44000022 macro
44 hc /* invoke the hypervisor */
63 hc /* invoke the hypervisor */

1234