libsnark
libsnark copied to clipboard
AES gadget support
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).
- Is it possible to have it on the development roadmap? (if there's one)
- Can there be given some leads to how to implement and build the relevant gadget? Thanks!
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.