File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -3101,14 +3101,17 @@ void test_ge(void) {
3101
3101
3102
3102
/* Test batch gej -> ge conversion with many infinities. */
3103
3103
for (i = 0 ; i < 4 * runs + 1 ; i ++ ) {
3104
+ int odd ;
3104
3105
random_group_element_test (& ge [i ]);
3106
+ odd = secp256k1_fe_is_odd (& ge [i ].x );
3107
+ CHECK (odd == 0 || odd == 1 );
3105
3108
/* randomly set half the points to infinity */
3106
- if ( secp256k1_fe_is_odd ( & ge [ i ]. x ) ) {
3109
+ if ( odd == i % 2 ) {
3107
3110
secp256k1_ge_set_infinity (& ge [i ]);
3108
3111
}
3109
3112
secp256k1_gej_set_ge (& gej [i ], & ge [i ]);
3110
3113
}
3111
- /* batch invert */
3114
+ /* batch convert */
3112
3115
secp256k1_ge_set_all_gej_var (ge , gej , 4 * runs + 1 );
3113
3116
/* check result */
3114
3117
for (i = 0 ; i < 4 * runs + 1 ; i ++ ) {
You can’t perform that action at this time.
0 commit comments