From b2540215b5d59b3c6a649dbe11696484283e89d6 Mon Sep 17 00:00:00 2001 From: lash Date: Fri, 22 Mar 2019 13:32:31 +0100 Subject: [PATCH] swarm/network: Clarify comment about privatekey generation data --- swarm/network/simulation/node.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swarm/network/simulation/node.go b/swarm/network/simulation/node.go index dfb704e62a..c931bb8825 100644 --- a/swarm/network/simulation/node.go +++ b/swarm/network/simulation/node.go @@ -329,9 +329,9 @@ func init() { } // derive a private key for swarm for the node key -// returns the private key used to generate the bzz key AND the generated bzz key +// returns the private key used to generate the bzz key func BzzKeyFromConfig(conf *adapters.NodeConfig) (*ecdsa.PrivateKey, error) { - // ecdsa.GenerateKey takes 40 bytes entropy + // pad the seed key some arbitrary data as ecdsa.GenerateKey takes 40 bytes seed data privKeyBuf := append(crypto.FromECDSA(conf.PrivateKey), []byte{0x62, 0x7a, 0x7a, 0x62, 0x7a, 0x7a, 0x62, 0x7a}...) bzzPrivateKey, err := ecdsa.GenerateKey(crypto.S256(), bytes.NewReader(privKeyBuf)) if err != nil {