kubo/net/handshake
Juan Batiz-Benet 184c25430b go-vet friendly codebase
- distinguish log.Error and log.Errorf functions
- Initialize structs with field names
- A bit of unreachable code (defers)
2014-10-25 03:46:39 -07:00
..
pb updated vendoring 2014-10-22 05:29:22 -07:00
handshake1_test.go handshake1 renaming 2014-10-22 04:56:18 -07:00
handshake1.go spell nit 2014-10-22 12:49:37 -07:00
handshake3.go go-vet friendly codebase 2014-10-25 03:46:39 -07:00
README.md minimal doc on handshake 2014-10-22 13:10:55 -07:00

IFPS Handshake

The IPFS Protocol Handshake is divided into three sequential steps

  1. Version Handshake (Hanshake1)
  2. Secure Channel (NewSecureConn)
  3. Services (Handshake3)

Currently these parts currently happen sequentially (costing an awful 5 RTT), but can be optimized to 2 RTT.

Version Handshake

The Version Handshake ensures that nodes speaking to each other can interoperate. They send each other protocol versions and ensure there is a match on the major version (semver).

Secure Channel

The second part exchanges keys and establishes a secure comm channel. This follows ECDHE TLS, but isn't TLS. (why will be written up elsewhere).

Services

The Services portion sends any additional information on nodes needed by the nodes, e.g. Listen Address (the received address could be a Dial addr), and later on can include Service listing (dht, exchange, ipns, etc).