circomlib/src/printconstants.js
src/printconstants.jsRaw
1const mimc = require("./mimc7");
2
3const SEED = "iden3_mimc";
4
5let nRounds;
6if (typeof process.argv[2] != "undefined") {
7 nRounds = parseInt(process.argv[2]);
8} else {
9 nRounds = 256;
10}
11
12const cts = mimc.getConstants(SEED, nRounds);
13
14for (let i=0; i<nRounds; i++) {
15 let S = cts[i];
16 if (i<nRounds-1) S=S+",";
17 console.log(S);
18}