@@ -2697,10 +2697,23 @@ def case18_fail_pairing_check():
2697
2697
"Name" : "bls_pairing_e(G1,G2_invalid_field_element)" ,
2698
2698
},
2699
2699
{
2700
- "Input" : int_to_hex (int (G1 [0 ]) + q , 64 ) + (int_to_hex (int (G1 [1 ]), 64 )) + int_to_hex (int (G2 [0 ].coeffs [0 ]), 64 ) + int_to_hex (
2701
- int (G2 [0 ].coeffs [1 ]), 64 ) + int_to_hex (int (G2 [1 ].coeffs [0 ]), 64 ) + int_to_hex (int (G2 [1 ].coeffs [1 ]), 64 ) + int_to_hex (
2702
- int (G1 [0 ]), 64 ) + (int_to_hex (int (G1 [1 ]), 64 )) + int_to_hex (int (neg (G2 )[0 ].coeffs [0 ]), 64 ) + int_to_hex (
2703
- int (neg (G2 )[0 ].coeffs [1 ]), 64 ) + int_to_hex (int (neg (G2 )[1 ].coeffs [0 ]), 64 ) + int_to_hex (int (neg (G2 )[1 ].coeffs [1 ]), 64 ),
2700
+ "Input" : ""
2701
+ # G1 point (wrong encoding)
2702
+ + int_to_hex (int (G1 [0 ]) + q , 64 )
2703
+ + int_to_hex (int (G1 [1 ]), 64 )
2704
+ # G2 point 1
2705
+ + int_to_hex (int (G2 [0 ].coeffs [0 ]), 64 )
2706
+ + int_to_hex (int (G2 [0 ].coeffs [1 ]), 64 )
2707
+ + int_to_hex (int (G2 [1 ].coeffs [0 ]), 64 )
2708
+ + int_to_hex (int (G2 [1 ].coeffs [1 ]), 64 )
2709
+ # G1 point 2
2710
+ + int_to_hex (int (G1 [0 ]), 64 )
2711
+ + int_to_hex (int (G1 [1 ]), 64 )
2712
+ # G2 point 2
2713
+ + int_to_hex (int (neg (G2 )[0 ].coeffs [0 ]), 64 )
2714
+ + int_to_hex (int (neg (G2 )[0 ].coeffs [1 ]), 64 )
2715
+ + int_to_hex (int (neg (G2 )[1 ].coeffs [0 ]), 64 )
2716
+ + int_to_hex (int (neg (G2 )[1 ].coeffs [1 ]), 64 ),
2704
2717
"ExpectedError" : "invalid fp.Element encoding" ,
2705
2718
"Name" : "bls_pairing_e(G1_invalid_field_element,-G2)=e(-G1,G2)" ,
2706
2719
},
0 commit comments