|
|
@ -88,12 +88,12 @@ func lineFunctionDouble(r *twistPoint, q *curvePoint, pool *bnPool) (a, b, c *gf |
|
|
|
|
|
|
|
|
|
|
|
A := newGFp2(pool).Square(r.x, pool) |
|
|
|
A := newGFp2(pool).Square(r.x, pool) |
|
|
|
B := newGFp2(pool).Square(r.y, pool) |
|
|
|
B := newGFp2(pool).Square(r.y, pool) |
|
|
|
C := newGFp2(pool).Square(B, pool) |
|
|
|
C_ := newGFp2(pool).Square(B, pool) |
|
|
|
|
|
|
|
|
|
|
|
D := newGFp2(pool).Add(r.x, B) |
|
|
|
D := newGFp2(pool).Add(r.x, B) |
|
|
|
D.Square(D, pool) |
|
|
|
D.Square(D, pool) |
|
|
|
D.Sub(D, A) |
|
|
|
D.Sub(D, A) |
|
|
|
D.Sub(D, C) |
|
|
|
D.Sub(D, C_) |
|
|
|
D.Add(D, D) |
|
|
|
D.Add(D, D) |
|
|
|
|
|
|
|
|
|
|
|
E := newGFp2(pool).Add(A, A) |
|
|
|
E := newGFp2(pool).Add(A, A) |
|
|
@ -112,7 +112,7 @@ func lineFunctionDouble(r *twistPoint, q *curvePoint, pool *bnPool) (a, b, c *gf |
|
|
|
|
|
|
|
|
|
|
|
rOut.y.Sub(D, rOut.x) |
|
|
|
rOut.y.Sub(D, rOut.x) |
|
|
|
rOut.y.Mul(rOut.y, E, pool) |
|
|
|
rOut.y.Mul(rOut.y, E, pool) |
|
|
|
t := newGFp2(pool).Add(C, C) |
|
|
|
t := newGFp2(pool).Add(C_, C_) |
|
|
|
t.Add(t, t) |
|
|
|
t.Add(t, t) |
|
|
|
t.Add(t, t) |
|
|
|
t.Add(t, t) |
|
|
|
rOut.y.Sub(rOut.y, t) |
|
|
|
rOut.y.Sub(rOut.y, t) |
|
|
@ -142,7 +142,7 @@ func lineFunctionDouble(r *twistPoint, q *curvePoint, pool *bnPool) (a, b, c *gf |
|
|
|
|
|
|
|
|
|
|
|
A.Put(pool) |
|
|
|
A.Put(pool) |
|
|
|
B.Put(pool) |
|
|
|
B.Put(pool) |
|
|
|
C.Put(pool) |
|
|
|
C_.Put(pool) |
|
|
|
D.Put(pool) |
|
|
|
D.Put(pool) |
|
|
|
E.Put(pool) |
|
|
|
E.Put(pool) |
|
|
|
G.Put(pool) |
|
|
|
G.Put(pool) |
|
|
|