github.com/zignig/go-ipfs@v0.0.0-20141111235910-c9e5fdf55a52/net/handshake/README.md (about) 1 # IFPS Handshake 2 3 The IPFS Protocol Handshake is divided into three sequential steps 4 5 1. Version Handshake (`Hanshake1`) 6 2. Secure Channel (`NewSecureConn`) 7 3. Services (`Handshake3`) 8 9 Currently these parts currently happen sequentially (costing an awful 5 RTT), 10 but can be optimized to 2 RTT. 11 12 ### Version Handshake 13 14 The Version Handshake ensures that nodes speaking to each other can interoperate. 15 They send each other protocol versions and ensure there is a match on the major 16 version (semver). 17 18 ### Secure Channel 19 20 The second part exchanges keys and establishes a secure comm channel. This 21 follows ECDHE TLS, but *isn't* TLS. (why will be written up elsewhere). 22 23 ### Services 24 25 The Services portion sends any additional information on nodes needed 26 by the nodes, e.g. Listen Address (the received address could be a Dial addr), 27 and later on can include Service listing (dht, exchange, ipns, etc).