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

Add final exp in yul #49

Merged
merged 32 commits into from
Sep 8, 2023
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
ce0b22d
Add function utils to check elements in curve and twisted curve
IAvecilla Aug 30, 2023
29a1927
Add conditional for g2 from affine
IAvecilla Aug 30, 2023
10e6d3b
Add tests for conjugate in fp12 and fp2
IAvecilla Aug 30, 2023
d5afe27
Fix miller loop errors
IAvecilla Aug 30, 2023
4a51691
Add pair function
IAvecilla Aug 30, 2023
c06240e
Add pairing test from eth tests
IAvecilla Aug 30, 2023
8408daf
Correct NAF representation
IAvecilla Aug 31, 2023
abe9d5e
Change exponentiation impl to be able to test it correctly
IAvecilla Aug 31, 2023
54bf3fd
Correct point doubling and miller loop
IAvecilla Aug 31, 2023
4cb2e48
Add test for point doubling and line evaluation
IAvecilla Aug 31, 2023
5e34f22
add addition tests
ColoCarletti Aug 31, 2023
cb69bea
Add tests for frobenius
IAvecilla Sep 4, 2023
141f647
Add line evaluation test after point addition
IAvecilla Sep 4, 2023
29840f1
Add point doubling and adding functions for projective coordinates
IAvecilla Sep 6, 2023
adf7a86
Fix in miller loop function
IAvecilla Sep 6, 2023
4cdcc8c
Add test refactors with new functions
IAvecilla Sep 6, 2023
fda67c5
Fix constant for fp12
IAvecilla Sep 6, 2023
ccb20e3
Add functions for g2 in projective and affine
IAvecilla Sep 6, 2023
94d199b
Fix NAF representation
IAvecilla Sep 6, 2023
70aca4f
add eth tests
ColoCarletti Sep 6, 2023
f8283a1
add tests names
ColoCarletti Sep 6, 2023
f65e4f8
add expt
ColoCarletti Sep 7, 2023
12c9285
change final_exp
ColoCarletti Sep 7, 2023
8d198f5
fix fp6 square
ColoCarletti Sep 7, 2023
591cef7
Delete test generator for pairing in python
IAvecilla Sep 7, 2023
7c71f00
Delete unnecesary comments
IAvecilla Sep 7, 2023
ff1cbdf
Delete unused exponentiation function
IAvecilla Sep 7, 2023
82930d1
Delete unused import and old todo
IAvecilla Sep 7, 2023
10a1fb6
Improve naming of doubling and addition steps in miller loop
IAvecilla Sep 7, 2023
b8bafb8
add final exponentiation
ColoCarletti Sep 8, 2023
5fef4c3
merge pairing
ColoCarletti Sep 8, 2023
6e53ac0
Update precompiles/Playground.yul
ColoCarletti Sep 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add tests names
ColoCarletti committed Sep 6, 2023
commit f8283a19be383c43c28403f440c0c06a15788eac
9 changes: 6 additions & 3 deletions scripts/pairing_test.py
Original file line number Diff line number Diff line change
@@ -14,6 +14,7 @@
for element in data:
input_data = element["Input"]
expected_data = element["Expected"]
name = element["Name"]

chunks = [monty.into(int(input_data[i:i+64], 16)) for i in range(0, len(input_data), 64)]
sublistas = [chunks[i:i+6] for i in range(0, len(chunks), 6)]
@@ -29,11 +30,13 @@

tests.append({
"Input": sublistas,
"Expected": int(element["Expected"], 16)
"Expected": int(element["Expected"], 16),
"Name": name
})

for test in tests:
result = []
print("Test: ", test["Name"])
for i in test["Input"]:
result.append(pairing.pair(*i))
try:
@@ -42,7 +45,7 @@
resultado = 1
else:
resultado = 0

print(resultado == test["Expected"])
print("-> ", resultado == test["Expected"])
except:
print("Error")
print("___________")