aboutsummaryrefslogtreecommitdiffstats
path: root/whisper/whisperv5/doc.go
diff options
context:
space:
mode:
authorgluk256 <gluk256@users.noreply.github.com>2017-04-27 03:05:48 +0800
committerFelix Lange <fjl@users.noreply.github.com>2017-04-27 03:05:48 +0800
commit95f0bd0acf301bf8415747c4ff050e8a4dfdc864 (patch)
tree13edad970fb30a8e12151b2ec1a443b0ad970d2b /whisper/whisperv5/doc.go
parent8dce4c283dda3a8e10aa30dadab05a8c0dd9e19d (diff)
downloadgo-tangerine-95f0bd0acf301bf8415747c4ff050e8a4dfdc864.tar
go-tangerine-95f0bd0acf301bf8415747c4ff050e8a4dfdc864.tar.gz
go-tangerine-95f0bd0acf301bf8415747c4ff050e8a4dfdc864.tar.bz2
go-tangerine-95f0bd0acf301bf8415747c4ff050e8a4dfdc864.tar.lz
go-tangerine-95f0bd0acf301bf8415747c4ff050e8a4dfdc864.tar.xz
go-tangerine-95f0bd0acf301bf8415747c4ff050e8a4dfdc864.tar.zst
go-tangerine-95f0bd0acf301bf8415747c4ff050e8a4dfdc864.zip
whisper: message format refactoring (#14335)
* whisper: salt removed from AES encryption * whisper: padding format updated * whisper: padding test added * whisper: padding refactored, tests fixed * whisper: padding test updated * whisper: wnode bugfix * whisper: send/receive protocol updated * whisper: minor update * whisper: bugfix in test * whisper: updated parameter names and comments * whisper: functions renamed * whisper: minor refactoring
Diffstat (limited to 'whisper/whisperv5/doc.go')
-rw-r--r--whisper/whisperv5/doc.go16
1 files changed, 7 insertions, 9 deletions
diff --git a/whisper/whisperv5/doc.go b/whisper/whisperv5/doc.go
index d60868f67..768291a16 100644
--- a/whisper/whisperv5/doc.go
+++ b/whisper/whisperv5/doc.go
@@ -49,18 +49,16 @@ const (
paddingMask = byte(3)
signatureFlag = byte(4)
- TopicLength = 4
- signatureLength = 65
- aesKeyLength = 32
- saltLength = 12
- AESNonceMaxLength = 12
- keyIdSize = 32
+ TopicLength = 4
+ signatureLength = 65
+ aesKeyLength = 32
+ AESNonceLength = 12
+ keyIdSize = 32
DefaultMaxMessageLength = 1024 * 1024
- DefaultMinimumPoW = 1.0 // todo: review after testing.
+ DefaultMinimumPoW = 0.2
- padSizeLimitLower = 128 // it can not be less - we don't want to reveal the absence of signature
- padSizeLimitUpper = 256 // just an arbitrary number, could be changed without losing compatibility
+ padSizeLimit = 256 // just an arbitrary number, could be changed without breaking the protocol (must not exceed 2^24)
messageQueueLimit = 1024
expirationCycle = time.Second