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

KZG core functionality #73

Merged
merged 16 commits into from
Feb 27, 2024
Merged

KZG core functionality #73

merged 16 commits into from
Feb 27, 2024

Conversation

danielSanchezQ
Copy link
Collaborator

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

from sympy import ntt, intt


class Polynomial[T]:
Copy link
Collaborator Author

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.

@megonen
Copy link
Contributor

megonen commented Feb 27, 2024

Maybe adding "verify setup" can be helpful to check the integrity of trusted setup procedure.

@megonen
Copy link
Contributor

megonen commented Feb 27, 2024

LGTM

@danielSanchezQ danielSanchezQ merged commit d15eaa2 into master Feb 27, 2024
1 check passed
class TestKZG(TestCase):

@staticmethod
def rand_bytes(size=1024):
Copy link
Contributor

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it is

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

Successfully merging this pull request may close these issues.

None yet

3 participants