Lines Matching refs:ecdh

343          rsa, dhm, ecdsa, ecdh;  member
407 todo.ecdh = 1; in benchmark()
817 if( todo.ecdh ) in benchmark()
819 mbedtls_ecdh_context ecdh; in benchmark() local
830 mbedtls_ecdh_init( &ecdh ); in benchmark()
832 if( mbedtls_ecp_group_load( &ecdh.grp, curve_info->grp_id ) != 0 || in benchmark()
833 mbedtls_ecdh_make_public( &ecdh, &olen, buf, sizeof( buf), in benchmark()
835 mbedtls_ecp_copy( &ecdh.Qp, &ecdh.Q ) != 0 ) in benchmark()
839 ecp_clear_precomputed( &ecdh.grp ); in benchmark()
844 ret |= mbedtls_ecdh_make_public( &ecdh, &olen, buf, sizeof( buf), in benchmark()
846 ret |= mbedtls_ecdh_calc_secret( &ecdh, &olen, buf, sizeof( buf ), in benchmark()
848 mbedtls_ecdh_free( &ecdh ); in benchmark()
853 mbedtls_ecdh_init( &ecdh ); in benchmark()
856 if( mbedtls_ecp_group_load( &ecdh.grp, MBEDTLS_ECP_DP_CURVE25519 ) != 0 || in benchmark()
857 mbedtls_ecdh_gen_public( &ecdh.grp, &ecdh.d, &ecdh.Qp, myrand, NULL ) != 0 ) in benchmark()
863 ret |= mbedtls_ecdh_gen_public( &ecdh.grp, &ecdh.d, &ecdh.Q, in benchmark()
865 ret |= mbedtls_ecdh_compute_shared( &ecdh.grp, &z, &ecdh.Qp, &ecdh.d, in benchmark()
868 mbedtls_ecdh_free( &ecdh ); in benchmark()
876 mbedtls_ecdh_init( &ecdh ); in benchmark()
878 if( mbedtls_ecp_group_load( &ecdh.grp, curve_info->grp_id ) != 0 || in benchmark()
879 mbedtls_ecdh_make_public( &ecdh, &olen, buf, sizeof( buf), in benchmark()
881 mbedtls_ecp_copy( &ecdh.Qp, &ecdh.Q ) != 0 || in benchmark()
882 mbedtls_ecdh_make_public( &ecdh, &olen, buf, sizeof( buf), in benchmark()
887 ecp_clear_precomputed( &ecdh.grp ); in benchmark()
892 ret |= mbedtls_ecdh_calc_secret( &ecdh, &olen, buf, sizeof( buf ), in benchmark()
894 mbedtls_ecdh_free( &ecdh ); in benchmark()
899 mbedtls_ecdh_init( &ecdh ); in benchmark()
902 if( mbedtls_ecp_group_load( &ecdh.grp, MBEDTLS_ECP_DP_CURVE25519 ) != 0 || in benchmark()
903 mbedtls_ecdh_gen_public( &ecdh.grp, &ecdh.d, &ecdh.Qp, in benchmark()
905 mbedtls_ecdh_gen_public( &ecdh.grp, &ecdh.d, &ecdh.Q, myrand, NULL ) != 0 ) in benchmark()
911 ret |= mbedtls_ecdh_compute_shared( &ecdh.grp, &z, &ecdh.Qp, &ecdh.d, in benchmark()
914 mbedtls_ecdh_free( &ecdh ); in benchmark()