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);
}
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: