Home
last modified time | relevance | path

Searched refs:hmac_ctx (Results 1 – 22 of 22) sorted by relevance

/freebsd/contrib/bearssl/src/kdf/
H A Dhkdf.c43 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()
51 br_hmac_update(&hc->u.hmac_ctx, ikm, ikm_len); in br_hkdf_inject()
60 br_hmac_out(&hc->u.hmac_ctx, tmp); in br_hkdf_flip()
62 br_hmac_get_digest(&hc->u.hmac_ctx), tmp, hc->dig_len); in br_hkdf_flip()
79 br_hmac_context hmac_ctx; in br_hkdf_produce() local
87 br_hmac_init(&hmac_ctx, &hc->u.prk_ctx, 0); in br_hkdf_produce()
89 br_hmac_update(&hmac_ctx, hc->buf, hc->dig_len); in br_hkdf_produce()
91 br_hmac_update(&hmac_ctx, info, info_len); in br_hkdf_produce()
92 br_hmac_update(&hmac_ctx, &x, 1); in br_hkdf_produce()
[all …]
/freebsd/crypto/openssh/
H A Dmac.c101 if ((mac->hmac_ctx = ssh_hmac_start(macalg->alg)) == NULL) in mac_setup_by_alg()
137 if (mac->hmac_ctx == NULL || in mac_init()
138 ssh_hmac_init(mac->hmac_ctx, mac->key, mac->key_len) < 0) in mac_init()
173 if (ssh_hmac_init(mac->hmac_ctx, NULL, 0) < 0 || in mac_compute()
174 ssh_hmac_update(mac->hmac_ctx, b, sizeof(b)) < 0 || in mac_compute()
175 ssh_hmac_update(mac->hmac_ctx, data, datalen) < 0 || in mac_compute()
176 ssh_hmac_final(mac->hmac_ctx, u.m, sizeof(u.m)) < 0) in mac_compute()
227 } else if (mac->hmac_ctx != NULL) in mac_clear()
228 ssh_hmac_free(mac->hmac_ctx); in mac_clear()
229 mac->hmac_ctx = NULL; in mac_clear()
H A Dmac.h39 struct ssh_hmac_ctx *hmac_ctx; member
/freebsd/crypto/openssl/crypto/slh_dsa/
H A Dslh_dsa_hash_ctx.c52 ret->hmac_ctx = EVP_MAC_CTX_new(key->hmac); in ossl_slh_dsa_hash_ctx_new()
53 if (ret->hmac_ctx == NULL) in ossl_slh_dsa_hash_ctx_new()
90 if (src->hmac_ctx != NULL in ossl_slh_dsa_hash_ctx_dup()
91 && (ret->hmac_ctx = EVP_MAC_CTX_dup(src->hmac_ctx)) == NULL) in ossl_slh_dsa_hash_ctx_dup()
111 EVP_MAC_CTX_free(ctx->hmac_ctx); in ossl_slh_dsa_hash_ctx_free()
H A Dslh_dsa_local.h55 EVP_MAC_CTX *hmac_ctx; /* required by SHA algorithms for PRFmsg() */ member
H A Dslh_hash.c184 EVP_MAC_CTX *mctx = hctx->hmac_ctx; in slh_prf_msg_sha2()
/freebsd/sys/contrib/openzfs/include/os/freebsd/zfs/sys/
H A Dfreebsd_crypto.h72 typedef struct hmac_ctx { struct
82 void crypto_mac_init(struct hmac_ctx *ctx, const crypto_key_t *key); argument
83 void crypto_mac_update(struct hmac_ctx *ctx, const void *data,
85 void crypto_mac_final(struct hmac_ctx *ctx, void *out_data,
/freebsd/sys/geom/eli/
H A Dg_eli_hmac.c46 g_eli_crypto_hmac_init(struct hmac_ctx *ctx, const char *hkey, in g_eli_crypto_hmac_init()
82 g_eli_crypto_hmac_update(struct hmac_ctx *ctx, const uint8_t *data, in g_eli_crypto_hmac_update()
90 g_eli_crypto_hmac_final(struct hmac_ctx *ctx, uint8_t *md, size_t mdsize) in g_eli_crypto_hmac_final()
113 struct hmac_ctx ctx; in g_eli_crypto_hmac()
H A Dg_eli.h729 struct hmac_ctx { struct
734 void g_eli_crypto_hmac_init(struct hmac_ctx *ctx, const char *hkey, argument
736 void g_eli_crypto_hmac_update(struct hmac_ctx *ctx, const uint8_t *data,
738 void g_eli_crypto_hmac_final(struct hmac_ctx *ctx, uint8_t *md, size_t mdsize);
H A Dpkcs5v2.c68 struct hmac_ctx startpoint, ctx; in pkcs5v2_genkey_raw()
H A Dg_eli.c1280 g_eli_keyfiles_load(struct hmac_ctx *ctx, const char *provider) in g_eli_keyfiles_load()
1352 struct hmac_ctx ctx; in g_eli_taste()
/freebsd/crypto/libecc/src/sig/
H A Decdsa_common.c57 hmac_context hmac_ctx; in __ecdsa_rfc6979_nonce() local
81 ret = hmac_init(&hmac_ctx, K, hsize, hash_type); EG(ret, err); in __ecdsa_rfc6979_nonce()
82 ret = hmac_update(&hmac_ctx, V, hsize); EG(ret, err); in __ecdsa_rfc6979_nonce()
85 ret = hmac_update(&hmac_ctx, &tmp, 1); EG(ret, err); in __ecdsa_rfc6979_nonce()
86 ret = hmac_update(&hmac_ctx, priv_key_buff, q_len); EG(ret, err); in __ecdsa_rfc6979_nonce()
95 ret = hmac_update(&hmac_ctx, T, q_len); EG(ret, err); in __ecdsa_rfc6979_nonce()
97 ret = hmac_finalize(&hmac_ctx, K, &hmac_size); EG(ret, err); in __ecdsa_rfc6979_nonce()
103 ret = hmac_init(&hmac_ctx, K, hsize, hash_type); EG(ret, err); in __ecdsa_rfc6979_nonce()
104 ret = hmac_update(&hmac_ctx, V, hsize); EG(ret, err); in __ecdsa_rfc6979_nonce()
107 ret = hmac_update(&hmac_ctx, &tmp, 1); EG(ret, err); in __ecdsa_rfc6979_nonce()
[all …]
/freebsd/sys/contrib/openzfs/module/os/freebsd/zfs/
H A Dcrypto_os.c56 crypto_mac_init(struct hmac_ctx *ctx, const crypto_key_t *c_key) in crypto_mac_init()
101 crypto_mac_update(struct hmac_ctx *ctx, const void *data, size_t datasize) in crypto_mac_update()
107 crypto_mac_final(struct hmac_ctx *ctx, void *md, size_t mdsize) in crypto_mac_final()
130 struct hmac_ctx ctx; in crypto_mac()
H A Dhkdf.c41 struct hmac_ctx ctx; in hkdf_sha512_expand()
H A Dzio_crypt.c1020 struct hmac_ctx hash_ctx; in zio_crypt_do_objset_hmacs()
1021 struct hmac_ctx *ctx = &hash_ctx; in zio_crypt_do_objset_hmacs()
/freebsd/contrib/unbound/util/
H A Dnet_help.c122 EVP_MAC_CTX *hmac_ctx,
124 HMAC_CTX* hmac_ctx,
1897 EVP_MAC_CTX *hmac_ctx, in tls_session_ticket_key_cb() argument
1899 HMAC_CTX* hmac_ctx, in tls_session_ticket_key_cb()
1935 EVP_MAC_CTX_set_params(hmac_ctx, params); in tls_session_ticket_key_cb()
1937 EVP_MAC_set_ctx_params(hmac_ctx, params); in tls_session_ticket_key_cb()
1940 if (HMAC_Init_ex(hmac_ctx, ticket_keys->hmac_key, 32, digest, NULL) != 1) { in tls_session_ticket_key_cb()
1945 HMAC_Init_ex(hmac_ctx, ticket_keys->hmac_key, 32, digest, NULL); in tls_session_ticket_key_cb()
1970 EVP_MAC_CTX_set_params(hmac_ctx, params); in tls_session_ticket_key_cb()
1972 EVP_MAC_set_ctx_params(hmac_ctx, params); in tls_session_ticket_key_cb()
[all …]
/freebsd/contrib/bearssl/inc/
H A Dbearssl_kdf.h122 br_hmac_context hmac_ctx; member
/freebsd/lib/geom/eli/
H A Dgeom_eli.c371 struct hmac_ctx *ctxp, char *passbuf, size_t passbufsize) in eli_genkey_files()
487 struct hmac_ctx *ctxp) in eli_genkey_passphrase()
572 eli_init_key_hmac_ctx(struct gctl_req *req, struct hmac_ctx *ctx, bool new) in eli_init_key_hmac_ctx()
593 eli_genkey(struct gctl_req *req, const struct hmac_ctx *ctxtemplate, in eli_genkey()
596 struct hmac_ctx ctx; in eli_genkey()
612 struct hmac_ctx ctx; in eli_genkey_single()
735 struct hmac_ctx ctxtemplate; in eli_init()
1050 struct hmac_ctx ctxtemplate; in eli_attach()
/freebsd/sys/contrib/openzfs/module/icp/io/
H A Dsha2_mod.c392 sha2_hmac_ctx_t *hmac_ctx = ctx->cc_provider_private; in sha2_mac_init() local
400 &hmac_ctx->hc_icontext, in sha2_mac_init()
/freebsd/stand/libsa/geli/
H A Dgeliboot.c224 struct hmac_ctx ctx; in geli_probe()
/freebsd/contrib/unbound/
H A Dconfigure.ac1143 HMAC_CTX* hmac_ctx = NULL;
1146 int x = HMAC_Init_ex(hmac_ctx, hmac_key, 32, digest, NULL);
H A Dconfigure22141 HMAC_CTX* hmac_ctx = NULL;
22144 int x = HMAC_Init_ex(hmac_ctx, hmac_key, 32, digest, NULL);