From 4f11565ca483c1ca14fdb0ead67c01f6d01cb8ad Mon Sep 17 00:00:00 2001 From: Jordi Baylina Date: Mon, 23 Dec 2019 19:36:26 +0100 Subject: [PATCH] Adapted circuits to the construction fase refactorization --- circuits/babyjub.circom | 2 +- circuits/eddsa.circom | 2 +- circuits/eddsamimc.circom | 2 +- circuits/eddsamimcsponge.circom | 2 +- circuits/eddsaposeidon.circom | 2 +- circuits/escalarmul.circom | 2 +- circuits/escalarmulw4table.circom | 2 +- circuits/mimc.circom | 2 +- circuits/mimcsponge.circom | 2 +- circuits/pedersen.circom | 2 +- circuits/pedersen_old.circom | 2 +- circuits/poseidon.circom | 4 ++-- circuits/sha256/constants.circom | 4 ++-- src/poseidon.js | 2 +- test/binsum.js | 2 +- test/circuits/escalarmul_test.circom | 2 +- test/circuits/escalarmul_test_min.circom | 4 ++-- test/circuits/escalarmulfix_test.circom | 4 ++-- test/circuits/escalarmulw4table.circom | 2 +- test/circuits/escalarmulw4table_test.circom | 4 ++-- test/circuits/escalarmulw4table_test3.circom | 6 +++--- 21 files changed, 28 insertions(+), 28 deletions(-) diff --git a/circuits/babyjub.circom b/circuits/babyjub.circom index 73cb84c..537b1a0 100644 --- a/circuits/babyjub.circom +++ b/circuits/babyjub.circom @@ -87,7 +87,7 @@ template BabyPbk() { signal output Ax; signal output Ay; - var BASE8 = [ + var BASE8[2] = [ 5299619240641551281634865583518297030282874472190772894086521144482721001553, 16950150798460657717958625567821834550301663161624707787222815936182638968203 ]; diff --git a/circuits/eddsa.circom b/circuits/eddsa.circom index 1026774..bf126a7 100644 --- a/circuits/eddsa.circom +++ b/circuits/eddsa.circom @@ -122,7 +122,7 @@ template EdDSAVerifier(n) { // Calculate left side of equation left = S*B8 - var BASE8 = [ + var BASE8[2] = [ 5299619240641551281634865583518297030282874472190772894086521144482721001553, 16950150798460657717958625567821834550301663161624707787222815936182638968203 ]; diff --git a/circuits/eddsamimc.circom b/circuits/eddsamimc.circom index aef5df5..5f0917a 100644 --- a/circuits/eddsamimc.circom +++ b/circuits/eddsamimc.circom @@ -100,7 +100,7 @@ template EdDSAMiMCVerifier() { // Calculate left side of equation left = S*B8 - var BASE8 = [ + var BASE8[2] = [ 5299619240641551281634865583518297030282874472190772894086521144482721001553, 16950150798460657717958625567821834550301663161624707787222815936182638968203 ]; diff --git a/circuits/eddsamimcsponge.circom b/circuits/eddsamimcsponge.circom index af38d57..8b2577d 100644 --- a/circuits/eddsamimcsponge.circom +++ b/circuits/eddsamimcsponge.circom @@ -100,7 +100,7 @@ template EdDSAMiMCSpongeVerifier() { // Calculate left side of equation left = S*B8 - var BASE8 = [ + var BASE8[2] = [ 5299619240641551281634865583518297030282874472190772894086521144482721001553, 16950150798460657717958625567821834550301663161624707787222815936182638968203 ]; diff --git a/circuits/eddsaposeidon.circom b/circuits/eddsaposeidon.circom index 0d9faa0..5ed63c9 100644 --- a/circuits/eddsaposeidon.circom +++ b/circuits/eddsaposeidon.circom @@ -99,7 +99,7 @@ template EdDSAPoseidonVerifier() { // Calculate left side of equation left = S*B8 - var BASE8 = [ + var BASE8[2] = [ 5299619240641551281634865583518297030282874472190772894086521144482721001553, 16950150798460657717958625567821834550301663161624707787222815936182638968203 ]; diff --git a/circuits/escalarmul.circom b/circuits/escalarmul.circom index b3cc806..9cd13f7 100644 --- a/circuits/escalarmul.circom +++ b/circuits/escalarmul.circom @@ -71,7 +71,7 @@ template EscalarMulWindow(base, k) { signal input sel[4]; signal output out[2]; - var table; + var table[16][2]; component mux; component adder; diff --git a/circuits/escalarmulw4table.circom b/circuits/escalarmulw4table.circom index d056e66..83498fb 100644 --- a/circuits/escalarmulw4table.circom +++ b/circuits/escalarmulw4table.circom @@ -33,7 +33,7 @@ function EscalarMulW4Table(base, k) { var i; var p[2]; - var dbl = base; + var dbl[2] = base; for (i=0; i { for (let i=0; i