mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
crypto/bn256/cloudfare: golint fixes
This commit is contained in:
parent
5b6527cefb
commit
e6df8a55cc
2 changed files with 7 additions and 7 deletions
|
|
@ -45,8 +45,8 @@ func RandomG1(r io.Reader) (*big.Int, *G1, error) {
|
||||||
return k, new(G1).ScalarBaseMult(k), nil
|
return k, new(G1).ScalarBaseMult(k), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *G1) String() string {
|
func (e *G1) String() string {
|
||||||
return "bn256.G1" + g.p.String()
|
return "bn256.G1" + e.p.String()
|
||||||
}
|
}
|
||||||
|
|
||||||
// ScalarBaseMult sets e to g*k where g is the generator of the group and then
|
// 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)}
|
return >{miller(g2.p, g1.p)}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (g *GT) String() string {
|
func (e *GT) String() string {
|
||||||
return "bn256.GT" + g.p.String()
|
return "bn256.GT" + e.p.String()
|
||||||
}
|
}
|
||||||
|
|
||||||
// ScalarMult sets e to a*k and then returns e.
|
// ScalarMult sets e to a*k and then returns e.
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,7 @@ func (e *gfP12) MulScalar(a *gfP12, b *gfP6) *gfP12 {
|
||||||
return e
|
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()
|
sum := (&gfP12{}).SetOne()
|
||||||
t := &gfP12{}
|
t := &gfP12{}
|
||||||
|
|
||||||
|
|
@ -123,8 +123,8 @@ func (c *gfP12) Exp(a *gfP12, power *big.Int) *gfP12 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
c.Set(sum)
|
e.Set(sum)
|
||||||
return c
|
return e
|
||||||
}
|
}
|
||||||
|
|
||||||
func (e *gfP12) Square(a *gfP12) *gfP12 {
|
func (e *gfP12) Square(a *gfP12) *gfP12 {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue