Git Product home page Git Product logo

Anemoi: a Family of ZK-friendly AO Hash Functions

This repository contains a first implementation in sage of the Anemoi family of hash functions. Anemoi is a family of Arithmetization Oriented Hash Functions that operates over prime and binary fields.

Our paper on Anemoi can be found on ePrint: https://eprint.iacr.org/2022/840.

Contents

The sage script anemoi.sage contains various routines to evaluate Anemoi (including AnemoiJive and AnemoiSponge) but also to generate the corresponding systems of equations.

First some basics functions allow to provide well-chosen parameters: field, number of rounds, linear layer, ... for various instances of Anemoi.

The class AnemoiPermutation then contains different sections:

  • Sub-components: evaluate_sbox and linear_layer respectively apply our Flystel construction and the linear layer.
  • Evaluation: eval_with_intermediate_values performs an evaluation of Anemoi using the SPN construction. The function also return intermediate values as this can be used to check the solutions of the systems of equations generated.
  • Writing full system of equations: get_polynomial_variables, verification_polynomials and print_verification_polynomials allow to generate the corresponding multivariate system of polynomial equations. This indeed allowed us to perform our security analysis using Grobner basis attacks.

The two functions jive and sponge_hash are routines to evaluate AnemoiJive and AnemoiSponge that respectively correspond to our Merkle Compression function, and our Hash function.

Authors

  • Clémence Bouvier, Sorbonne University, France - Inria, France
  • Pierre Briaud, Sorbonne University, France - Inria, France
  • Pyrros Chaidos, National & Kapodistrian University of Athens, Greece,
  • Léo Perrin, Inria, France
  • Robin Salen, Toposware, Inc., USA
  • Vesselin Velichkov, University of Edinburgh, Scotland - Clearmatics, England
  • Danny Willems, Nomadic Labs, France - Inria & LIX, France

Third-party implementations

Here are some Git repositories with Anemoi implementations:

Please contact us if you have any Anemoi implementations to share.

License

This repository is distributed under the terms of the MIT License.

Anemoi's Projects

anemoi-hash icon anemoi-hash

Anemoi: a Family of ZK-friendly Arithmetization Oriented Hash Functions

anemoi-rust icon anemoi-rust

A Rust implementation of the Anemoi hash function by Bouvier et al.

hash_f64_benchmarks icon hash_f64_benchmarks

A minimal implementation of algebraic hash functions over the small Goldilocks field

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.