File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -206,6 +206,13 @@ def compress_G2(pt: G2Uncompressed) -> G2Compressed:
206
206
])
207
207
)
208
208
209
+ # Point in the correct subgroup but in the wrong curve
210
+ # (isomorphic curve y^2 = x^3 + 24)
211
+ G1_in_correct_subgroup_invalid_curve = (
212
+ FQ (1563311815873081220285993675342141245310974220297818772030154712466505762317169118162528189777729008132203959344556 ),
213
+ FQ (3236674100890915460738904118849163307977137634186030159846763358736164886129980111795846993376080270444574334963907 )
214
+ )
215
+
209
216
210
217
PRIVKEYS = [
211
218
hex_to_int ('0x00000000000000000000000000000000263dbd792f5b1be47ed85f8938c0f29586af0d3ac7b977f21c278fe1462040e3' ),
@@ -2195,6 +2202,16 @@ def case12_fail_mul_G1():
2195
2202
+ int_to_hex (int (2 ), 32 ),
2196
2203
"ExpectedError" : "g1 point is not in the correct subgroup" ,
2197
2204
"Name" : "bls_g1mul_g1_not_in_correct_subgroup"
2205
+ },
2206
+ {
2207
+ "Input" : ""
2208
+ # G1 point (not in the correct subgroup)
2209
+ + int_to_hex (int (G1_in_correct_subgroup_invalid_curve [0 ]), 64 )
2210
+ + int_to_hex (int (G1_in_correct_subgroup_invalid_curve [1 ]), 64 )
2211
+ # scalar
2212
+ + int_to_hex (int (2 ), 32 ),
2213
+ "ExpectedError" : "invalid point: not on curve" ,
2214
+ "Name" : "bls_g1mul_g1_in_correct_subgroup_invalid_curve"
2198
2215
}
2199
2216
]
2200
2217
You can’t perform that action at this time.
0 commit comments