Magic Wormhole
This article relies largely or entirely on a single source. (April 2025) |
| Communication protocol | |
| Purpose | File transfer |
|---|---|
| Developer(s) | Brian Warner |
| Introduced | 2015 |
| OSI layer | Application layer |
Magic Wormhole is a protocol that facilitates peer-to-peer file transfer over the Internet. This makes it unlike other file transfer protocols, such as FTP or HTTP, as it does not require a central hosting server and is solely between two clients; however, it does require a rendezvous server to negotiate the connection.
Transferring a file
The sender uses a client to send the file. This generates a code consisting of a number and two or more words, which the receiver then enters into their wormhole client to receive the file. The receiver has only one chance to receive the file. If the code is entered incorrectly, the sender must generate a new code and send it again. Once the file is received, it can not be received again by someone else unless the sender sends it again by generating a new code.
Technical details
Magic Wormhole uses two servers, the mailbox server and the transit relay. The mailbox server allows the sender and receiver to find each others' IP addresses and agree on a code. The sender and receiver will then try to contact each other directly to send the file. If this is not possible, for example due to a firewall or NAT, they will use the relay server, which receives the file from the sender and transmits it to the receiver. Magic Wormhole uses encryption based on Password-authenticated key agreement (PAKE) for security. Due to the PAKE encryption, the sender and receiver do not need to trust the mailbox or relay servers. Magic Wormhole can also operate over Tor to hide the IP addresses of the sender and receiver from each other and from the mailbox and relay servers.[1]
Implementations
The original implementation is written in Python. The protocol has also been implemented in Rust, Go, and Haskell[[Category:Articles with unsourced statements from August 2025} ware]][citation needed] Rymdport, formerly named wormhole-gui,[2] is a free, cross-platform and open-source program used for transferring files, directories and plain text.[3] It implements the magic-wormhole protocol in a compiled native Go wrapper.[4] It supports Windows, macOS and Linux.[4]
References
- ↑ Warner, Brian. "Protocol/API/Library Introduction". https://magic-wormhole.readthedocs.io/en/latest/introduction.html#the-magic-wormhole-protocol.
- ↑ "Releases · Jacalz/rymdport" (in en). https://github.com/Jacalz/rymdport/releases?page=3.
- ↑ "Rymdport". https://pocketmags.com/ca/linux-format-magazine/december-2022/articles/1222163/rymdport?srsltid=AfmBOooOJB88-kMxDwLPVelZDSbySv6s2yJhBQcb2P5sw-4IR3SGsX3w.
- ↑ 4.0 4.1 "Linux Magazine Usa Special Editions Cool Linux Hacks 2024" (in en). https://www.calameo.com/read/0076741596095bf15cb3c.
External links
- on GitHub (A Graphical Implementation of Magic Wormhole)
