@@ -206,7 +206,7 @@ def compress_G2(pt: G2Uncompressed) -> G2Compressed:
206
206
])
207
207
)
208
208
209
- # Point in the correct subgroup but in the wrong curve
209
+ # Point in the correct subgroup but in the invalid curve
210
210
# (isomorphic curve y^2 = x^3 + 24)
211
211
G1_in_correct_subgroup_invalid_curve = (
212
212
FQ (1563311815873081220285993675342141245310974220297818772030154712466505762317169118162528189777729008132203959344556 ),
@@ -2047,7 +2047,18 @@ def case10_fail_add_G1():
2047
2047
+ int_to_hex (int (P1 [1 ]), 64 ),
2048
2048
"ExpectedError" : "invalid field element top bytes" ,
2049
2049
"Name" : "bls_g1add_violate_top_bytes"
2050
- }
2050
+ },
2051
+ {
2052
+ "Input" : ""
2053
+ # G1 point (not in correct subgroup but invalid curve)
2054
+ + int_to_hex (int (G1_in_correct_subgroup_invalid_curve [0 ]), 64 )
2055
+ + int_to_hex (int (G1_in_correct_subgroup_invalid_curve [1 ]), 64 )
2056
+ # P1 point
2057
+ + int_to_hex (int (P1 [0 ]), 64 )
2058
+ + int_to_hex (int (P1 [1 ]), 64 ),
2059
+ "ExpectedError" : "invalid point: not on curve" ,
2060
+ "Name" : "bls_g1add_point_in_correct_subgroup_invalid_curve"
2061
+ },
2051
2062
]
2052
2063
2053
2064
@@ -2205,7 +2216,7 @@ def case12_fail_mul_G1():
2205
2216
},
2206
2217
{
2207
2218
"Input" : ""
2208
- # G1 point (not in the correct subgroup)
2219
+ # G1 point (not in correct subgroup but invalid curve )
2209
2220
+ int_to_hex (int (G1_in_correct_subgroup_invalid_curve [0 ]), 64 )
2210
2221
+ int_to_hex (int (G1_in_correct_subgroup_invalid_curve [1 ]), 64 )
2211
2222
# scalar
0 commit comments