Home
last modified time | relevance | path

Searched refs:ctx_srv (Results 1 – 2 of 2) sorted by relevance

/net-tools-2.7.6/mbedtls-2.4.0/programs/pkey/
Decdh_curve25519.c55 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()
[all …]
/net-tools-2.7.6/mbedtls-2.4.0/tests/suites/
Dtest_suite_dhm.function14 mbedtls_dhm_context ctx_srv;
28 mbedtls_dhm_init( &ctx_srv );
39 TEST_ASSERT( mbedtls_mpi_read_string( &ctx_srv.P, radix_P, input_P ) == 0 );
40 TEST_ASSERT( mbedtls_mpi_read_string( &ctx_srv.G, radix_G, input_G ) == 0 );
41 x_size = mbedtls_mpi_size( &ctx_srv.P );
47 …TEST_ASSERT( mbedtls_dhm_make_params( &ctx_srv, x_size, ske, &ske_len, &rnd_pseudo_rand, &rnd_info…
53 TEST_ASSERT( mbedtls_dhm_read_public( &ctx_srv, pub_cli, pub_cli_len ) == 0 );
55 …TEST_ASSERT( mbedtls_dhm_calc_secret( &ctx_srv, sec_srv, sizeof( sec_srv ), &sec_srv_len, &rnd_pse…
66 …TEST_ASSERT( mbedtls_dhm_calc_secret( &ctx_srv, sec_srv, sizeof( sec_srv ), &sec_srv_len, &rnd_pse…
78 …TEST_ASSERT( mbedtls_dhm_make_params( &ctx_srv, x_size, ske, &ske_len, &rnd_pseudo_rand, &rnd_info…
[all …]