Skip to content

Commit 9a6ae31

Browse files
committed
adding more tests
1 parent ac842fe commit 9a6ae31

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

main.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2647,6 +2647,25 @@ def case17_fail_msm_G2():
26472647
+ int_to_hex(int(2), 32),
26482648
"ExpectedError": "g2 point is not in the correct subgroup",
26492649
"Name": "bls_pairing_g2_not_in_correct_subgroup"
2650+
},
2651+
{
2652+
"Input": ""
2653+
# G2 point (not in correct subgroup but invalid curve)
2654+
+ int_to_hex(int(G2_in_correct_subgroup_invalid_curve[0].coeffs[0]), 64)
2655+
+ int_to_hex(int(G2_in_correct_subgroup_invalid_curve[0].coeffs[1]), 64)
2656+
+ int_to_hex(int(G2_in_correct_subgroup_invalid_curve[1].coeffs[0]), 64)
2657+
+ int_to_hex(int(G2_in_correct_subgroup_invalid_curve[1].coeffs[1]), 64)
2658+
# scalar
2659+
+ int_to_hex(int(2), 32)
2660+
# P2 point
2661+
+ int_to_hex(int(P2[0].coeffs[0]), 64)
2662+
+ int_to_hex(int(P2[0].coeffs[1]), 64)
2663+
+ int_to_hex(int(P2[1].coeffs[0]), 64)
2664+
+ int_to_hex(int(P2[1].coeffs[1]), 64)
2665+
# scalar
2666+
+ int_to_hex(int(2), 32),
2667+
"ExpectedError": "invalid point: not on curve",
2668+
"Name": "bls_g2msm_point_in_correct_subgroup_invalid_curve"
26502669
}
26512670
]
26522671

0 commit comments

Comments
 (0)