circify / compiler

Superseded by https://github.com/circify/circ
https://github.com/circify/circ
5 stars 2 forks source link

How to specify existential variables #24

Closed sga001 closed 3 years ago

sga001 commented 3 years ago

After playing with the compiler for a bit, we noticed there is no way to specify prover-only inputs. I think existential variables are the way to go, which the compiler seems to support in various places.

We are wondering if there is a way to specify existential variables in compile mode without inputs?

Here is a simple example (syntax is made up, I'm not implying this is the right interface):

  void test(int x) {
     int y = existential_assignment();
     assert(x * y = 1);
  }

Ideally, compiler would generate R1CS for the above without issue. In compile+solve mode, then the prover would do the assignment.

Any pointers would be helpful.

sga001 commented 3 years ago

Nevermind. We have some ideas on how to use what already exists.