Lines Matching refs:kp
59 mbedtls_ecp_keypair kp; in lws_genec_keypair_import() local
87 mbedtls_ecp_keypair_init(&kp); in lws_genec_keypair_import()
88 if (mbedtls_ecp_group_load(&kp.MBEDTLS_PRIVATE(grp), in lws_genec_keypair_import()
97 mbedtls_mpi_read_binary(&kp.MBEDTLS_PRIVATE(d), in lws_genec_keypair_import()
102 mbedtls_ecp_set_zero(&kp.MBEDTLS_PRIVATE(Q)); in lws_genec_keypair_import()
104 if (mbedtls_mpi_read_binary(&kp.MBEDTLS_PRIVATE(Q).MBEDTLS_PRIVATE(X), in lws_genec_keypair_import()
109 if (mbedtls_mpi_read_binary(&kp.MBEDTLS_PRIVATE(Q).MBEDTLS_PRIVATE(Y), in lws_genec_keypair_import()
114 mbedtls_mpi_lset(&kp.MBEDTLS_PRIVATE(Q).MBEDTLS_PRIVATE(Z), 1); in lws_genec_keypair_import()
118 if (mbedtls_ecdh_get_params(ctx->u.ctx_ecdh, &kp, in lws_genec_keypair_import()
131 if (mbedtls_ecdsa_from_keypair(ctx->u.ctx_ecdsa, &kp)) in lws_genec_keypair_import()
149 mbedtls_ecp_keypair_free(&kp); in lws_genec_keypair_import()
243 mbedtls_ecp_keypair *kp; in lws_genecdh_new_keypair() local
267 kp = (mbedtls_ecp_keypair *)&ecdsa; in lws_genecdh_new_keypair()
269 n = mbedtls_ecdh_get_params(ctx->u.ctx_ecdh, kp, in lws_genecdh_new_keypair()
281 mpi[0] = &kp->MBEDTLS_PRIVATE(Q).MBEDTLS_PRIVATE(X); in lws_genecdh_new_keypair()
282 mpi[1] = &kp->MBEDTLS_PRIVATE(d); in lws_genecdh_new_keypair()
283 mpi[2] = &kp->MBEDTLS_PRIVATE(Q).MBEDTLS_PRIVATE(Y); in lws_genecdh_new_keypair()
325 mbedtls_ecp_keypair *kp; in lws_genecdsa_new_keypair() local
353 kp = (mbedtls_ecp_keypair *)ctx->u.ctx_ecdsa; in lws_genecdsa_new_keypair()
355 mpi[0] = &kp->MBEDTLS_PRIVATE(Q).MBEDTLS_PRIVATE(X); in lws_genecdsa_new_keypair()
356 mpi[1] = &kp->MBEDTLS_PRIVATE(d); in lws_genecdsa_new_keypair()
357 mpi[2] = &kp->MBEDTLS_PRIVATE(Q).MBEDTLS_PRIVATE(Y); in lws_genecdsa_new_keypair()