Lines Matching refs:ctx_srv
55 mbedtls_ecdh_context ctx_cli, ctx_srv; in main() local
64 mbedtls_ecdh_init( &ctx_srv ); in main()
120 ret = mbedtls_ecp_group_load( &ctx_srv.grp, MBEDTLS_ECP_DP_CURVE25519 ); in main()
127 ret = mbedtls_ecdh_gen_public( &ctx_srv.grp, &ctx_srv.d, &ctx_srv.Q, in main()
135 ret = mbedtls_mpi_write_binary( &ctx_srv.Q.X, srv_to_cli, 32 ); in main()
150 ret = mbedtls_mpi_lset( &ctx_srv.Qp.Z, 1 ); in main()
157 ret = mbedtls_mpi_read_binary( &ctx_srv.Qp.X, cli_to_srv, 32 ); in main()
164 ret = mbedtls_ecdh_compute_shared( &ctx_srv.grp, &ctx_srv.z, in main()
165 &ctx_srv.Qp, &ctx_srv.d, in main()
212 ret = mbedtls_mpi_cmp_mpi( &ctx_cli.z, &ctx_srv.z ); in main()
229 mbedtls_ecdh_free( &ctx_srv ); in main()