scipr-lab / libsnark

C++ library for zkSNARKs
Other
1.8k stars 570 forks source link

AES gadget support #102

Open oleiba opened 6 years ago

oleiba commented 6 years ago

This is a feature request. We would love to use a symmetric encryption gadget, e.g., AES-128-CBC. Unfortunately I see this is currently not supported. A peek at pay-to-sudoku shows that a similar case have merely used XOR, that would not be sufficient for data larger than the acceptable key length (chaining XOR is not really secure).

  1. Is it possible to have it on the development roadmap? (if there's one)
  2. Can there be given some leads to how to implement and build the relevant gadget? Thanks!
barryWhiteHat commented 6 years ago

Does AES require modulo arithmetic? If so it will likely have a lot of constraints/not be particle to implement.

Perhaps you could use https://github.com/byt3bit/mimc_snark Which is was specifically designed to be used inside zk-snarks.