Giter Site home page Giter Site logo

Comments (2)

giuliop avatar giuliop commented on July 4, 2024

In their FAQ the MiMC authors comment against using a Miyaguchi-Preneel structure and add that if going that route they would recommend increasing the number of rounds.
The number of rounds in gnark's implementation matches the original paper and does not follow the recommendation to increase it with a Miyaguchi-Preneel structure.

What is the line of thinking followed to make these choices in gnark?

from gnark-crypto.

ivokub avatar ivokub commented on July 4, 2024

I am not sure, I haven't been involved in the implementation, but I would assume the main reasoning would have been to have compatibility with alternative libraries. Length-extension attacks are somewhat mitigated as MiMC is mostly used for in-circuit hashing (and we have the native version in gnark-crypto for compatibility), where the input lengths are fixed.

But I do agree that the issue and I think it needs some consideration. There are several parallel lines of work regarding algebraic hashing:

  • adding interfaces which are more natural to algebraic hashing #448
  • adding Poseidon hash #494
  • implementing SAFE API Consensys/gnark#1122
  • MiMC parametrization #221
  • etc

I would definitely add the points raised by @Soleimani193:

  • The user should be warned about the use of MIMC hash based on Miyaguchi-Preneel structure.
  • The implementation of MIMC based on Sponge structure would be very helpful

from gnark-crypto.

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.