crypto: add SignatureLength constant and use it everywhere (#19996)

Original change by @jpeletier
This commit is contained in:
Felix Lange
2019-08-22 15:14:06 +02:00
committed by GitHub
parent b90cdbaa79
commit 54b271a86d
11 changed files with 46 additions and 33 deletions

View File

@ -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