func addPoints(a []byte, b []byte) []byte {
	ap, err := btcec.ParsePubKey(a, btcec.S256())
	if err != nil {
		panic(err)
	}
	bp, err := btcec.ParsePubKey(b, btcec.S256())
	if err != nil {
		panic(err)
	}
	sumX, sumY := btcec.S256().Add(ap.X, ap.Y, bp.X, bp.Y)
	sum := &btcec.PublicKey{
		Curve: btcec.S256(),
		X:     sumX,
		Y:     sumY,
	}
	return sum.SerializeCompressed()
}
func addPoints(a []byte, b []byte) []byte {
	ap, err := btcec.ParsePubKey(a, btcec.S256())
	if err != nil {
		panic(err)
	}
	bp, err := btcec.ParsePubKey(b, btcec.S256())
	if err != nil {
		panic(err)
	}
	sumX, sumY := btcec.S256().Add(ap.X, ap.Y, bp.X, bp.Y)
	sum := &btcec.PublicKey{
		Curve: btcec.S256(),
		X:     sumX,
		Y:     sumY,
	}
	return sum.SerializeCompressed()
}
func addPoints ( a [ ] byte , b [ ] byte ) [ ] byte { ap , err := btcec . ParsePubKey ( a , btcec . S256 ( ) ) if err != nil { panic ( err ) } bp , err := btcec . ParsePubKey ( b , btcec . S256 ( ) ) if err != nil { panic ( err ) } sumX , sumY := btcec . S256 ( ) . Add ( ap . X , ap . Y , bp . X , bp . Y ) sum := & btcec . PublicKey { Curve : btcec . S256 ( ) , X : sumX , Y : sumY , } return sum . SerializeCompressed ( ) }
// eliptic curve pubkey addition
eliptic curve pubkey addition