diff --git a/crypto/ecies/ecies.go b/crypto/ecies/ecies.go index 5fff2fa91c..ebdc4e2635 100644 --- a/crypto/ecies/ecies.go +++ b/crypto/ecies/ecies.go @@ -243,9 +243,6 @@ func Encrypt(rand io.Reader, pub *PublicKey, m, s1, s2 []byte) (ct []byte, err e } 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 { @@ -323,9 +320,6 @@ func (prv *PrivateKey) Decrypt(rand io.Reader, c, s1, s2 []byte) (m []byte, err Ke := K[:params.KeyLen] Km := K[params.KeyLen:] - hash.Write(Km) - Km = hash.Sum(nil) - hash.Reset() d := messageTag(params.Hash, Km, c[mStart:mEnd], s2) if subtle.ConstantTimeCompare(c[mEnd:], d) != 1 {