-
Notifications
You must be signed in to change notification settings - Fork 153
Description
Problem Definition
In many PCSs, a prover commits to a polynomial and is subsequently queried about the value of that committed polynomial at a point chosen by the verifier - letting the verifier learn that actual value during the process.
However, this is not the case for all PCSs: sometimes, the verifier just wants to be convinced that a committed polynomial, at a point of their choice, takes a value the prover only commits to without revealing it in plain. This is, for instance, the case of Hyrax (cf. section 6 here), which is currently PRed (see #130). It is not unthinkable that more such schemes will be added as the module grows.
The current PolynomialCommitment trait does not handle that situation very elegantly - in particular, the method check receives a list of expected evaluations. How Hyrax was patched to fit this paradigm is outlined in the linked PR.
Proposal
Three possible ways forward come to mind:
- Leave the trait untouched and have the
checkmethod simply disregard the received evaluations in evaluation-hiding PCSs. This seems inelegant and might lead to misuse where the programmer passes a certain evaluation to that function, receives positive confirmation, and thinks those evaluations were matched against the proof and correspond to evaluations of the committed polynomial. This issue could be mitigated with good documentation. - Small-impact breaking change: replace the evaluations (which are elements of a finite field) passed to
checkby anOptionwrapper around that. Each implementor, depending of which of the two paradigms it fits, would panic if it receives the opposite of what it expects and otherwise run business as usual. By what it expects I meanSomefor PCSs where evaluations are meant to be learnt by the verifier andNonefor evaluation-hiding ones. This change would indeed be breaking but the changes would be minimal. - Larger refactor: a separate trait could be added for those schemes, or perhaps an
evaluation_hidingflag inside the current trait. Here I don't have many specific proposals, but I am up for discussion. A point in favour of this is that evaluation-hiding PCSs pay a performance cost due to their nature and the plug-out-plug-in design aim of thePolynomialCommitmenttrait in its current form would put them in the same bag as non-hiding PCSs.
At this moment, the second option seems the most appealing. I am happy to explore other possibilities, though.
For Admin Use
- Not duplicate issue
- Appropriate labels applied
- Appropriate contributors tagged
- Contributor assigned/self-assigned