/freebsd/crypto/libecc/src/hash/ |
H A D | hash_algs.c | 151 ATTRIBUTE_WARN_UNUSED_RET int _sha224_init(hash_context * hctx) in _sha224_init() argument 153 return sha224_init((sha224_context*)hctx); in _sha224_init() 155 ATTRIBUTE_WARN_UNUSED_RET int _sha224_update(hash_context * hctx, const unsigned char *chunk, u32 c… in _sha224_update() argument 157 return sha224_update((sha224_context*)hctx, chunk, chunklen); in _sha224_update() 159 ATTRIBUTE_WARN_UNUSED_RET int _sha224_final(hash_context * hctx, unsigned char *output) in _sha224_final() argument 161 return sha224_final((sha224_context*)hctx, output); in _sha224_final() 165 ATTRIBUTE_WARN_UNUSED_RET int _sha256_init(hash_context * hctx) in _sha256_init() argument 167 return sha256_init((sha256_context*)hctx); in _sha256_init() 169 ATTRIBUTE_WARN_UNUSED_RET int _sha256_update(hash_context * hctx, const unsigned char *chunk, u32 c… in _sha256_update() argument 171 return sha256_update((sha256_context*)hctx, chunk, chunklen); in _sha256_update() [all …]
|
/freebsd/crypto/libecc/include/libecc/hash/ |
H A D | hash_algs.h | 115 typedef int (*_hfunc_init) (hash_context * hctx); 116 typedef int (*_hfunc_update) (hash_context * hctx, 118 typedef int (*_hfunc_finalize) (hash_context * hctx, unsigned char *output); 127 ATTRIBUTE_WARN_UNUSED_RET int _sha224_init(hash_context * hctx); 128 ATTRIBUTE_WARN_UNUSED_RET int _sha224_update(hash_context * hctx, const unsigned char *chunk, u32 c… 129 ATTRIBUTE_WARN_UNUSED_RET int _sha224_final(hash_context * hctx, unsigned char *output); 132 ATTRIBUTE_WARN_UNUSED_RET int _sha256_init(hash_context * hctx); 133 ATTRIBUTE_WARN_UNUSED_RET int _sha256_update(hash_context * hctx, const unsigned char *chunk, u32 c… 134 ATTRIBUTE_WARN_UNUSED_RET int _sha256_final(hash_context * hctx, unsigned char *output); 137 ATTRIBUTE_WARN_UNUSED_RET int _sha384_init(hash_context * hctx); [all …]
|
/freebsd/crypto/openssl/crypto/engine/ |
H A D | eng_openssl.c | 451 OSSL_HMAC_PKEY_CTX *hctx; in ossl_hmac_init() local 453 if ((hctx = OPENSSL_zalloc(sizeof(*hctx))) == NULL) { in ossl_hmac_init() 457 hctx->ktmp.type = V_ASN1_OCTET_STRING; in ossl_hmac_init() 458 hctx->ctx = HMAC_CTX_new(); in ossl_hmac_init() 459 if (hctx->ctx == NULL) { in ossl_hmac_init() 460 OPENSSL_free(hctx); in ossl_hmac_init() 463 EVP_PKEY_CTX_set_data(ctx, hctx); in ossl_hmac_init() 499 OSSL_HMAC_PKEY_CTX *hctx = EVP_PKEY_CTX_get_data(ctx); in ossl_hmac_cleanup() local 501 if (hctx) { in ossl_hmac_cleanup() 502 HMAC_CTX_free(hctx->ctx); in ossl_hmac_cleanup() [all …]
|
/freebsd/sys/contrib/libsodium/src/libsodium/crypto_pwhash/scryptsalsa208sha256/ |
H A D | pbkdf2-sha256.c | 50 crypto_auth_hmacsha256_state PShctx, hctx; in PBKDF2_SHA256() local 71 memcpy(&hctx, &PShctx, sizeof(crypto_auth_hmacsha256_state)); in PBKDF2_SHA256() 72 crypto_auth_hmacsha256_update(&hctx, ivec, 4); in PBKDF2_SHA256() 73 crypto_auth_hmacsha256_final(&hctx, U); in PBKDF2_SHA256() 78 crypto_auth_hmacsha256_init(&hctx, passwd, passwdlen); in PBKDF2_SHA256() 79 crypto_auth_hmacsha256_update(&hctx, U, 32); in PBKDF2_SHA256() 80 crypto_auth_hmacsha256_final(&hctx, U); in PBKDF2_SHA256()
|
/freebsd/crypto/openssl/providers/implementations/kdfs/ |
H A D | pbkdf2.c | 284 HMAC_CTX *hctx_tpl = NULL, *hctx = NULL; in pbkdf2_derive() local 321 hctx = HMAC_CTX_new(); in pbkdf2_derive() 322 if (hctx == NULL) in pbkdf2_derive() 337 if (!HMAC_CTX_copy(hctx, hctx_tpl)) in pbkdf2_derive() 339 if (!HMAC_Update(hctx, salt, saltlen) in pbkdf2_derive() 340 || !HMAC_Update(hctx, itmp, 4) in pbkdf2_derive() 341 || !HMAC_Final(hctx, digtmp, NULL)) in pbkdf2_derive() 345 if (!HMAC_CTX_copy(hctx, hctx_tpl)) in pbkdf2_derive() 347 if (!HMAC_Update(hctx, digtmp, mdlen) in pbkdf2_derive() 348 || !HMAC_Final(hctx, digtmp, NULL)) in pbkdf2_derive() [all …]
|
/freebsd/sys/dev/bnxt/bnxt_re/ |
H A D | qplib_res.c | 410 struct bnxt_qplib_ctx *hctx; in bnxt_qplib_free_hwctx() local 413 hctx = res->hctx; in bnxt_qplib_free_hwctx() 414 bnxt_qplib_free_hwq(res, &hctx->qp_ctx.hwq); in bnxt_qplib_free_hwctx() 415 bnxt_qplib_free_hwq(res, &hctx->mrw_ctx.hwq); in bnxt_qplib_free_hwctx() 416 bnxt_qplib_free_hwq(res, &hctx->srq_ctx.hwq); in bnxt_qplib_free_hwctx() 417 bnxt_qplib_free_hwq(res, &hctx->cq_ctx.hwq); in bnxt_qplib_free_hwctx() 418 bnxt_qplib_free_hwq(res, &hctx->tim_ctx.hwq); in bnxt_qplib_free_hwctx() 420 bnxt_qplib_free_hwq(res, &hctx->tqm_ctx.qtbl[i]); in bnxt_qplib_free_hwctx() 422 hctx->tqm_ctx.pde.level = hctx->tqm_ctx.pde_level; in bnxt_qplib_free_hwctx() 423 bnxt_qplib_free_hwq(res, &hctx->tqm_ctx.pde); in bnxt_qplib_free_hwctx() [all …]
|
H A D | main.c | 240 struct bnxt_qplib_ctx *hctx; in bnxt_re_limit_pf_res() local 244 hctx = rdev->qplib_res.hctx; in bnxt_re_limit_pf_res() 249 hctx->qp_ctx.max = min_t(u32, dev_res.max_qp, attr->max_qp); in bnxt_re_limit_pf_res() 250 hctx->mrw_ctx.max = min_t(u32, dev_res.max_mr, attr->max_mr); in bnxt_re_limit_pf_res() 254 hctx->mrw_ctx.max *= 2; in bnxt_re_limit_pf_res() 255 hctx->srq_ctx.max = min_t(u32, dev_res.max_srq, attr->max_srq); in bnxt_re_limit_pf_res() 256 hctx->cq_ctx.max = min_t(u32, dev_res.max_cq, attr->max_cq); in bnxt_re_limit_pf_res() 258 hctx->tqm_ctx.qcount[i] = attr->tqm_alloc_reqs[i]; in bnxt_re_limit_pf_res() 260 hctx->qp_ctx.max = attr->max_qp ? attr->max_qp : dev_res.max_qp; in bnxt_re_limit_pf_res() 261 hctx->mrw_ctx.max = attr->max_mr ? attr->max_mr : dev_res.max_mr; in bnxt_re_limit_pf_res() [all …]
|
H A D | qplib_rcfw.c | 933 struct bnxt_qplib_ctx *hctx; in bnxt_qplib_init_rcfw() local 940 hctx = res->hctx; in bnxt_qplib_init_rcfw() 957 hwq = &hctx->qp_ctx.hwq; in bnxt_qplib_init_rcfw() 964 hwq = &hctx->mrw_ctx.hwq; in bnxt_qplib_init_rcfw() 971 hwq = &hctx->srq_ctx.hwq; in bnxt_qplib_init_rcfw() 978 hwq = &hctx->cq_ctx.hwq; in bnxt_qplib_init_rcfw() 985 hwq = &hctx->tim_ctx.hwq; in bnxt_qplib_init_rcfw() 990 hwq = &hctx->tqm_ctx.pde; in bnxt_qplib_init_rcfw() 998 req.stat_ctx_id = cpu_to_le32(hctx->stats.fw_id); in bnxt_qplib_init_rcfw()
|
H A D | qplib_sp.c | 214 struct bnxt_qplib_ctx *hctx; in bnxt_qplib_set_func_resources() local 218 hctx = res->hctx; in bnxt_qplib_set_func_resources() 222 req.number_of_qp = cpu_to_le32(hctx->qp_ctx.max); in bnxt_qplib_set_func_resources() 223 req.number_of_mrw = cpu_to_le32(hctx->mrw_ctx.max); in bnxt_qplib_set_func_resources() 224 req.number_of_srq = cpu_to_le32(hctx->srq_ctx.max); in bnxt_qplib_set_func_resources() 225 req.number_of_cq = cpu_to_le32(hctx->cq_ctx.max); in bnxt_qplib_set_func_resources() 227 req.max_qp_per_vf = cpu_to_le32(hctx->vf_res.max_qp); in bnxt_qplib_set_func_resources() 228 req.max_mrw_per_vf = cpu_to_le32(hctx->vf_res.max_mrw); in bnxt_qplib_set_func_resources() 229 req.max_srq_per_vf = cpu_to_le32(hctx->vf_res.max_srq); in bnxt_qplib_set_func_resources() 230 req.max_cq_per_vf = cpu_to_le32(hctx->vf_res.max_cq); in bnxt_qplib_set_func_resources() [all …]
|
/freebsd/contrib/ntp/libntp/lib/isc/include/isc/ |
H A D | hash.h | 86 isc_hash_t **hctx); 106 isc_hash_ctxattach(isc_hash_t *hctx, isc_hash_t **hctxp); 134 isc_hash_ctxinit(isc_hash_t *hctx); 158 isc_hash_ctxcalc(isc_hash_t *hctx, const unsigned char *key,
|
/freebsd/crypto/heimdal/kuser/ |
H A D | kdigest.c | 275 EVP_MD_CTX *hctx, *ctx; in client_mschapv2() local 291 hctx = EVP_MD_CTX_create(); in client_mschapv2() 292 EVP_DigestInit_ex(hctx, EVP_md4(), NULL); in client_mschapv2() 295 EVP_DigestUpdate(hctx, &password[i], 1); in client_mschapv2() 296 EVP_DigestUpdate(hctx, &password[len], 1); in client_mschapv2() 298 EVP_DigestFinal_ex(hctx, hmd, NULL); in client_mschapv2() 311 EVP_DigestInit_ex(hctx, EVP_md4(), NULL); in client_mschapv2() 312 EVP_DigestUpdate(hctx, hmd, sizeof(hmd)); in client_mschapv2() 313 EVP_DigestFinal_ex(hctx, hmd, NULL); in client_mschapv2() 353 EVP_MD_CTX_destroy(hctx); in client_mschapv2()
|
/freebsd/lib/libradius/ |
H A D | radlib.c | 191 HMAC_CTX *hctx; in is_valid_response() local 233 hctx = HMAC_CTX_new(); in is_valid_response() 237 HMAC_CTX_free(hctx); in is_valid_response() 241 HMAC_CTX_free(hctx); in is_valid_response() 247 HMAC_Init_ex(hctx, srvp->secret, in is_valid_response() 249 HMAC_Update(hctx, &h->in[POS_CODE], in is_valid_response() 251 HMAC_Update(hctx, &h->out[POS_AUTH], in is_valid_response() 253 HMAC_Update(hctx, &resp[POS_ATTRS], in is_valid_response() 255 HMAC_Final(hctx, md, &md_len); in is_valid_response() 256 HMAC_CTX_reset(hctx); in is_valid_response() [all …]
|
/freebsd/crypto/openssl/doc/man3/ |
H A D | SSL_CTX_set_tlsext_ticket_key_cb.pod | 16 EVP_CIPHER_CTX *ctx, EVP_MAC_CTX *hctx, int enc)); 25 EVP_CIPHER_CTX *ctx, HMAC_CTX *hctx, int enc)); 51 Before the callback function is started I<ctx> and I<hctx> have been 59 I<iv>, and set the cipher context I<ctx> and the hash context I<hctx>. 79 digest for I<hctx> need to be set using L<EVP_MAC_CTX_set_params(3)> with the 93 This indicates that the I<ctx> and I<hctx> have been set and the session can 101 This indicates that the I<ctx> and I<hctx> have been set and the session can 122 Before this callback function is started I<hctx> will have been 125 The I<hctx> key material can be set using L<HMAC_Init_ex(3)>. 159 EVP_MAC_CTX *hctx, int enc) [all …]
|
/freebsd/crypto/libecc/src/sig/ |
H A D | sm2.c | 143 hash_context hctx; in sm2_compute_Z() local 172 ret = hm->hfunc_init(&hctx); EG(ret, err); in sm2_compute_Z() 177 ret = hm->hfunc_update(&hctx, buf, 2); EG(ret, err); in sm2_compute_Z() 180 ret = hm->hfunc_update(&hctx, id, id_len); EG(ret, err); in sm2_compute_Z() 184 ret = hm->hfunc_update(&hctx, buf, p_len); EG(ret, err); in sm2_compute_Z() 188 ret = hm->hfunc_update(&hctx, buf, p_len); EG(ret, err); in sm2_compute_Z() 192 ret = hm->hfunc_update(&hctx, buf, (u32)(2 * p_len)); EG(ret, err); in sm2_compute_Z() 196 ret = hm->hfunc_update(&hctx, buf, (u32)(2 * p_len)); EG(ret, err); in sm2_compute_Z() 199 ret = hm->hfunc_finalize(&hctx, Z); EG(ret, err); in sm2_compute_Z() 203 ret = local_memset(&hctx, 0, sizeof(hctx)); EG(ret, err); in sm2_compute_Z()
|
/freebsd/contrib/wpa/src/crypto/ |
H A D | crypto_openssl.c | 4762 EVP_MAC_CTX *hctx; in hpke_labeled_extract() local 4766 HMAC_CTX *hctx; in hpke_labeled_extract() local 4791 hctx = EVP_MAC_CTX_new(hmac); in hpke_labeled_extract() 4793 if (!hctx) in hpke_labeled_extract() 4796 if (EVP_MAC_init(hctx, salt, salt_len, params) != 1) in hpke_labeled_extract() 4799 if (EVP_MAC_update(hctx, (const unsigned char *) "HPKE-v1", 7) != 1 || in hpke_labeled_extract() 4800 EVP_MAC_update(hctx, suite_id, suite_id_len) != 1 || in hpke_labeled_extract() 4801 EVP_MAC_update(hctx, (const unsigned char *) label, in hpke_labeled_extract() 4803 EVP_MAC_update(hctx, ikm, ikm_len) != 1) in hpke_labeled_extract() 4806 res = EVP_MAC_final(hctx, prk, &mlen, mdlen); in hpke_labeled_extract() [all …]
|
/freebsd/crypto/openssl/ssl/statem/ |
H A D | extensions_srvr.c | 697 EVP_MD_CTX *hctx; in tls_parse_ctos_cookie() local 728 hctx = EVP_MD_CTX_create(); in tls_parse_ctos_cookie() 733 if (hctx == NULL || pkey == NULL) { in tls_parse_ctos_cookie() 734 EVP_MD_CTX_free(hctx); in tls_parse_ctos_cookie() 741 if (EVP_DigestSignInit_ex(hctx, NULL, "SHA2-256", s->ctx->libctx, in tls_parse_ctos_cookie() 743 || EVP_DigestSign(hctx, hmac, &hmaclen, data, in tls_parse_ctos_cookie() 746 EVP_MD_CTX_free(hctx); in tls_parse_ctos_cookie() 752 EVP_MD_CTX_free(hctx); in tls_parse_ctos_cookie() 1732 EVP_MD_CTX *hctx; in tls_construct_stoc_cookie() local 1806 hctx = EVP_MD_CTX_create(); in tls_construct_stoc_cookie() [all …]
|
H A D | statem_srvr.c | 3671 SSL_HMAC *hctx = NULL; in construct_stateless_ticket() local 3700 hctx = ssl_hmac_new(tctx); in construct_stateless_ticket() 3701 if (ctx == NULL || hctx == NULL) { in construct_stateless_ticket() 3751 ssl_hmac_get0_EVP_MAC_CTX(hctx), in construct_stateless_ticket() 3757 ssl_hmac_get0_HMAC_CTX(hctx), 1); in construct_stateless_ticket() 3778 ssl_hmac_free(hctx); in construct_stateless_ticket() 3805 || !ssl_hmac_init(hctx, tctx->ext.secure->tick_hmac_key, in construct_stateless_ticket() 3838 || !ssl_hmac_update(hctx, in construct_stateless_ticket() 3842 || !ssl_hmac_final(hctx, macdata1, &hlen, EVP_MAX_MD_SIZE) in construct_stateless_ticket() 3860 ssl_hmac_free(hctx); in construct_stateless_ticket()
|
/freebsd/contrib/libarchive/libarchive/ |
H A D | archive_write_set_format_zip.c | 141 archive_hmac_sha1_ctx hctx; member 573 archive_hmac_sha1_cleanup(&zip->hctx); in archive_write_zip_header() 1067 archive_hmac_sha1_update(&zip->hctx, in archive_write_zip_data() 1110 archive_hmac_sha1_update(&zip->hctx, in archive_write_zip_data() 1170 archive_hmac_sha1_update(&zip->hctx, in archive_write_zip_finish_entry() 1190 archive_hmac_sha1_final(&zip->hctx, hmac, &hmac_len); in archive_write_zip_finish_entry() 1408 archive_hmac_sha1_cleanup(&zip->hctx); in archive_write_zip_free() 1672 ret = archive_hmac_sha1_init(&zip->hctx, derived_key + key_len, in init_winzip_aes_encryption() 1702 archive_hmac_sha1_ctx hctx; in is_winzip_aes_encryption_supported() local 1723 ret = archive_hmac_sha1_init(&hctx, derived_key + key_len, in is_winzip_aes_encryption_supported() [all …]
|
H A D | archive_read_support_format_zip.c | 238 archive_hmac_sha1_ctx hctx; member 1321 archive_hmac_sha1_final(&zip->hctx, hmac, &hmac_len); in check_authentication_code() 1710 archive_hmac_sha1_update(&zip->hctx, in zip_read_data_none() 2695 archive_hmac_sha1_update(&zip->hctx, sp, to_consume); in zip_read_data_deflate() 3062 r = archive_hmac_sha1_init(&zip->hctx, derived_key + key_len, key_len); in init_WinZip_AES_decryption() 3270 archive_hmac_sha1_cleanup(&zip->hctx); in archive_read_format_zip_cleanup() 3440 archive_hmac_sha1_cleanup(&zip->hctx); in archive_read_format_zip_streamable_read_header() 4339 archive_hmac_sha1_cleanup(&zip->hctx); in archive_read_format_zip_seekable_read_header()
|
/freebsd/crypto/libecc/src/examples/hash/ |
H A D | hash.c | 352 ret = hm->hfunc_init(&(ctx->hctx)); EG(ret, err); in gen_hash_init() 405 ret = hm->hfunc_update(&(ctx->hctx), chunk, chunklen); EG(ret, err); in gen_hash_update() 458 ret = hm->hfunc_finalize(&(ctx->hctx), output); EG(ret, err); in gen_hash_final()
|
H A D | hash.h | 82 hash_context hctx; member
|
/freebsd/sys/contrib/openzfs/config/ |
H A D | kernel-blk-queue.m4 | 257 struct blk_mq_hw_ctx *hctx = NULL; 258 rq.mq_hctx = hctx;
|
/freebsd/crypto/openssl/ssl/ |
H A D | t1_lib.c | 1815 SSL_HMAC *hctx = NULL; in tls_decrypt_ticket() local 1845 hctx = ssl_hmac_new(tctx); in tls_decrypt_ticket() 1846 if (hctx == NULL) { in tls_decrypt_ticket() 1868 ssl_hmac_get0_EVP_MAC_CTX(hctx), in tls_decrypt_ticket() 1875 ctx, ssl_hmac_get0_HMAC_CTX(hctx), 0); in tls_decrypt_ticket() 1900 || ssl_hmac_init(hctx, tctx->ext.secure->tick_hmac_key, in tls_decrypt_ticket() 1918 mlen = ssl_hmac_size(hctx); in tls_decrypt_ticket() 1937 if (ssl_hmac_update(hctx, etick, eticklen) <= 0 in tls_decrypt_ticket() 1938 || ssl_hmac_final(hctx, tick_hmac, NULL, sizeof(tick_hmac)) <= 0) { in tls_decrypt_ticket() 2001 ssl_hmac_free(hctx); in tls_decrypt_ticket()
|
/freebsd/crypto/libecc/src/examples/sig/rsa/ |
H A D | rsa.c | 1842 gen_hash_context hctx; in _rsa_iso9796_2_sign_recover() local 1868 ret = gen_hash_init(&hctx, gen_hash_type); EG(ret, err); in _rsa_iso9796_2_sign_recover() 1869 ret = gen_hash_update(&hctx, m, mlen, gen_hash_type); EG(ret, err); in _rsa_iso9796_2_sign_recover() 1870 ret = gen_hash_final(&hctx, &s[k - 1 - hlen], gen_hash_type); EG(ret, err); in _rsa_iso9796_2_sign_recover() 1956 gen_hash_context hctx; in rsa_iso9796_2_verify_recover() local 2000 ret = gen_hash_init(&hctx, gen_hash_type); EG(ret, err); in rsa_iso9796_2_verify_recover() 2001 ret = gen_hash_update(&hctx, &X[1], m1len_, gen_hash_type); EG(ret, err); in rsa_iso9796_2_verify_recover() 2002 ret = gen_hash_update(&hctx, m2, m2len, gen_hash_type); EG(ret, err); in rsa_iso9796_2_verify_recover() 2003 ret = gen_hash_final(&hctx, H, gen_hash_type); EG(ret, err); in rsa_iso9796_2_verify_recover()
|
/freebsd/sys/sys/ |
H A D | socketvar.h | 464 void *hctx; /* hook point specific data*/ member
|