GithubHelp home page GithubHelp logo

Comments (2)

ThomasPiellard avatar ThomasPiellard commented on September 28, 2024

Hi, as it is now the seed should be a random string, without particular principles about it. The constants used in the mimc encrypt function are derived from computing successive SHA3 of the seed.

This part is a bit dirty, and we will change it at some point so hash.MIMC_BN256.New takes a io.Reader as source of randomness (like what you would find in golang's crypto/ package). We implemented the New function for the hashes like this because when using mimc in a snark circuit, we need to instantiate the mimc gadget with the same seed as the one used in the real go implementation.

We did a clean pass on eddsa to fix this kind of problem, and we will do the same with the hash functions.

from gnark.

mdj33 avatar mdj33 commented on September 28, 2024

so if we take a random data from io.Reader as the seed, it should be quite safe from crack the hash point of view, is it?

from gnark.

Related Issues (20)

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.