Pedersen2 and BitPoints MulFix and MulAny

This commit is contained in:
Jordi Baylina
2018-11-27 16:03:57 +01:00
parent fcc61f9237
commit 55e9a60c37
40 changed files with 2272 additions and 80 deletions

View File

@@ -29,3 +29,36 @@ template BabyAdd() {
yout <-- (delta - a * epsilon) / (1-d*tau);
(1-d*tau)*yout === (delta - a * epsilon);
}
template BabyDbl() {
signal input x;
signal input y;
signal output xout;
signal output yout;
component adder = BabyAdd();
adder.x1 <== x;
adder.y1 <== y;
adder.x2 <== x;
adder.y2 <== y;
adder.xout ==> xout;
adder.yout ==> yout;
}
template BabyCheck() {
signal input x;
signal input y;
signal x2;
signal y2;
var a = 168700;
var d = 168696;
x2 <== x*x;
y2 <== y*y;
a*x2 + y2 === 1 + d*x2*y2;
}