code: func Encrypt(rand io.Reader, pub *PublicKey, m, s1, s2 []byte) (ct []byte, err error) {
  	params := pub.Params
  	if params == nil {
  		if params = ParamsFromCurve(pub.Curve); params == nil {
  			err = ErrUnsupportedECIESParameters
  			return
  		}
  	}
  	R, err := GenerateKey(rand, pub.Curve, params)
  	if err != nil {
  		return
  	}
  
  	hash := params.Hash()
  	z, err := R.GenerateShared(pub, params.KeyLen, params.KeyLen)
  	if err != nil {
  		return
  	}
  	K, err := concatKDF(hash, z, s1, params.KeyLen+params.KeyLen)
  	if err != nil {
  		return
  	}
  	Ke := K[:params.KeyLen]
  	Km := K[params.KeyLen:]
  	hash.Write(Km)
  	Km = hash.Sum(nil)
  	hash.Reset()
  
  	em, err := symEncrypt(rand, params, Ke, m)
  	if err != nil || len(em) <= params.BlockSize {
  		return
  	}
  
  	d := messageTag(params.Hash, Km, em, s2)
  
  	Rb := elliptic.Marshal(pub.Curve, R.PublicKey.X, R.PublicKey.Y)
  	ct = make([]byte, len(Rb)+len(em)+len(d))
  	copy(ct, Rb)
  	copy(ct[len(Rb):], em)
  	copy(ct[len(Rb)+len(em):], d)
  	return
  }
docs: // Encrypt encrypts a message using ECIES as specified in SEC 1, 5.1.
  //
  // s1 and s2 contain shared information that is not part of the resulting
  // ciphertext. s1 is fed into key derivation, s2 is fed into the MAC. If the
  // shared information parameters aren't being used, they should be nil.