GithubHelp home page GithubHelp logo

akalmykov / keccak256-circom Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vocdoni/keccak256-circom

0.0 0.0 0.0 103 KB

keccak256 hash implementation in Circom

License: GNU General Public License v3.0

JavaScript 37.45% Go 33.80% Circom 28.76%

keccak256-circom's Introduction

keccak256-circom Test

Keccak256 hash function (ethereum version) implemented in circom. Spec: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf

Warning: WIP, this is an experimental repo.

Status

Initial version works, compatible with Ethereum version of Keccak256.

It needs around 150848 (151k) constraints.

For context: Rapidsnark proof generation time:

  • 1.1M constraints -> 7 seconds (8 CPU)
  • 128M constraints -> <2min (64 CPU)

Usage

  • import the lib in the package.json:
"dependencies": {
	"keccak256-circom": "git+https://github.com/vocdoni/keccak256-circom"
}
  • Usage:
pragma circom 2.0.0;

include "../node_modules/keccak256-circom/circuits/keccak.circom";

// for a input & output of 32 bytes:
component main = Keccak(32*8, 32*8);
  • Install
Installed
sudo apt install nlohmann-json3-dev
sudo apt install libgmp3-dev
sudo apt-get install gcc-multilib
sudo apt-get -y install nasm

Upgraded libs in package.json trying to fix https://github.com/iden3/snarkjs/issues/217
upgraded global snarkyjs install (as per circom website)
upgraded "circom_tester": "0.0.19",

keccak256-circom's People

Contributors

akalmykov avatar arnaucube 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.