Browse Source

BabyJub Optimization

feature/synctests2
Jordi Baylina 5 years ago
parent
commit
6ea1ea718a
No known key found for this signature in database GPG Key ID: 7480C80C1BE43112
1 changed files with 4 additions and 6 deletions
  1. +4
    -6
      circuits/babyjub.circom

+ 4
- 6
circuits/babyjub.circom

@ -11,7 +11,6 @@ template BabyAdd() {
signal beta;
signal gamma;
signal delta;
signal epsilon;
signal tau;
var a = 168700;
@ -19,15 +18,14 @@ template BabyAdd() {
beta <== x1*y2;
gamma <== y1*x2;
delta <== y1*y2;
epsilon <== x1*x2;
tau <== delta * epsilon;
delta <== (-a*x1+y1)*(x2 + y2);
tau <== beta * gamma;
xout <-- (beta + gamma) / (1+ d*tau);
(1+ d*tau) * xout === (beta + gamma);
yout <-- (delta - a * epsilon) / (1-d*tau);
(1-d*tau)*yout === (delta - a * epsilon);
yout <-- (delta + a*beta - gamma) / (1-d*tau);
(1-d*tau)*yout === (delta + a*beta - gamma);
}
template BabyDbl() {

Loading…
Cancel
Save