From 810ed006b10da844192e486ac3d4daaa1da8e31d Mon Sep 17 00:00:00 2001 From: Antonio Sanso Date: Tue, 23 Apr 2024 14:14:52 +0200 Subject: [PATCH] fail pairing --- main.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/main.py b/main.py index 461ec4a..a1633b8 100644 --- a/main.py +++ b/main.py @@ -1373,6 +1373,14 @@ def case18_fail_pairing_check(): int(neg(G2)[0].coeffs[1]), 64) + int_to_hex(int(neg(G2)[1].coeffs[0]), 64) + int_to_hex(int(neg(G2)[1].coeffs[1]), 64), "ExpectedError": "invalid fp.Element encoding", "Name": "bls_pairing_invalid_field_element" + }, + { + "Input": int_to_hex(int(G1[0]), 64) + (int_to_hex(int(P1[1]), 64)) + int_to_hex(int(G2[0].coeffs[0]), 64) + int_to_hex( + int(G2[0].coeffs[1]), 64) + int_to_hex(int(G2[1].coeffs[0]), 64) + int_to_hex(int(G2[1].coeffs[1]), 64) + int_to_hex( + int(G1[0]), 64) + (int_to_hex(int(G1[1]), 64)) + int_to_hex(int(neg(G2)[0].coeffs[0]), 64) + int_to_hex( + int(neg(G2)[0].coeffs[1]), 64) + int_to_hex(int(neg(G2)[1].coeffs[0]), 64) + int_to_hex(int(neg(G2)[1].coeffs[1]), 64), + "ExpectedError": "invalid point: not on curve", + "Name": "bls_pairing_g1_not_on_curve" } ]