make it clear that key pairs are created per connection

This commit is contained in:
Matthias Radestock committed 2014-12-12 18:45:36 +00:00
1 parent b7d129b353
commit ee19e39712
1 file changed
+7 -8
+7 -8
View File
@@ -114,14 +114,13 @@ poorly documented, and easily used wrongly.
#### Establishing the Ephemeral Session Key #### Establishing the Ephemeral Session Key
When a weave peer has been started with the `-password` option, the For every connection between peers, a fresh public/private key pair is
initial handshake between the peers over TCP includes the exchange of created at both ends, using NaCl's `GenerateKey` function, and the
the peers' public keys. Each peer generates a fresh public and private public key portion is sent to the other end as part of the initial
key pair for each connection, and these are created from the NaCl handshake performed over TCP. Peers that were started with `-password`
crypto library's `GenerateKey` function. Peers that were started with do not continue with connection establishment unless they receive a
`-password` do not continue with connection establishment unless they public key from the remote peer. Thus either all peers in a weave
receive a public key from the remote peer. Thus either all peers in a network must be started with `-password`, or none of them.
weave network must be started with `-password`, or none of them.
When a peer has received a public key from the remote peer, it uses When a peer has received a public key from the remote peer, it uses
this to form the ephemeral session key for this connection. The public this to form the ephemeral session key for this connection. The public