Skip to content

Commit 49b2a0c

Browse files
committed
adding more tests
1 parent 089a978 commit 49b2a0c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

main.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,22 @@ def compress_G2(pt: G2Uncompressed) -> G2Compressed:
214214
)
215215

216216

217+
# Point in the correct subgroup but in the invalid curve
218+
# (isomorphic curve y^2 = x^3 +
219+
# (4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559679*i
220+
# +4002409555221667393417789825735904156556882819939007885332058136124031650490837864442687629129015664037894272559679))
221+
G2_not_in_correct_subgroup = (
222+
FQ2([
223+
3260589230528518565152427752655275816224272421636337760570971660512682917312168367022920113321683608097873411948046,
224+
2682010315718998361906236801126389678955008036316860700009564378603125513214046636630765687237948267280392735402121
225+
]),
226+
FQ2([
227+
3874506299606973203009679409496841802766716505215050707701829465035115765455866172400205473037925034091373033409956,
228+
1429176592344479491745874702409109050659748424161659281885403188155138940704965631008642299070913936605324262095503
229+
])
230+
)
231+
232+
217233
PRIVKEYS = [
218234
hex_to_int('0x00000000000000000000000000000000263dbd792f5b1be47ed85f8938c0f29586af0d3ac7b977f21c278fe1462040e3'),
219235
hex_to_int('0x0000000000000000000000000000000047b8192d77bf871b62e87859d653922725724a5c031afeabc60bcef5ff665138'),

0 commit comments

Comments
 (0)