@@ -188,7 +188,7 @@ def compress_G2(pt: G2Uncompressed) -> G2Compressed:
188
188
189
189
# Point not in subgroup
190
190
# (order 11 * 10177 * 859267 * 52437899 * 52435875175126190479447740508185965837690552500527637822603658699938581184513) for curve over FQ
191
- G1_wrong_order = (
191
+ G1_not_in_correct_subgroup = (
192
192
FQ (175120027539531016442854006573889751122153014990298010045047409866982914293422983043097473453160715743839524736495 ),
193
193
FQ (3886161143382294459707944199964771025143673781268592314417728386394555910678469538674068117321209145872489588747338 )
194
194
)
@@ -285,7 +285,7 @@ def case01_add_G1():
285
285
result_comm1 = add (G1 , P1 )
286
286
result_comm2 = add (P1 , G1 )
287
287
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 )
289
289
# Identity element
290
290
result_identity_G1 = add (G1 , None )
291
291
assert G1 == result_identity_G1
@@ -332,13 +332,13 @@ def case01_add_G1():
332
332
{
333
333
"Input" : ""
334
334
# 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 )
337
337
# G1 point
338
338
+ int_to_hex (int (G1 [0 ]), 64 )
339
339
+ 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 )),
342
342
"Gas" : BLS12_G1ADD_GAS ,
343
343
"NoBenchmark" : False
344
344
},
@@ -2189,8 +2189,8 @@ def case12_fail_mul_G1():
2189
2189
{
2190
2190
"Input" : ""
2191
2191
# 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 )
2194
2194
# scalar
2195
2195
+ int_to_hex (int (2 ), 32 ),
2196
2196
"ExpectedError" : "g1 point is not in the correct subgroup" ,
@@ -2426,8 +2426,8 @@ def case16_fail_msm_G1():
2426
2426
{
2427
2427
"Input" : ""
2428
2428
# 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 )
2431
2431
# scalar
2432
2432
+ int_to_hex (int (2 ), 32 )
2433
2433
# P1 point
@@ -2831,8 +2831,8 @@ def case18_fail_pairing_check():
2831
2831
{
2832
2832
"Input" : ""
2833
2833
# 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 )
2836
2836
# G2 point (point at infinity)
2837
2837
+ int_to_hex (0 , 256 ),
2838
2838
"ExpectedError" : "g1 point is not in the correct subgroup" ,
@@ -2853,8 +2853,8 @@ def case18_fail_pairing_check():
2853
2853
{
2854
2854
"Input" : ""
2855
2855
# 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 )
2858
2858
# G2 point
2859
2859
+ int_to_hex (int (G2 [0 ].coeffs [0 ]), 64 )
2860
2860
+ int_to_hex (int (G2 [0 ].coeffs [1 ]), 64 )
@@ -2879,8 +2879,8 @@ def case18_fail_pairing_check():
2879
2879
{
2880
2880
"Input" : ""
2881
2881
# 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 )
2884
2884
# G2 point 1
2885
2885
+ int_to_hex (int (G2 [0 ].coeffs [0 ]), 64 )
2886
2886
+ int_to_hex (int (G2 [0 ].coeffs [1 ]), 64 )
0 commit comments