jbenet/go-ipfs — pull request #34 by Bren2010 (2014-09-04 01:41:05+00:00)
Title: Implemented a Basic TLS

Proposed solution as a simple, secure, and modular transport layer.

Uses peer keys for signing only (which they probably should be restricted to), and a shared key is derived through ECDH. Provides forward secrecy, data secrecy, data integrity, and mutual authentication. Borrows the idea of cipher suites/negotiation from TLS for modularity.

Protocol:
Step 1: Hello = (Random, MultiPublicKey, Supported Algorithms)
Step 2: Exchange = (EECDH Public Key, Sig(Hello1 || Hello2 || EECDH Public Key))
Step 3: Finish = E("Finish")

Atm, it hasn't been integrated with the rest of the code base yet.

Peer review/suggestions welcome, as always.