GithubHelp home page GithubHelp logo

poseidon-circuit's Introduction

Poseidon Hash Circuit

Introduction

This library contains a halo2 circuit for the Poseidon hash algorithm. Please refer to the original paper for the definition of Poseidon hash.

The Poseidon circuit is based on a custom gate named MainGate with the following structure.

q_1([F;T]) q_5([F;T]) q_m (F) q_i(F) q_o(F) rc (F) state([A;T]) input (A) out (A)

Here T is the size of state, F means fixed column, A means adviced column.

Generic relation is defined as $$q_m\cdot s[0]\cdot s[1] + \sum_i q_1[i]\cdot s[i] + \sum_i q_5[i]*s^5[i] + rc + q_i\cdot input + q_o\cdot out=0$$

It is worth noting that MainGate was originally designed for the Sirius folding framework, thus some of the columns like $q_m$ are not needed for Poseidon hash and can always be set to be $0$.

Getting Started

This repository has integrated with the snarkify-sdk, facilitating effortless deployment to the Snarkify Cloud. With just a few clicks, you can have your prover service up and running, ready to handle proof requests.

๐Ÿ‘‰ Follow our tutorial to deploy your Poseidon hash prover service on Snarkify Cloud.

Integrate with snarkify-sdk

For a complete example of snarkify-sdk integration with the Poseidon circuit, please reference to PR #5.

For more information about snarkify-sdk, please reference to the documentation.

Getting Involved

We'd love for you to be a part of our developer community! Whether you're looking to contribute code, provide feedback, or simply stay in the loop, our Telegram group is the place to be.

๐Ÿ‘‰ Join our developer community

poseidon-circuit's People

Contributors

gigatron avatar drouyang avatar chaosma avatar cyphersnake avatar

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.