aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/bn256/twist.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2017-05-24 21:40:02 +0800
committerFelix Lange <fjl@twurst.com>2017-05-24 21:40:26 +0800
commit069cb661c3587a0ff5f74c85775c2849a400cb9c (patch)
treebbdb5cfa2fea43249f04bc018d19cbad3a31b93c /crypto/bn256/twist.go
parente1e87d8b1aebe88354e2f64ffd031709524522e4 (diff)
downloadgo-tangerine-069cb661c3587a0ff5f74c85775c2849a400cb9c.tar
go-tangerine-069cb661c3587a0ff5f74c85775c2849a400cb9c.tar.gz
go-tangerine-069cb661c3587a0ff5f74c85775c2849a400cb9c.tar.bz2
go-tangerine-069cb661c3587a0ff5f74c85775c2849a400cb9c.tar.lz
go-tangerine-069cb661c3587a0ff5f74c85775c2849a400cb9c.tar.xz
go-tangerine-069cb661c3587a0ff5f74c85775c2849a400cb9c.tar.zst
go-tangerine-069cb661c3587a0ff5f74c85775c2849a400cb9c.zip
crypto/bn256: fix go vet false positive
Also add the package to the license tool ignore list.
Diffstat (limited to 'crypto/bn256/twist.go')
-rw-r--r--crypto/bn256/twist.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/bn256/twist.go b/crypto/bn256/twist.go
index 1e052456e..95b966e2e 100644
--- a/crypto/bn256/twist.go
+++ b/crypto/bn256/twist.go
@@ -165,12 +165,12 @@ func (c *twistPoint) Double(a *twistPoint, pool *bnPool) {
// See http://hyperelliptic.org/EFD/g1p/auto-code/shortw/jacobian-0/doubling/dbl-2009-l.op3
A := newGFp2(pool).Square(a.x, pool)
B := newGFp2(pool).Square(a.y, pool)
- C := newGFp2(pool).Square(B, pool)
+ C_ := newGFp2(pool).Square(B, pool)
t := newGFp2(pool).Add(a.x, B)
t2 := newGFp2(pool).Square(t, pool)
t.Sub(t2, A)
- t2.Sub(t, C)
+ t2.Sub(t, C_)
d := newGFp2(pool).Add(t2, t2)
t.Add(A, A)
e := newGFp2(pool).Add(t, A)
@@ -179,7 +179,7 @@ func (c *twistPoint) Double(a *twistPoint, pool *bnPool) {
t.Add(d, d)
c.x.Sub(f, t)
- t.Add(C, C)
+ t.Add(C_, C_)
t2.Add(t, t)
t.Add(t2, t2)
c.y.Sub(d, c.x)
@@ -191,7 +191,7 @@ func (c *twistPoint) Double(a *twistPoint, pool *bnPool) {
A.Put(pool)
B.Put(pool)
- C.Put(pool)
+ C_.Put(pool)
t.Put(pool)
t2.Put(pool)
d.Put(pool)