func IsOnCurveU(pt [64]byte) bool {
	_, ok := newPoint().SetBytesU(pt)
	return ok
}
IsOnCurveU returns true if pt represents an uncompressed point on the curve.
package fourq
func multByCofactor(pt *point) {
	temp := (&point{}).Set(pt)
	feMul(&temp.t, &temp.t, d)
	pDbl(pt)
	pMixedAdd(pt, temp)
	pDbl(pt)
	pDbl(pt)
	pDbl(pt)
	pDbl(pt)
	pMixedAdd(pt, temp)
	pDbl(pt)
	pDbl(pt)
	pDbl(pt)
}
func scalarBaseMult(k []byte) *point {
	if len(k) > 32 {
		return nil
	}
	K := make([]byte, 32)
	copy(K[32-len(k):], k)
	sum := newPoint()
	for i := 0; i < 4; i++ {
		for bit := uint(0); bit < 8; bit++ {
			var idx byte
			for block := 0; block < 8; block++ {
				idx = 2*idx + ((K[4*block+i] >> (7 - bit)) & 1)
			}
			pDbl(sum)
			if idx != 0 {
				pMixedAdd(sum, generatorBase[idx])
			}
		}
	}
	return sum
}
func scalarMult(pt *point, k []byte, clearCofactor bool) *point {
	if clearCofactor {
		multByCofactor(pt)
		pt.MakeAffine()
	}
	feMul(&pt.t, &pt.t, d)
	sum := newPoint()
	for _, byte := range k {
		for bit := 0; bit < 8; bit++ {
			pDbl(sum)
			if byte&0x80 == 0x080 {
				pMixedAdd(sum, pt)
			}
			byte <<= 1
		}
	}
	return sum
}
func IsOnCurve(pt [32]byte) bool {
	_, ok := newPoint().SetBytes(pt)
	return ok
}