- mDNS/DNS-SD discoverability: discover peers on the network who are ready to receive files
- AES256 encryption with ephemeral keys: so nobody snooping can see the file
- Resume transfers in case the connection breaks or to transfer over multiple sessions
go get github.com/aduong/p2p-ft
On the receiving side
p2p-ft receive adrian
On the sending side
p2p-ft send adrian ~/archive.tar.gz
Receiver
Sender
A 256-bit key is created per file transfer for use with AES in CTR mode (fixed IV). This key is meant to be transmitted via some other secure channel to the receiver. All other information including the file name, file size, and SHA256 hash of the file are transmitted in plain text. This means that the integrity of the file is not guaranteed. The SHA256 hash should be transmitted via a separate secure channel as well.