devblog/day 431 p2p linkinggit-annexhttp://git-annex.branchable.com/devblog/day_431__p2p_linking/git-annexikiwiki2016-11-30T22:16:19Zmagic wormholehttp://git-annex.branchable.com/devblog/day_431__p2p_linking/comment_1_1d5f809564c25e765f82594af8e174ab/anarcat2016-11-30T22:16:19Z2016-11-30T22:16:19Z
<blockquote><p>What I'd really like to have is an interface that displays a
one-time-use phrase of five to ten words, that can be read over the
phone or across the room. Exchange phrases with a friend, and get
your repositories securely linked together with tor.</p></blockquote>
<p>I already mentionned the project in <a href="http://git-annex.branchable.com/design/assistant/telehash/">telehash</a>,
but <a href="https://github.com/warner/magic-wormhole">magic-wormhole</a> does
exactly that:</p>
<pre><code>% wormhole send README.md
Sending 7924 byte file named 'README.md'
On the other computer, please run: wormhole receive
Wormhole code is: 7-crossover-clockwork
Sending (<-10.0.1.43:58988)..
100%|=========================| 7.92K/7.92K [00:00<00:00, 6.02MB/s]
File sent.. waiting for confirmation
Confirmation received. Transfer complete.
</code></pre>
<p>Receiver:</p>
<pre><code>% wormhole receive
Enter receive wormhole code: 7-crossover-clockwork
Receiving file (7924 bytes) into: README.md
ok? (y/n): y
Receiving (->tcp:10.0.1.43:58986)..
100%|===========================| 7.92K/7.92K [00:00<00:00, 120KB/s]
Received file written to README.md
</code></pre>
<p>While that example shows a file transfer, arbitrary data can be
transfered this way. There's a documented protocol, and it's not
completely peer-to-peer: there are relay servers to deal with NAT'd
machines. But the <a href="https://en.wikipedia.org/wiki/Password-authenticated_key_agreement">PAKE
protocol</a>
(basically SPAKE2) could be a good inspiration here.</p>
<p>Otherwise, I must say that, as a user, I don't mind copy-pasting a
hidden service string (if that's what it's about): i can do that over
a secure medium (email + OpenPGP or IM + OTR) easily... But I
understand it can be difficult to do for new users.</p>