mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 13:16:42 +00:00
Remove hashing of MAC key part of KDF derived key
This commit is contained in:
parent
d1f39f841b
commit
0b6a702f24
1 changed files with 0 additions and 6 deletions
|
|
@ -243,9 +243,6 @@ func Encrypt(rand io.Reader, pub *PublicKey, m, s1, s2 []byte) (ct []byte, err e
|
||||||
}
|
}
|
||||||
Ke := K[:params.KeyLen]
|
Ke := K[:params.KeyLen]
|
||||||
Km := K[params.KeyLen:]
|
Km := K[params.KeyLen:]
|
||||||
hash.Write(Km)
|
|
||||||
Km = hash.Sum(nil)
|
|
||||||
hash.Reset()
|
|
||||||
|
|
||||||
em, err := symEncrypt(rand, params, Ke, m)
|
em, err := symEncrypt(rand, params, Ke, m)
|
||||||
if err != nil {
|
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]
|
Ke := K[:params.KeyLen]
|
||||||
Km := 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)
|
d := messageTag(params.Hash, Km, c[mStart:mEnd], s2)
|
||||||
if subtle.ConstantTimeCompare(c[mEnd:], d) != 1 {
|
if subtle.ConstantTimeCompare(c[mEnd:], d) != 1 {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue