aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/rlpx.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2019-08-22 21:14:06 +0800
committerGitHub <noreply@github.com>2019-08-22 21:14:06 +0800
commit54b271a86dd748f3b0bcebeaf678dc34e0d6177a (patch)
tree0a24f87f9dde9144b956a6adc54ba72c18f5ccd3 /p2p/rlpx.go
parentb90cdbaa79cfe438aab0f1389d35980f3d38ec84 (diff)
downloadgo-tangerine-54b271a86dd748f3b0bcebeaf678dc34e0d6177a.tar
go-tangerine-54b271a86dd748f3b0bcebeaf678dc34e0d6177a.tar.gz
go-tangerine-54b271a86dd748f3b0bcebeaf678dc34e0d6177a.tar.bz2
go-tangerine-54b271a86dd748f3b0bcebeaf678dc34e0d6177a.tar.lz
go-tangerine-54b271a86dd748f3b0bcebeaf678dc34e0d6177a.tar.xz
go-tangerine-54b271a86dd748f3b0bcebeaf678dc34e0d6177a.tar.zst
go-tangerine-54b271a86dd748f3b0bcebeaf678dc34e0d6177a.zip
crypto: add SignatureLength constant and use it everywhere (#19996)
Original change by @jpeletier
Diffstat (limited to 'p2p/rlpx.go')
-rw-r--r--p2p/rlpx.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/p2p/rlpx.go b/p2p/rlpx.go
index 0636431f5..52e1eb8a4 100644
--- a/p2p/rlpx.go
+++ b/p2p/rlpx.go
@@ -46,10 +46,10 @@ import (
const (
maxUint24 = ^uint32(0) >> 8
- sskLen = 16 // ecies.MaxSharedKeyLength(pubKey) / 2
- sigLen = 65 // elliptic S256
- pubLen = 64 // 512 bit pubkey in uncompressed representation without format byte
- shaLen = 32 // hash length (for nonce etc)
+ sskLen = 16 // ecies.MaxSharedKeyLength(pubKey) / 2
+ sigLen = crypto.SignatureLength // elliptic S256
+ pubLen = 64 // 512 bit pubkey in uncompressed representation without format byte
+ shaLen = 32 // hash length (for nonce etc)
authMsgLen = sigLen + shaLen + pubLen + shaLen + 1
authRespLen = pubLen + shaLen + 1