arnaucube
arnaucube/grapevine-sonobePublic Self-hosted repository
grapevine-sonobe/circom/node_modules/circomlib/circuits/sign.circom
circom/node_modules/circomlib/circuits/sign.circomRaw
 1/*
 2    Copyright 2018 0KIMS association.
 3
 4    This file is part of circom (Zero Knowledge Circuit Compiler).
 5
 6    circom is a free software: you can redistribute it and/or modify it
 7    under the terms of the GNU General Public License as published by
 8    the Free Software Foundation, either version 3 of the License, or
 9    (at your option) any later version.
10
11    circom is distributed in the hope that it will be useful, but WITHOUT
12    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13    or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
14    License for more details.
15
16    You should have received a copy of the GNU General Public License
17    along with circom. If not, see <https://www.gnu.org/licenses/>.
18*/
19pragma circom 2.0.0;
20
21include "compconstant.circom";
22
23template Sign() {
24    signal input in[254];
25    signal output sign;
26
27    component comp = CompConstant(10944121435919637611123202872628637544274182200208017171849102093287904247808);
28
29    var i;
30
31    for (i=0; i<254; i++) {
32        comp.in[i] <== in[i];
33    }
34
35    sign <== comp.out;
36}