Giter Club home page Giter Club logo

aes-circom's People

Contributors

gauravsrivastav avatar jinankjain avatar rahulghangas avatar ultrainstinct30 avatar utsavjnn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

aes-circom's Issues

The circuit is heavily underconstrained

Not sure if you care, but if you compile the circuit with the latest circom it gives a ton of warnings about missing constraints

warning[CA02]: In template "AES256Encrypt()": Subcomponent input/output signal num2bits_1[1][1][0].in does not appear in any constraint of the father component

warning[CA02]: In template "AES256Encrypt()": Subcomponent input/output signal num2bits_1[11][1][1].in does not appear in any constraint of the father component

warning[CA02]: In template "AES256Encrypt()": Subcomponent input/output signal num2bits_1[0][2][1].in does not appear in any constraint of the father component

warning[CA02]: In template "AES256Encrypt()": Subcomponent input/output signal num2bits_1[4][3][0].in does not appear in any constraint of the father component

warning[CA02]: In template "AES256Encrypt()": Subcomponent input/output signal num2bits_1[4][1][3].in does not appear in any constraint of the father component

warning[CA02]: In template "AES256Encrypt()": Subcomponent input/output signal num2bits_1[5][0][0].in does not appear in any constraint of the father component

warning[CA02]: In template "AES256Encrypt()": Subcomponent input/output signal num2bits_1[6][1][0].in does not appear in any constraint of the father component

and so on
Which makes it insecure

Optimize the AES encryption code

Currently the number of constraints for different message size:

16 Bytes

constraints - 863232

64 Bytes

constraints - 1615392

512 Bytes

constraints - 2618272

4096 Bytes

constraints - 64796832

These are way too much. I think there are multiple places where we can optimize and bring down the number of constraints.

Cleanup the code

Currently there is a lot of redundancy between key expansion and encryption code. Let's merge together.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.