diff --git a/crypto/bn256/cloudflare/bn256.go b/crypto/bn256/cloudflare/bn256.go index 38822a76bf..ff585849cf 100644 --- a/crypto/bn256/cloudflare/bn256.go +++ b/crypto/bn256/cloudflare/bn256.go @@ -45,8 +45,8 @@ func RandomG1(r io.Reader) (*big.Int, *G1, error) { return k, new(G1).ScalarBaseMult(k), nil } -func (g *G1) String() string { - return "bn256.G1" + g.p.String() +func (e *G1) String() string { + return "bn256.G1" + e.p.String() } // ScalarBaseMult sets e to g*k where g is the generator of the group and then @@ -334,8 +334,8 @@ func Miller(g1 *G1, g2 *G2) *GT { return >{miller(g2.p, g1.p)} } -func (g *GT) String() string { - return "bn256.GT" + g.p.String() +func (e *GT) String() string { + return "bn256.GT" + e.p.String() } // ScalarMult sets e to a*k and then returns e. diff --git a/crypto/bn256/cloudflare/gfp12.go b/crypto/bn256/cloudflare/gfp12.go index 93fb368a7b..287b8be1f6 100644 --- a/crypto/bn256/cloudflare/gfp12.go +++ b/crypto/bn256/cloudflare/gfp12.go @@ -110,7 +110,7 @@ func (e *gfP12) MulScalar(a *gfP12, b *gfP6) *gfP12 { return e } -func (c *gfP12) Exp(a *gfP12, power *big.Int) *gfP12 { +func (e *gfP12) Exp(a *gfP12, power *big.Int) *gfP12 { sum := (&gfP12{}).SetOne() t := &gfP12{} @@ -123,8 +123,8 @@ func (c *gfP12) Exp(a *gfP12, power *big.Int) *gfP12 { } } - c.Set(sum) - return c + e.Set(sum) + return e } func (e *gfP12) Square(a *gfP12) *gfP12 {