cryptobiu / libscapi

Comprehensive Open Source Library for Secure Multiparty Computation
MIT License
180 stars 66 forks source link

Added extra function commit with parameter r for randomness #68

Closed Ruth1993 closed 5 years ago

Ruth1993 commented 5 years ago

Hello,

I created an extra function commit for the Pedersen commitment scheme in such a way that the user can feed the randomness used for the commitment to the function himself, instead of having the function generate randomness. This can be useful in settings where a user wants to use a previously computed string or a string of a certain length as randomness. As an example, I would refer to the input commitment protocol of the GMW compiler by Goldreich in which two parties first commit on random coins using a secure coin tossing protocol and then use the coins as randomness for commitments on their input values.

Of course, this function could also be implemented for ElGamal, but I would just like to know if you are willing to accept this pull request.

Kind regards, Ruth