func (g *G1) Add(a, b *G1) *G1 {
	if g.p == nil {
		g.p = newCurvePoint(nil)
	}
	g.p.Add(a.p, b.p, new(bnPool))
	return g
}
Add sets e to a+b and then returns e.
BUG(agl): this function is not complete: a==b fails.
package bn256
import (
	"crypto/rand"
	"io"
	"math/big"
)
type G1 struct {
	p *curvePoint
}
func RandomG1(r io.Reader) (*big.Int, *G1, error) {
	var k *big.Int
	var err error
	for {
		k, err = rand.Int(r, Order)
		if err != nil {
			return nil, nil, err
		}
		if k.Sign() > 0 {
			break
		}
	}
	return k, new(G1).ScalarBaseMult(k), nil
}
func (g *G1) String() string {
	return "bn256.G1" + g.p.String()
}
func (g *G1) CurvePoints() (*big.Int, *big.Int, *big.Int, *big.Int) {
	return g.p.x, g.p.y, g.p.z, g.p.t
}
func (g *G1) ScalarBaseMult(k *big.Int) *G1 {
	if g.p == nil {
		g.p = newCurvePoint(nil)
	}
	g.p.Mul(curveGen, k, new(bnPool))
	return g
}
func (g *G1) ScalarMult(a *G1, k *big.Int) *G1 {
	if g.p == nil {
		g.p = newCurvePoint(nil)
	}
	g.p.Mul(a.p, k, new(bnPool))
	return g
}