copy handshake readme into a doc.go for pretty godoc results
Jeromy committed
Nov 8, 2014 at 20:45 UTC
c62acb276328798fe06c7fcd142918140982c1e0
1 file changed
+34
net/handshake/doc.go
new
+34
@@ -0,0 +1,34 @@
1
+/*
2
+package handshake implements the ipfs handshake protocol
3
+
4
+IPFS Handshake
5
+
6
+The IPFS Protocol Handshake is divided into three sequential steps
7
+
8
+1. Version Handshake (`Hanshake1`)
9
+
10
+2. Secure Channel (`NewSecureConn`)
11
+
12
+3. Services (`Handshake3`)
13
+
14
+Currently these parts currently happen sequentially (costing an awful 5 RTT),
15
+but can be optimized to 2 RTT.
16
+
17
+Version Handshake
18
+
19
+The Version Handshake ensures that nodes speaking to each other can interoperate.
20
+They send each other protocol versions and ensure there is a match on the major
21
+version (semver).
22
+
23
+Secure Channel
24
+
25
+The second part exchanges keys and establishes a secure comm channel. This
26
+follows ECDHE TLS, but *isn't* TLS. (why will be written up elsewhere).
27
+
28
+Services
29
+
30
+The Services portion sends any additional information on nodes needed
31
+by the nodes, e.g. Listen Address (the received address could be a Dial addr),
32
+and later on can include Service listing (dht, exchange, ipns, etc).
33
+*/
34
+package handshake