No description
  • JavaScript 36.3%
  • Go 34.5%
  • Circom 29.2%
Find a file
2021-11-25 20:05:49 +01:00
.github/workflows Organize circuits & tests 2021-11-25 19:00:18 +01:00
circuits Different nBits for keccak input&output 2021-11-25 20:05:49 +01:00
go-keccak256-bits-impl Organize circuits & tests 2021-11-25 19:00:18 +01:00
test Different nBits for keccak input&output 2021-11-25 20:05:49 +01:00
.gitignore Add circuit test utils 2021-11-01 18:51:31 +01:00
LICENSE Initial commit 2021-10-31 01:23:27 +02:00
package.json Update package.json author to Vocdoni & readme links 2021-11-24 19:28:28 +01:00
README.md Different nBits for keccak input&output 2021-11-25 20:05:49 +01:00

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);