Skip to content

Commit 8227de2

Browse files
committed
improving formatting
1 parent 210c002 commit 8227de2

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

main.py

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2697,10 +2697,23 @@ def case18_fail_pairing_check():
26972697
"Name": "bls_pairing_e(G1,G2_invalid_field_element)",
26982698
},
26992699
{
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),
27042717
"ExpectedError": "invalid fp.Element encoding",
27052718
"Name": "bls_pairing_e(G1_invalid_field_element,-G2)=e(-G1,G2)",
27062719
},

0 commit comments

Comments
 (0)