Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pairings can't be added #132

Open
FilipLaurentiu opened this issue Dec 8, 2023 · 0 comments
Open

Pairings can't be added #132

FilipLaurentiu opened this issue Dec 8, 2023 · 0 comments

Comments

@FilipLaurentiu
Copy link

What happened?

The library can't be used to add pairings result together. This can be helpful for off-chain testing

Code that produced the error

from py_ecc.bn128 import G1, G2, multiply, pairing, add

p1 = pairing(G2, multiply(G1, 4))
p2 = pairing(multiply(G2, 4), G1)
p3 = pairing(G2, multiply(G1, 8))


assert p1 == p2, "Fail 1"
assert add(p1, p2) == p3, "Fail 2"

Full error output

python3.9/site-packages/py_ecc/bn128/bn128_curve.py", line 87, in add
    x1, y1 = p1
TypeError: cannot unpack non-iterable bn128_FQ12 object

Fill this section in if you know how this could or should be fixed

No response

py-ecc Version

6.0.0

Python Version

3.9

Operating System

linux

Output from pip freeze

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant