add full flow using keccak256-circom. The constraint generation fails, debugging circom & sonobe & arkworks/circom-compat

This commit is contained in:
2024-05-09 16:20:04 +02:00
parent ede9e16a2a
commit ef9679552c
5 changed files with 316 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
pragma circom 2.0.0;
include "node_modules/keccak256-circom/circuits/keccak.circom";
template KeccakChain () {
signal input ivc_input[32*8];
signal output ivc_output[32*8];
component keccak = Keccak(32*8, 32*8);
for (var i=0; i<32*8; i++) {
keccak.in[i] <== ivc_input[i];
}
for (var i=0; i<32*8; i++) {
ivc_output[i] <== keccak.out[i];
}
}
// for a input & output of 32 bytes:
component main { public [ivc_input] } = KeccakChain();

18
circuit/package.json Normal file
View File

@@ -0,0 +1,18 @@
{
"name": "fakeid-demo",
"version": "0.0.1",
"description": "iden3 circuits",
"main": "index.js",
"scripts": {
"clean": "rm -fR dist",
"build": "npm run clean && ./node_modules/.bin/tsc --strictNullChecks",
"test": "./node_modules/.bin/mocha --timeout 5000 -p -r ts-node/register '*.test.ts'",
"postinstall":"cd node_modules/keccak256-circom && npm install"
},
"license": "GPL-3.0",
"dependencies": {
"circomlib": "^2.0.5",
"keccak256-circom": "git://github.com/vocdoni/keccak256-circom.git"
}
}