diff --git a/smart_contract_tests/test/smart_contracts.test.js b/smart_contract_tests/test/smart_contracts.test.js index ec0bc7cb..54619251 100644 --- a/smart_contract_tests/test/smart_contracts.test.js +++ b/smart_contract_tests/test/smart_contracts.test.js @@ -39,6 +39,15 @@ describe("Smart contracts test suite", function () { )).to.be.equal(true); }); + it("Groth16 smart contract 1 aliased input", async () => { + expect( + await groth16VerifyAliased( + path.join("../test", "groth16", "circuit.r1cs"), + path.join("../test", "groth16", "witness.wtns") + ) + ).to.be.equal(false); + }); + it("Groth16 smart contract 3 inputs", async () => { expect(await groth16Verify( path.join("../test", "circuit2", "circuit.r1cs"), @@ -100,6 +109,35 @@ describe("Smart contracts test suite", function () { return await verifierContract.verifyProof(proofA, proofB, proofC, publicInputs); } + async function groth16VerifyAliased(r1csFilename, wtnsFilename) { + const solidityVerifierFilename = path.join("contracts", "groth16.sol"); + + const zkeyFilename = { type: "mem" }; + + await snarkjs.zKey.newZKey(r1csFilename, ptauFilename, zkeyFilename); + const { proof: proof, publicSignals: publicInputs } = await snarkjs.groth16.prove(zkeyFilename, wtnsFilename); + + const proofA = [proof.pi_a[0], proof.pi_a[1]]; + const proofB = [[proof.pi_b[0][1], proof.pi_b[0][0]], [proof.pi_b[1][1], proof.pi_b[1][0]],]; + const proofC = [proof.pi_c[0], proof.pi_c[1]]; + + // Generate groth16 verifier solidity file from groth16 template + zkey + const verifierCode = await snarkjs.zKey.exportSolidityVerifier(zkeyFilename, templates); + fs.writeFileSync(solidityVerifierFilename, verifierCode, "utf-8"); + + // Compile the groth16 verifier smart contract + await run("compile"); + + let pi_with_alias = [...publicInputs]; + pi_with_alias[1] = BigInt(publicInputs[1]) + 21888242871839275222246405745257275088548364400416034343698204186575808495617n; + + // Deploy mock groth16 verifier + const VerifierFactory = await ethers.getContractFactory("Groth16Verifier"); + verifierContract = await VerifierFactory.deploy(); + + return await verifierContract.verifyProof(proofA, proofB, proofC, pi_with_alias); + } + async function plonkVerify(r1csFilename, wtnsFilename) { const solidityVerifierFilename = path.join("contracts", "plonk.sol"); diff --git a/test/fullprocess.js b/test/fullprocess.js index 126cb5f8..7ae8b199 100644 --- a/test/fullprocess.js +++ b/test/fullprocess.js @@ -121,10 +121,9 @@ describe("Full process", function () { proof = res.proof; publicSignals = res.publicSignals; publicSignalsWithAlias = [...res.publicSignals]; - publicSignalsWithAlias[1] = BigInt(res.publicSignals[1]) + BigInt(21888242871839275222246405745257275088548364400416034343698204186575808495617n); + publicSignalsWithAlias[1] = BigInt(res.publicSignals[1]) + 21888242871839275222246405745257275088548364400416034343698204186575808495617n; }); - it ("groth16 verify", async () => { const res = await snarkjs.groth16.verify(vKey, publicSignals, proof); assert(res == true); diff --git a/test/groth16/circuit.sym b/test/groth16/circuit.sym new file mode 100644 index 00000000..28c68cbb --- /dev/null +++ b/test/groth16/circuit.sym @@ -0,0 +1,1003 @@ +1,1,0,main.c +2,2,0,main.a +3,3,0,main.b +4,4,0,main.int[0] +5,5,0,main.int[1] +6,6,0,main.int[2] +7,7,0,main.int[3] +8,8,0,main.int[4] +9,9,0,main.int[5] +10,10,0,main.int[6] +11,11,0,main.int[7] +12,12,0,main.int[8] +13,13,0,main.int[9] +14,14,0,main.int[10] +15,15,0,main.int[11] +16,16,0,main.int[12] +17,17,0,main.int[13] +18,18,0,main.int[14] +19,19,0,main.int[15] +20,20,0,main.int[16] +21,21,0,main.int[17] +22,22,0,main.int[18] +23,23,0,main.int[19] +24,24,0,main.int[20] +25,25,0,main.int[21] +26,26,0,main.int[22] +27,27,0,main.int[23] +28,28,0,main.int[24] +29,29,0,main.int[25] +30,30,0,main.int[26] +31,31,0,main.int[27] +32,32,0,main.int[28] +33,33,0,main.int[29] +34,34,0,main.int[30] +35,35,0,main.int[31] +36,36,0,main.int[32] +37,37,0,main.int[33] +38,38,0,main.int[34] +39,39,0,main.int[35] +40,40,0,main.int[36] +41,41,0,main.int[37] +42,42,0,main.int[38] +43,43,0,main.int[39] +44,44,0,main.int[40] +45,45,0,main.int[41] +46,46,0,main.int[42] +47,47,0,main.int[43] +48,48,0,main.int[44] +49,49,0,main.int[45] +50,50,0,main.int[46] +51,51,0,main.int[47] +52,52,0,main.int[48] +53,53,0,main.int[49] +54,54,0,main.int[50] +55,55,0,main.int[51] +56,56,0,main.int[52] +57,57,0,main.int[53] +58,58,0,main.int[54] +59,59,0,main.int[55] +60,60,0,main.int[56] +61,61,0,main.int[57] +62,62,0,main.int[58] +63,63,0,main.int[59] +64,64,0,main.int[60] +65,65,0,main.int[61] +66,66,0,main.int[62] +67,67,0,main.int[63] +68,68,0,main.int[64] +69,69,0,main.int[65] +70,70,0,main.int[66] +71,71,0,main.int[67] +72,72,0,main.int[68] +73,73,0,main.int[69] +74,74,0,main.int[70] +75,75,0,main.int[71] +76,76,0,main.int[72] +77,77,0,main.int[73] +78,78,0,main.int[74] +79,79,0,main.int[75] +80,80,0,main.int[76] +81,81,0,main.int[77] +82,82,0,main.int[78] +83,83,0,main.int[79] +84,84,0,main.int[80] +85,85,0,main.int[81] +86,86,0,main.int[82] +87,87,0,main.int[83] +88,88,0,main.int[84] +89,89,0,main.int[85] +90,90,0,main.int[86] +91,91,0,main.int[87] +92,92,0,main.int[88] +93,93,0,main.int[89] +94,94,0,main.int[90] +95,95,0,main.int[91] +96,96,0,main.int[92] +97,97,0,main.int[93] +98,98,0,main.int[94] +99,99,0,main.int[95] +100,100,0,main.int[96] +101,101,0,main.int[97] +102,102,0,main.int[98] +103,103,0,main.int[99] +104,104,0,main.int[100] +105,105,0,main.int[101] +106,106,0,main.int[102] +107,107,0,main.int[103] +108,108,0,main.int[104] +109,109,0,main.int[105] +110,110,0,main.int[106] +111,111,0,main.int[107] +112,112,0,main.int[108] +113,113,0,main.int[109] +114,114,0,main.int[110] +115,115,0,main.int[111] +116,116,0,main.int[112] +117,117,0,main.int[113] +118,118,0,main.int[114] +119,119,0,main.int[115] +120,120,0,main.int[116] +121,121,0,main.int[117] +122,122,0,main.int[118] +123,123,0,main.int[119] +124,124,0,main.int[120] +125,125,0,main.int[121] +126,126,0,main.int[122] +127,127,0,main.int[123] +128,128,0,main.int[124] +129,129,0,main.int[125] +130,130,0,main.int[126] +131,131,0,main.int[127] +132,132,0,main.int[128] +133,133,0,main.int[129] +134,134,0,main.int[130] +135,135,0,main.int[131] +136,136,0,main.int[132] +137,137,0,main.int[133] +138,138,0,main.int[134] +139,139,0,main.int[135] +140,140,0,main.int[136] +141,141,0,main.int[137] +142,142,0,main.int[138] +143,143,0,main.int[139] +144,144,0,main.int[140] +145,145,0,main.int[141] +146,146,0,main.int[142] +147,147,0,main.int[143] +148,148,0,main.int[144] +149,149,0,main.int[145] +150,150,0,main.int[146] +151,151,0,main.int[147] +152,152,0,main.int[148] +153,153,0,main.int[149] +154,154,0,main.int[150] +155,155,0,main.int[151] +156,156,0,main.int[152] +157,157,0,main.int[153] +158,158,0,main.int[154] +159,159,0,main.int[155] +160,160,0,main.int[156] +161,161,0,main.int[157] +162,162,0,main.int[158] +163,163,0,main.int[159] +164,164,0,main.int[160] +165,165,0,main.int[161] +166,166,0,main.int[162] +167,167,0,main.int[163] +168,168,0,main.int[164] +169,169,0,main.int[165] +170,170,0,main.int[166] +171,171,0,main.int[167] +172,172,0,main.int[168] +173,173,0,main.int[169] +174,174,0,main.int[170] +175,175,0,main.int[171] +176,176,0,main.int[172] +177,177,0,main.int[173] +178,178,0,main.int[174] +179,179,0,main.int[175] +180,180,0,main.int[176] +181,181,0,main.int[177] +182,182,0,main.int[178] +183,183,0,main.int[179] +184,184,0,main.int[180] +185,185,0,main.int[181] +186,186,0,main.int[182] +187,187,0,main.int[183] +188,188,0,main.int[184] +189,189,0,main.int[185] +190,190,0,main.int[186] +191,191,0,main.int[187] +192,192,0,main.int[188] +193,193,0,main.int[189] +194,194,0,main.int[190] +195,195,0,main.int[191] +196,196,0,main.int[192] +197,197,0,main.int[193] +198,198,0,main.int[194] +199,199,0,main.int[195] +200,200,0,main.int[196] +201,201,0,main.int[197] +202,202,0,main.int[198] +203,203,0,main.int[199] +204,204,0,main.int[200] +205,205,0,main.int[201] +206,206,0,main.int[202] +207,207,0,main.int[203] +208,208,0,main.int[204] +209,209,0,main.int[205] +210,210,0,main.int[206] +211,211,0,main.int[207] +212,212,0,main.int[208] +213,213,0,main.int[209] +214,214,0,main.int[210] +215,215,0,main.int[211] +216,216,0,main.int[212] +217,217,0,main.int[213] +218,218,0,main.int[214] +219,219,0,main.int[215] +220,220,0,main.int[216] +221,221,0,main.int[217] +222,222,0,main.int[218] +223,223,0,main.int[219] +224,224,0,main.int[220] +225,225,0,main.int[221] +226,226,0,main.int[222] +227,227,0,main.int[223] +228,228,0,main.int[224] +229,229,0,main.int[225] +230,230,0,main.int[226] +231,231,0,main.int[227] +232,232,0,main.int[228] +233,233,0,main.int[229] +234,234,0,main.int[230] +235,235,0,main.int[231] +236,236,0,main.int[232] +237,237,0,main.int[233] +238,238,0,main.int[234] +239,239,0,main.int[235] +240,240,0,main.int[236] +241,241,0,main.int[237] +242,242,0,main.int[238] +243,243,0,main.int[239] +244,244,0,main.int[240] +245,245,0,main.int[241] +246,246,0,main.int[242] +247,247,0,main.int[243] +248,248,0,main.int[244] +249,249,0,main.int[245] +250,250,0,main.int[246] +251,251,0,main.int[247] +252,252,0,main.int[248] +253,253,0,main.int[249] +254,254,0,main.int[250] +255,255,0,main.int[251] +256,256,0,main.int[252] +257,257,0,main.int[253] +258,258,0,main.int[254] +259,259,0,main.int[255] +260,260,0,main.int[256] +261,261,0,main.int[257] +262,262,0,main.int[258] +263,263,0,main.int[259] +264,264,0,main.int[260] +265,265,0,main.int[261] +266,266,0,main.int[262] +267,267,0,main.int[263] +268,268,0,main.int[264] +269,269,0,main.int[265] +270,270,0,main.int[266] +271,271,0,main.int[267] +272,272,0,main.int[268] +273,273,0,main.int[269] +274,274,0,main.int[270] +275,275,0,main.int[271] +276,276,0,main.int[272] +277,277,0,main.int[273] +278,278,0,main.int[274] +279,279,0,main.int[275] +280,280,0,main.int[276] +281,281,0,main.int[277] +282,282,0,main.int[278] +283,283,0,main.int[279] +284,284,0,main.int[280] +285,285,0,main.int[281] +286,286,0,main.int[282] +287,287,0,main.int[283] +288,288,0,main.int[284] +289,289,0,main.int[285] +290,290,0,main.int[286] +291,291,0,main.int[287] +292,292,0,main.int[288] +293,293,0,main.int[289] +294,294,0,main.int[290] +295,295,0,main.int[291] +296,296,0,main.int[292] +297,297,0,main.int[293] +298,298,0,main.int[294] +299,299,0,main.int[295] +300,300,0,main.int[296] +301,301,0,main.int[297] +302,302,0,main.int[298] +303,303,0,main.int[299] +304,304,0,main.int[300] +305,305,0,main.int[301] +306,306,0,main.int[302] +307,307,0,main.int[303] +308,308,0,main.int[304] +309,309,0,main.int[305] +310,310,0,main.int[306] +311,311,0,main.int[307] +312,312,0,main.int[308] +313,313,0,main.int[309] +314,314,0,main.int[310] +315,315,0,main.int[311] +316,316,0,main.int[312] +317,317,0,main.int[313] +318,318,0,main.int[314] +319,319,0,main.int[315] +320,320,0,main.int[316] +321,321,0,main.int[317] +322,322,0,main.int[318] +323,323,0,main.int[319] +324,324,0,main.int[320] +325,325,0,main.int[321] +326,326,0,main.int[322] +327,327,0,main.int[323] +328,328,0,main.int[324] +329,329,0,main.int[325] +330,330,0,main.int[326] +331,331,0,main.int[327] +332,332,0,main.int[328] +333,333,0,main.int[329] +334,334,0,main.int[330] +335,335,0,main.int[331] +336,336,0,main.int[332] +337,337,0,main.int[333] +338,338,0,main.int[334] +339,339,0,main.int[335] +340,340,0,main.int[336] +341,341,0,main.int[337] +342,342,0,main.int[338] +343,343,0,main.int[339] +344,344,0,main.int[340] +345,345,0,main.int[341] +346,346,0,main.int[342] +347,347,0,main.int[343] +348,348,0,main.int[344] +349,349,0,main.int[345] +350,350,0,main.int[346] +351,351,0,main.int[347] +352,352,0,main.int[348] +353,353,0,main.int[349] +354,354,0,main.int[350] +355,355,0,main.int[351] +356,356,0,main.int[352] +357,357,0,main.int[353] +358,358,0,main.int[354] +359,359,0,main.int[355] +360,360,0,main.int[356] +361,361,0,main.int[357] +362,362,0,main.int[358] +363,363,0,main.int[359] +364,364,0,main.int[360] +365,365,0,main.int[361] +366,366,0,main.int[362] +367,367,0,main.int[363] +368,368,0,main.int[364] +369,369,0,main.int[365] +370,370,0,main.int[366] +371,371,0,main.int[367] +372,372,0,main.int[368] +373,373,0,main.int[369] +374,374,0,main.int[370] +375,375,0,main.int[371] +376,376,0,main.int[372] +377,377,0,main.int[373] +378,378,0,main.int[374] +379,379,0,main.int[375] +380,380,0,main.int[376] +381,381,0,main.int[377] +382,382,0,main.int[378] +383,383,0,main.int[379] +384,384,0,main.int[380] +385,385,0,main.int[381] +386,386,0,main.int[382] +387,387,0,main.int[383] +388,388,0,main.int[384] +389,389,0,main.int[385] +390,390,0,main.int[386] +391,391,0,main.int[387] +392,392,0,main.int[388] +393,393,0,main.int[389] +394,394,0,main.int[390] +395,395,0,main.int[391] +396,396,0,main.int[392] +397,397,0,main.int[393] +398,398,0,main.int[394] +399,399,0,main.int[395] +400,400,0,main.int[396] +401,401,0,main.int[397] +402,402,0,main.int[398] +403,403,0,main.int[399] +404,404,0,main.int[400] +405,405,0,main.int[401] +406,406,0,main.int[402] +407,407,0,main.int[403] +408,408,0,main.int[404] +409,409,0,main.int[405] +410,410,0,main.int[406] +411,411,0,main.int[407] +412,412,0,main.int[408] +413,413,0,main.int[409] +414,414,0,main.int[410] +415,415,0,main.int[411] +416,416,0,main.int[412] +417,417,0,main.int[413] +418,418,0,main.int[414] +419,419,0,main.int[415] +420,420,0,main.int[416] +421,421,0,main.int[417] +422,422,0,main.int[418] +423,423,0,main.int[419] +424,424,0,main.int[420] +425,425,0,main.int[421] +426,426,0,main.int[422] +427,427,0,main.int[423] +428,428,0,main.int[424] +429,429,0,main.int[425] +430,430,0,main.int[426] +431,431,0,main.int[427] +432,432,0,main.int[428] +433,433,0,main.int[429] +434,434,0,main.int[430] +435,435,0,main.int[431] +436,436,0,main.int[432] +437,437,0,main.int[433] +438,438,0,main.int[434] +439,439,0,main.int[435] +440,440,0,main.int[436] +441,441,0,main.int[437] +442,442,0,main.int[438] +443,443,0,main.int[439] +444,444,0,main.int[440] +445,445,0,main.int[441] +446,446,0,main.int[442] +447,447,0,main.int[443] +448,448,0,main.int[444] +449,449,0,main.int[445] +450,450,0,main.int[446] +451,451,0,main.int[447] +452,452,0,main.int[448] +453,453,0,main.int[449] +454,454,0,main.int[450] +455,455,0,main.int[451] +456,456,0,main.int[452] +457,457,0,main.int[453] +458,458,0,main.int[454] +459,459,0,main.int[455] +460,460,0,main.int[456] +461,461,0,main.int[457] +462,462,0,main.int[458] +463,463,0,main.int[459] +464,464,0,main.int[460] +465,465,0,main.int[461] +466,466,0,main.int[462] +467,467,0,main.int[463] +468,468,0,main.int[464] +469,469,0,main.int[465] +470,470,0,main.int[466] +471,471,0,main.int[467] +472,472,0,main.int[468] +473,473,0,main.int[469] +474,474,0,main.int[470] +475,475,0,main.int[471] +476,476,0,main.int[472] +477,477,0,main.int[473] +478,478,0,main.int[474] +479,479,0,main.int[475] +480,480,0,main.int[476] +481,481,0,main.int[477] +482,482,0,main.int[478] +483,483,0,main.int[479] +484,484,0,main.int[480] +485,485,0,main.int[481] +486,486,0,main.int[482] +487,487,0,main.int[483] +488,488,0,main.int[484] +489,489,0,main.int[485] +490,490,0,main.int[486] +491,491,0,main.int[487] +492,492,0,main.int[488] +493,493,0,main.int[489] +494,494,0,main.int[490] +495,495,0,main.int[491] +496,496,0,main.int[492] +497,497,0,main.int[493] +498,498,0,main.int[494] +499,499,0,main.int[495] +500,500,0,main.int[496] +501,501,0,main.int[497] +502,502,0,main.int[498] +503,503,0,main.int[499] +504,504,0,main.int[500] +505,505,0,main.int[501] +506,506,0,main.int[502] +507,507,0,main.int[503] +508,508,0,main.int[504] +509,509,0,main.int[505] +510,510,0,main.int[506] +511,511,0,main.int[507] +512,512,0,main.int[508] +513,513,0,main.int[509] +514,514,0,main.int[510] +515,515,0,main.int[511] +516,516,0,main.int[512] +517,517,0,main.int[513] +518,518,0,main.int[514] +519,519,0,main.int[515] +520,520,0,main.int[516] +521,521,0,main.int[517] +522,522,0,main.int[518] +523,523,0,main.int[519] +524,524,0,main.int[520] +525,525,0,main.int[521] +526,526,0,main.int[522] +527,527,0,main.int[523] +528,528,0,main.int[524] +529,529,0,main.int[525] +530,530,0,main.int[526] +531,531,0,main.int[527] +532,532,0,main.int[528] +533,533,0,main.int[529] +534,534,0,main.int[530] +535,535,0,main.int[531] +536,536,0,main.int[532] +537,537,0,main.int[533] +538,538,0,main.int[534] +539,539,0,main.int[535] +540,540,0,main.int[536] +541,541,0,main.int[537] +542,542,0,main.int[538] +543,543,0,main.int[539] +544,544,0,main.int[540] +545,545,0,main.int[541] +546,546,0,main.int[542] +547,547,0,main.int[543] +548,548,0,main.int[544] +549,549,0,main.int[545] +550,550,0,main.int[546] +551,551,0,main.int[547] +552,552,0,main.int[548] +553,553,0,main.int[549] +554,554,0,main.int[550] +555,555,0,main.int[551] +556,556,0,main.int[552] +557,557,0,main.int[553] +558,558,0,main.int[554] +559,559,0,main.int[555] +560,560,0,main.int[556] +561,561,0,main.int[557] +562,562,0,main.int[558] +563,563,0,main.int[559] +564,564,0,main.int[560] +565,565,0,main.int[561] +566,566,0,main.int[562] +567,567,0,main.int[563] +568,568,0,main.int[564] +569,569,0,main.int[565] +570,570,0,main.int[566] +571,571,0,main.int[567] +572,572,0,main.int[568] +573,573,0,main.int[569] +574,574,0,main.int[570] +575,575,0,main.int[571] +576,576,0,main.int[572] +577,577,0,main.int[573] +578,578,0,main.int[574] +579,579,0,main.int[575] +580,580,0,main.int[576] +581,581,0,main.int[577] +582,582,0,main.int[578] +583,583,0,main.int[579] +584,584,0,main.int[580] +585,585,0,main.int[581] +586,586,0,main.int[582] +587,587,0,main.int[583] +588,588,0,main.int[584] +589,589,0,main.int[585] +590,590,0,main.int[586] +591,591,0,main.int[587] +592,592,0,main.int[588] +593,593,0,main.int[589] +594,594,0,main.int[590] +595,595,0,main.int[591] +596,596,0,main.int[592] +597,597,0,main.int[593] +598,598,0,main.int[594] +599,599,0,main.int[595] +600,600,0,main.int[596] +601,601,0,main.int[597] +602,602,0,main.int[598] +603,603,0,main.int[599] +604,604,0,main.int[600] +605,605,0,main.int[601] +606,606,0,main.int[602] +607,607,0,main.int[603] +608,608,0,main.int[604] +609,609,0,main.int[605] +610,610,0,main.int[606] +611,611,0,main.int[607] +612,612,0,main.int[608] +613,613,0,main.int[609] +614,614,0,main.int[610] +615,615,0,main.int[611] +616,616,0,main.int[612] +617,617,0,main.int[613] +618,618,0,main.int[614] +619,619,0,main.int[615] +620,620,0,main.int[616] +621,621,0,main.int[617] +622,622,0,main.int[618] +623,623,0,main.int[619] +624,624,0,main.int[620] +625,625,0,main.int[621] +626,626,0,main.int[622] +627,627,0,main.int[623] +628,628,0,main.int[624] +629,629,0,main.int[625] +630,630,0,main.int[626] +631,631,0,main.int[627] +632,632,0,main.int[628] +633,633,0,main.int[629] +634,634,0,main.int[630] +635,635,0,main.int[631] +636,636,0,main.int[632] +637,637,0,main.int[633] +638,638,0,main.int[634] +639,639,0,main.int[635] +640,640,0,main.int[636] +641,641,0,main.int[637] +642,642,0,main.int[638] +643,643,0,main.int[639] +644,644,0,main.int[640] +645,645,0,main.int[641] +646,646,0,main.int[642] +647,647,0,main.int[643] +648,648,0,main.int[644] +649,649,0,main.int[645] +650,650,0,main.int[646] +651,651,0,main.int[647] +652,652,0,main.int[648] +653,653,0,main.int[649] +654,654,0,main.int[650] +655,655,0,main.int[651] +656,656,0,main.int[652] +657,657,0,main.int[653] +658,658,0,main.int[654] +659,659,0,main.int[655] +660,660,0,main.int[656] +661,661,0,main.int[657] +662,662,0,main.int[658] +663,663,0,main.int[659] +664,664,0,main.int[660] +665,665,0,main.int[661] +666,666,0,main.int[662] +667,667,0,main.int[663] +668,668,0,main.int[664] +669,669,0,main.int[665] +670,670,0,main.int[666] +671,671,0,main.int[667] +672,672,0,main.int[668] +673,673,0,main.int[669] +674,674,0,main.int[670] +675,675,0,main.int[671] +676,676,0,main.int[672] +677,677,0,main.int[673] +678,678,0,main.int[674] +679,679,0,main.int[675] +680,680,0,main.int[676] +681,681,0,main.int[677] +682,682,0,main.int[678] +683,683,0,main.int[679] +684,684,0,main.int[680] +685,685,0,main.int[681] +686,686,0,main.int[682] +687,687,0,main.int[683] +688,688,0,main.int[684] +689,689,0,main.int[685] +690,690,0,main.int[686] +691,691,0,main.int[687] +692,692,0,main.int[688] +693,693,0,main.int[689] +694,694,0,main.int[690] +695,695,0,main.int[691] +696,696,0,main.int[692] +697,697,0,main.int[693] +698,698,0,main.int[694] +699,699,0,main.int[695] +700,700,0,main.int[696] +701,701,0,main.int[697] +702,702,0,main.int[698] +703,703,0,main.int[699] +704,704,0,main.int[700] +705,705,0,main.int[701] +706,706,0,main.int[702] +707,707,0,main.int[703] +708,708,0,main.int[704] +709,709,0,main.int[705] +710,710,0,main.int[706] +711,711,0,main.int[707] +712,712,0,main.int[708] +713,713,0,main.int[709] +714,714,0,main.int[710] +715,715,0,main.int[711] +716,716,0,main.int[712] +717,717,0,main.int[713] +718,718,0,main.int[714] +719,719,0,main.int[715] +720,720,0,main.int[716] +721,721,0,main.int[717] +722,722,0,main.int[718] +723,723,0,main.int[719] +724,724,0,main.int[720] +725,725,0,main.int[721] +726,726,0,main.int[722] +727,727,0,main.int[723] +728,728,0,main.int[724] +729,729,0,main.int[725] +730,730,0,main.int[726] +731,731,0,main.int[727] +732,732,0,main.int[728] +733,733,0,main.int[729] +734,734,0,main.int[730] +735,735,0,main.int[731] +736,736,0,main.int[732] +737,737,0,main.int[733] +738,738,0,main.int[734] +739,739,0,main.int[735] +740,740,0,main.int[736] +741,741,0,main.int[737] +742,742,0,main.int[738] +743,743,0,main.int[739] +744,744,0,main.int[740] +745,745,0,main.int[741] +746,746,0,main.int[742] +747,747,0,main.int[743] +748,748,0,main.int[744] +749,749,0,main.int[745] +750,750,0,main.int[746] +751,751,0,main.int[747] +752,752,0,main.int[748] +753,753,0,main.int[749] +754,754,0,main.int[750] +755,755,0,main.int[751] +756,756,0,main.int[752] +757,757,0,main.int[753] +758,758,0,main.int[754] +759,759,0,main.int[755] +760,760,0,main.int[756] +761,761,0,main.int[757] +762,762,0,main.int[758] +763,763,0,main.int[759] +764,764,0,main.int[760] +765,765,0,main.int[761] +766,766,0,main.int[762] +767,767,0,main.int[763] +768,768,0,main.int[764] +769,769,0,main.int[765] +770,770,0,main.int[766] +771,771,0,main.int[767] +772,772,0,main.int[768] +773,773,0,main.int[769] +774,774,0,main.int[770] +775,775,0,main.int[771] +776,776,0,main.int[772] +777,777,0,main.int[773] +778,778,0,main.int[774] +779,779,0,main.int[775] +780,780,0,main.int[776] +781,781,0,main.int[777] +782,782,0,main.int[778] +783,783,0,main.int[779] +784,784,0,main.int[780] +785,785,0,main.int[781] +786,786,0,main.int[782] +787,787,0,main.int[783] +788,788,0,main.int[784] +789,789,0,main.int[785] +790,790,0,main.int[786] +791,791,0,main.int[787] +792,792,0,main.int[788] +793,793,0,main.int[789] +794,794,0,main.int[790] +795,795,0,main.int[791] +796,796,0,main.int[792] +797,797,0,main.int[793] +798,798,0,main.int[794] +799,799,0,main.int[795] +800,800,0,main.int[796] +801,801,0,main.int[797] +802,802,0,main.int[798] +803,803,0,main.int[799] +804,804,0,main.int[800] +805,805,0,main.int[801] +806,806,0,main.int[802] +807,807,0,main.int[803] +808,808,0,main.int[804] +809,809,0,main.int[805] +810,810,0,main.int[806] +811,811,0,main.int[807] +812,812,0,main.int[808] +813,813,0,main.int[809] +814,814,0,main.int[810] +815,815,0,main.int[811] +816,816,0,main.int[812] +817,817,0,main.int[813] +818,818,0,main.int[814] +819,819,0,main.int[815] +820,820,0,main.int[816] +821,821,0,main.int[817] +822,822,0,main.int[818] +823,823,0,main.int[819] +824,824,0,main.int[820] +825,825,0,main.int[821] +826,826,0,main.int[822] +827,827,0,main.int[823] +828,828,0,main.int[824] +829,829,0,main.int[825] +830,830,0,main.int[826] +831,831,0,main.int[827] +832,832,0,main.int[828] +833,833,0,main.int[829] +834,834,0,main.int[830] +835,835,0,main.int[831] +836,836,0,main.int[832] +837,837,0,main.int[833] +838,838,0,main.int[834] +839,839,0,main.int[835] +840,840,0,main.int[836] +841,841,0,main.int[837] +842,842,0,main.int[838] +843,843,0,main.int[839] +844,844,0,main.int[840] +845,845,0,main.int[841] +846,846,0,main.int[842] +847,847,0,main.int[843] +848,848,0,main.int[844] +849,849,0,main.int[845] +850,850,0,main.int[846] +851,851,0,main.int[847] +852,852,0,main.int[848] +853,853,0,main.int[849] +854,854,0,main.int[850] +855,855,0,main.int[851] +856,856,0,main.int[852] +857,857,0,main.int[853] +858,858,0,main.int[854] +859,859,0,main.int[855] +860,860,0,main.int[856] +861,861,0,main.int[857] +862,862,0,main.int[858] +863,863,0,main.int[859] +864,864,0,main.int[860] +865,865,0,main.int[861] +866,866,0,main.int[862] +867,867,0,main.int[863] +868,868,0,main.int[864] +869,869,0,main.int[865] +870,870,0,main.int[866] +871,871,0,main.int[867] +872,872,0,main.int[868] +873,873,0,main.int[869] +874,874,0,main.int[870] +875,875,0,main.int[871] +876,876,0,main.int[872] +877,877,0,main.int[873] +878,878,0,main.int[874] +879,879,0,main.int[875] +880,880,0,main.int[876] +881,881,0,main.int[877] +882,882,0,main.int[878] +883,883,0,main.int[879] +884,884,0,main.int[880] +885,885,0,main.int[881] +886,886,0,main.int[882] +887,887,0,main.int[883] +888,888,0,main.int[884] +889,889,0,main.int[885] +890,890,0,main.int[886] +891,891,0,main.int[887] +892,892,0,main.int[888] +893,893,0,main.int[889] +894,894,0,main.int[890] +895,895,0,main.int[891] +896,896,0,main.int[892] +897,897,0,main.int[893] +898,898,0,main.int[894] +899,899,0,main.int[895] +900,900,0,main.int[896] +901,901,0,main.int[897] +902,902,0,main.int[898] +903,903,0,main.int[899] +904,904,0,main.int[900] +905,905,0,main.int[901] +906,906,0,main.int[902] +907,907,0,main.int[903] +908,908,0,main.int[904] +909,909,0,main.int[905] +910,910,0,main.int[906] +911,911,0,main.int[907] +912,912,0,main.int[908] +913,913,0,main.int[909] +914,914,0,main.int[910] +915,915,0,main.int[911] +916,916,0,main.int[912] +917,917,0,main.int[913] +918,918,0,main.int[914] +919,919,0,main.int[915] +920,920,0,main.int[916] +921,921,0,main.int[917] +922,922,0,main.int[918] +923,923,0,main.int[919] +924,924,0,main.int[920] +925,925,0,main.int[921] +926,926,0,main.int[922] +927,927,0,main.int[923] +928,928,0,main.int[924] +929,929,0,main.int[925] +930,930,0,main.int[926] +931,931,0,main.int[927] +932,932,0,main.int[928] +933,933,0,main.int[929] +934,934,0,main.int[930] +935,935,0,main.int[931] +936,936,0,main.int[932] +937,937,0,main.int[933] +938,938,0,main.int[934] +939,939,0,main.int[935] +940,940,0,main.int[936] +941,941,0,main.int[937] +942,942,0,main.int[938] +943,943,0,main.int[939] +944,944,0,main.int[940] +945,945,0,main.int[941] +946,946,0,main.int[942] +947,947,0,main.int[943] +948,948,0,main.int[944] +949,949,0,main.int[945] +950,950,0,main.int[946] +951,951,0,main.int[947] +952,952,0,main.int[948] +953,953,0,main.int[949] +954,954,0,main.int[950] +955,955,0,main.int[951] +956,956,0,main.int[952] +957,957,0,main.int[953] +958,958,0,main.int[954] +959,959,0,main.int[955] +960,960,0,main.int[956] +961,961,0,main.int[957] +962,962,0,main.int[958] +963,963,0,main.int[959] +964,964,0,main.int[960] +965,965,0,main.int[961] +966,966,0,main.int[962] +967,967,0,main.int[963] +968,968,0,main.int[964] +969,969,0,main.int[965] +970,970,0,main.int[966] +971,971,0,main.int[967] +972,972,0,main.int[968] +973,973,0,main.int[969] +974,974,0,main.int[970] +975,975,0,main.int[971] +976,976,0,main.int[972] +977,977,0,main.int[973] +978,978,0,main.int[974] +979,979,0,main.int[975] +980,980,0,main.int[976] +981,981,0,main.int[977] +982,982,0,main.int[978] +983,983,0,main.int[979] +984,984,0,main.int[980] +985,985,0,main.int[981] +986,986,0,main.int[982] +987,987,0,main.int[983] +988,988,0,main.int[984] +989,989,0,main.int[985] +990,990,0,main.int[986] +991,991,0,main.int[987] +992,992,0,main.int[988] +993,993,0,main.int[989] +994,994,0,main.int[990] +995,995,0,main.int[991] +996,996,0,main.int[992] +997,997,0,main.int[993] +998,998,0,main.int[994] +999,999,0,main.int[995] +1000,1000,0,main.int[996] +1001,1001,0,main.int[997] +1002,1002,0,main.int[998] +1003,-1,0,main.int[999] diff --git a/test/groth16/input.json b/test/groth16/input.json new file mode 100644 index 00000000..85c31680 --- /dev/null +++ b/test/groth16/input.json @@ -0,0 +1 @@ +{ "a": 11, "b": 2 } diff --git a/test/groth16/witness.wtns b/test/groth16/witness.wtns new file mode 100644 index 00000000..07a308f0 Binary files /dev/null and b/test/groth16/witness.wtns differ