Skip to content

Commit d1493e1

Browse files
committed
renaming
1 parent 378d945 commit d1493e1

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

main.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def compress_G2(pt: G2Uncompressed) -> G2Compressed:
188188

189189
# Point not in subgroup
190190
# (order 11 * 10177 * 859267 * 52437899 * 52435875175126190479447740508185965837690552500527637822603658699938581184513) for curve over FQ
191-
G1_wrong_order = (
191+
G1_not_in_correct_subgroup = (
192192
FQ(175120027539531016442854006573889751122153014990298010045047409866982914293422983043097473453160715743839524736495),
193193
FQ(3886161143382294459707944199964771025143673781268592314417728386394555910678469538674068117321209145872489588747338)
194194
)
@@ -285,7 +285,7 @@ def case01_add_G1():
285285
result_comm1 = add(G1, P1)
286286
result_comm2 = add(P1, G1)
287287
assert result_comm1 == result_comm2
288-
result_add_wrong_order = add(G1_wrong_order, G1)
288+
result_add_not_in_correct_subgroup = add(G1_not_in_correct_subgroup, G1)
289289
# Identity element
290290
result_identity_G1 = add(G1, None)
291291
assert G1 == result_identity_G1
@@ -332,13 +332,13 @@ def case01_add_G1():
332332
{
333333
"Input": ""
334334
# G1 point (wrong order)
335-
+ int_to_hex(int(G1_wrong_order[0]), 64)
336-
+ int_to_hex(int(G1_wrong_order[1]), 64)
335+
+ int_to_hex(int(G1_not_in_correct_subgroup[0]), 64)
336+
+ int_to_hex(int(G1_not_in_correct_subgroup[1]), 64)
337337
# G1 point
338338
+ int_to_hex(int(G1[0]), 64)
339339
+ int_to_hex(int(G1[1]), 64),
340-
"Name": "bls_g1add_g1_wrong_order+g1",
341-
"Expected": int_to_hex(int(result_add_wrong_order[0]), 64) + (int_to_hex(int(result_add_wrong_order[1]), 64)),
340+
"Name": "bls_g1add_g1_not_in_correct_subgroup+g1",
341+
"Expected": int_to_hex(int(result_add_not_in_correct_subgroup[0]), 64) + (int_to_hex(int(result_add_not_in_correct_subgroup[1]), 64)),
342342
"Gas": BLS12_G1ADD_GAS,
343343
"NoBenchmark": False
344344
},
@@ -2189,8 +2189,8 @@ def case12_fail_mul_G1():
21892189
{
21902190
"Input": ""
21912191
# G1 point (not in the correct subgroup)
2192-
+ int_to_hex(int(G1_wrong_order[0]), 64)
2193-
+ int_to_hex(int(G1_wrong_order[1]), 64)
2192+
+ int_to_hex(int(G1_not_in_correct_subgroup[0]), 64)
2193+
+ int_to_hex(int(G1_not_in_correct_subgroup[1]), 64)
21942194
# scalar
21952195
+ int_to_hex(int(2), 32),
21962196
"ExpectedError": "g1 point is not in the correct subgroup",
@@ -2426,8 +2426,8 @@ def case16_fail_msm_G1():
24262426
{
24272427
"Input": ""
24282428
# G1 point (not in the correct subgroup)
2429-
+ int_to_hex(int(G1_wrong_order[0]), 64)
2430-
+ int_to_hex(int(G1_wrong_order[1]), 64)
2429+
+ int_to_hex(int(G1_not_in_correct_subgroup[0]), 64)
2430+
+ int_to_hex(int(G1_not_in_correct_subgroup[1]), 64)
24312431
# scalar
24322432
+ int_to_hex(int(2), 32)
24332433
# P1 point
@@ -2831,8 +2831,8 @@ def case18_fail_pairing_check():
28312831
{
28322832
"Input": ""
28332833
# G1 point (not on curve)
2834-
+ int_to_hex(int(G1_wrong_order[0]), 64)
2835-
+ int_to_hex(int(G1_wrong_order[1]), 64)
2834+
+ int_to_hex(int(G1_not_in_correct_subgroup[0]), 64)
2835+
+ int_to_hex(int(G1_not_in_correct_subgroup[1]), 64)
28362836
# G2 point (point at infinity)
28372837
+ int_to_hex(0, 256),
28382838
"ExpectedError": "g1 point is not in the correct subgroup",
@@ -2853,8 +2853,8 @@ def case18_fail_pairing_check():
28532853
{
28542854
"Input": ""
28552855
# G1 point (not on curve)
2856-
+ int_to_hex(int(G1_wrong_order[0]), 64)
2857-
+ int_to_hex(int(G1_wrong_order[1]), 64)
2856+
+ int_to_hex(int(G1_not_in_correct_subgroup[0]), 64)
2857+
+ int_to_hex(int(G1_not_in_correct_subgroup[1]), 64)
28582858
# G2 point
28592859
+ int_to_hex(int(G2[0].coeffs[0]), 64)
28602860
+ int_to_hex(int(G2[0].coeffs[1]), 64)
@@ -2879,8 +2879,8 @@ def case18_fail_pairing_check():
28792879
{
28802880
"Input": ""
28812881
# G1 point 1 (not in the correct subgroup)
2882-
+ int_to_hex(int(G1_wrong_order[0]), 64)
2883-
+ int_to_hex(int(G1_wrong_order[1]), 64)
2882+
+ int_to_hex(int(G1_not_in_correct_subgroup[0]), 64)
2883+
+ int_to_hex(int(G1_not_in_correct_subgroup[1]), 64)
28842884
# G2 point 1
28852885
+ int_to_hex(int(G2[0].coeffs[0]), 64)
28862886
+ int_to_hex(int(G2[0].coeffs[1]), 64)

0 commit comments

Comments
 (0)