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

Added Pedersen commitment in stdlib based on ECC. #1321

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

only4sim
Copy link
Contributor

512bit.zok adds support for Pedersen commitment based on the existing ECC library. This lib will commit a value on a field to a twisted Edwards curve via Pedersen Commitment. The parameter input is the value to be committed, and r is the blinding factor. The output is the corresponding Pedersen commit, a point on the curve. The library can be imported with the following command: import "commitments/pedersen/512bit" as pc;
The complete calling process is as follows:

from "ecc/babyjubjubParams" import BabyJubJubParams;
import "ecc/babyjubjubParams" as context;
import "commitments/pedersen/512bit" as pc;



def main(field input, field r) -> field[2] {
    BabyJubJubParams context = context();

    return pc(input, r, context);

}

@only4sim only4sim changed the title Added Pedersen commitment int stdlib based on ECC. Added Pedersen commitment in stdlib based on ECC. May 31, 2023
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.

1 participant