Skip to content

Added Pedersen commitment in stdlib based on ECC.#1321

Open
only4sim wants to merge 6 commits intoZokrates:developfrom
only4sim:develop
Open

Added Pedersen commitment in stdlib based on ECC.#1321
only4sim wants to merge 6 commits intoZokrates:developfrom
only4sim:develop

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