code: func sharedSecret(curve elliptic.Curve, pub, priv []byte) ([]byte, error) {
  	publicX, publicY := elliptic.Unmarshal(curve, pub)
  	if publicX == nil {
  		return nil, errors.New("Couldn't unmarshal public key. Not a valid point on the curve")
  	}
  	x, _ := curve.ScalarMult(publicX, publicY, priv)
  	return x.Bytes(), nil
  }
docs: // Given the coordinates of a party A's public key and the bytes of party B's
  // private key, compute a shared secret.