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

Separate circuit specification from evaluation #63

Open
lopeetall opened this issue Mar 24, 2023 · 0 comments
Open

Separate circuit specification from evaluation #63

lopeetall opened this issue Mar 24, 2023 · 0 comments
Assignees

Comments

@lopeetall
Copy link
Contributor

Currently we use fresh in the .pir document to instruct the evaluator to use the expression inside the fresh command to properly evaluate the witness during the proving process, meaning the .pir document contains both circuit specification and evaluation instructions. Ideally, instructions for evaluation would be completely separate from circuit specification.

A few reasons for this:

  1. Separation of concerns is usually a good idea.
  2. Evaluation/proving can be done outside of vamp-ir completely. For instance a front-end language targeting vamp-ir may want to handle this step, or even the backend proving library, and we should encourage this by default.
  3. The fresh command causes confusion, because the expression contained inside fresh does not add any constraints at all. If the user does not know this they can easily write under-constrained circuits with major exploits. It is best to hide this footgun as much as possible, or at least separate it from the constraints to better indicate that it is conceptually different.
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

No branches or pull requests

4 participants