diff options
author | Guillaume Ballet <gballet@gmail.com> | 2017-12-08 18:40:59 +0800 |
---|---|---|
committer | Felix Lange <fjl@users.noreply.github.com> | 2017-12-08 18:40:59 +0800 |
commit | d95962cd5d3ea163f8e91d7a9ca2f6303799b2e2 (patch) | |
tree | 7255f029c04eb4e66e07b757c1ef44ecd1edb986 /whisper/whisperv6/whisper.go | |
parent | b5874273cec729adce84acf5848536d20fb60f7c (diff) | |
download | go-tangerine-d95962cd5d3ea163f8e91d7a9ca2f6303799b2e2.tar go-tangerine-d95962cd5d3ea163f8e91d7a9ca2f6303799b2e2.tar.gz go-tangerine-d95962cd5d3ea163f8e91d7a9ca2f6303799b2e2.tar.bz2 go-tangerine-d95962cd5d3ea163f8e91d7a9ca2f6303799b2e2.tar.lz go-tangerine-d95962cd5d3ea163f8e91d7a9ca2f6303799b2e2.tar.xz go-tangerine-d95962cd5d3ea163f8e91d7a9ca2f6303799b2e2.tar.zst go-tangerine-d95962cd5d3ea163f8e91d7a9ca2f6303799b2e2.zip |
whisper/whisperv6: remove aesnonce (#15578)
As per EIP-627, the salt for symmetric encryption is now
part of the payload. This commit does that.
Diffstat (limited to 'whisper/whisperv6/whisper.go')
-rw-r--r-- | whisper/whisperv6/whisper.go | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/whisper/whisperv6/whisper.go b/whisper/whisperv6/whisper.go index e2b884f3d..0ed82a0ff 100644 --- a/whisper/whisperv6/whisper.go +++ b/whisper/whisperv6/whisper.go @@ -591,13 +591,6 @@ func (wh *Whisper) add(envelope *Envelope) (bool, error) { return false, fmt.Errorf("oversized version [%x]", envelope.Hash()) } - aesNonceSize := len(envelope.AESNonce) - if aesNonceSize != 0 && aesNonceSize != AESNonceLength { - // the standard AES GCM nonce size is 12 bytes, - // but constant gcmStandardNonceSize cannot be accessed (not exported) - return false, fmt.Errorf("wrong size of AESNonce: %d bytes [env: %x]", aesNonceSize, envelope.Hash()) - } - if envelope.PoW() < wh.MinPow() { log.Debug("envelope with low PoW dropped", "PoW", envelope.PoW(), "hash", envelope.Hash().Hex()) return false, nil // drop envelope without error |