func (c *twistPoint) IsOnCurve() bool {
	pool := new(bnPool)
	yy := newGFp2(pool).Square(c.y, pool)
	xxx := newGFp2(pool).Square(c.x, pool)
	xxx.Mul(xxx, c.x, pool)
	yy.Sub(yy, xxx)
	yy.Sub(yy, twistB)
	yy.Minimal()
	return yy.x.Sign() == 0 && yy.y.Sign() == 0
}
IsOnCurve returns true iff c is on the curve where c must be in affine form.
package bn256
import (
	"math/big"
)
type twistPoint struct {
	x, y, z, t *gfP2
}
var twistB = &gfP2{
	bigFromBase10("6500054969564660373279643874235990574282535810762300357187714502686418407178"),
	bigFromBase10("45500384786952622612957507119651934019977750675336102500314001518804928850249"),
}
var twistGen = &twistPoint{
	&gfP2{
		bigFromBase10("21167961636542580255011770066570541300993051739349375019639421053990175267184"),
		bigFromBase10("64746500191241794695844075326670126197795977525365406531717464316923369116492"),
	},
	&gfP2{
		bigFromBase10("20666913350058776956210519119118544732556678129809273996262322366050359951122"),
		bigFromBase10("17778617556404439934652658462602675281523610326338642107814333856843981424549"),
	},
	&gfP2{
		bigFromBase10("0"),
		bigFromBase10("1"),
	},
	&gfP2{
		bigFromBase10("0"),
		bigFromBase10("1"),
	},
}
func newTwistPoint(pool *bnPool) *twistPoint {
	return &twistPoint{
		newGFp2(pool),
		newGFp2(pool),
		newGFp2(pool),
		newGFp2(pool),
	}
}
func (c *twistPoint) String() string {
	return "(" + c.x.String() + ", " + c.y.String() + ", " + c.z.String() + ")"
}
func (c *twistPoint) Put(pool *bnPool) {
	c.x.Put(pool)
	c.y.Put(pool)
	c.z.Put(pool)
	c.t.Put(pool)
}
func (c *twistPoint) Set(a *twistPoint) {
	c.x.Set(a.x)
	c.y.Set(a.y)
	c.z.Set(a.z)
	c.t.Set(a.t)
}