-
Notifications
You must be signed in to change notification settings - Fork 2
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
KZG core functionality #73
Conversation
from sympy import ntt, intt | ||
|
||
|
||
class Polynomial[T]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may feel too much, but, the polynomial implementations available (numpy, simpy) are way too much, they use inverse representation and they are difficult to operate with. This implementation is simple enough for our purposes.
689712e
to
81bf054
Compare
Maybe adding "verify setup" can be helpful to check the integrity of trusted setup procedure. |
added verify setup mechanism
…up verification test
LGTM |
class TestKZG(TestCase): | ||
|
||
@staticmethod | ||
def rand_bytes(size=1024): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm late to review this PR, but have a quick question. It seems like this parameter size
should be n_chunks
if I understand correctly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes it is
This is the easiest workig version of kzg we could came up with.
Commitment + Proof + Verification
Almost everything implemented from scratch for easier understanding.
No reed solomon involved which will be introduced later on in a different PR