Lines Matching refs:ecx

76 static const OSSL_HPKE_KEM_INFO *get_kem_info(ECX_KEY *ecx)  in get_kem_info()  argument
80 if (ecx->type == ECX_KEY_TYPE_X25519) in get_kem_info()
91 static int recipient_key_set(PROV_ECX_CTX *ctx, ECX_KEY *ecx) in recipient_key_set() argument
95 if (ecx != NULL) { in recipient_key_set()
96 ctx->info = get_kem_info(ecx); in recipient_key_set()
100 if (!ossl_ecx_key_up_ref(ecx)) in recipient_key_set()
102 ctx->recipient_key = ecx; in recipient_key_set()
111 static int sender_authkey_set(PROV_ECX_CTX *ctx, ECX_KEY *ecx) in sender_authkey_set() argument
116 if (ecx != NULL) { in sender_authkey_set()
117 if (!ossl_ecx_key_up_ref(ecx)) in sender_authkey_set()
119 ctx->sender_authkey = ecx; in sender_authkey_set()
132 ECX_KEY *ecx = NULL; in ecxkey_pubfromdata() local
139 ecx = ossl_ecx_key_new(ctx->libctx, ctx->recipient_key->type, 1, ctx->propq); in ecxkey_pubfromdata()
140 if (ecx == NULL) in ecxkey_pubfromdata()
142 if (ossl_ecx_key_fromdata(ecx, params, 0) <= 0) { in ecxkey_pubfromdata()
143 ossl_ecx_key_free(ecx); in ecxkey_pubfromdata()
144 ecx = NULL; in ecxkey_pubfromdata()
146 return ecx; in ecxkey_pubfromdata()
149 static unsigned char *ecx_pubkey(ECX_KEY *ecx) in ecx_pubkey() argument
151 if (ecx == NULL || !ecx->haspubkey) { in ecx_pubkey()
155 return ecx->pubkey; in ecx_pubkey()
184 static int ecx_key_check(const ECX_KEY *ecx, int requires_privatekey) in ecx_key_check() argument
186 if (ecx->privkey == NULL) in ecx_key_check()
196 ECX_KEY *ecx = vecx; in ecxkem_init() local
202 if (!ecx_key_check(ecx, operation == EVP_PKEY_OP_DECAPSULATE)) in ecxkem_init()
204 rv = recipient_key_set(ctx, ecx); in ecxkem_init()
338 int ossl_ecx_dhkem_derive_private(ECX_KEY *ecx, unsigned char *privout, in ossl_ecx_dhkem_derive_private() argument
345 const OSSL_HPKE_KEM_INFO *info = get_kem_info(ecx); in ossl_ecx_dhkem_derive_private()
355 kdfctx = ossl_kdf_ctx_create("HKDF", info->mdname, ecx->libctx, ecx->propq); in ossl_ecx_dhkem_derive_private()