Menu

1 / 5

ptransfer: send files between two computers with a short code phrase

DEV Community: go·Abdeldjalil Chougui·5 days ago
#Y68bW84O
#devtogo#devto#dev#relay#code
Long article (1296 words) — no AI summary yet.
Reading 0:00
15s threshold

Moving a file from one computer to another should be simple, and it rarely is. Email has size limits. Cloud storage needs an account on both sides and leaves a copy on someone else's server. scp needs SSH set up and a reachable address. A USB stick needs the two machines in the same room.

Tools like croc and Magic Wormhole showed a nicer way: the sender gets a short code, the receiver types it, and the files arrive encrypted. ptransfer is a small Go tool in that style. The sender gets a code like 4821-lamp-gold-lake , the receiver types it, and the files arrive encrypted end to end, through a relay or directly over the LAN when that is possible. You can run the relay yourself.

What it does

One code, no accounts. The code is a number plus three words from a 256-word list. The number only picks a room on the relay, and the relay sees a hash of it, not the number itself. The whole phrase is the password for a PAKE (password-authenticated key exchange).…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.