Jump to content

Wormhole (protocol)

From Wikipedia, the free encyclopedia
Wormhole
Communication protocol
PurposeFile transfer
Developer(s)Brian Warner
Introduction2015; 10 years ago (2015)
OSI layerApplication layer

Wormhole, or Magic Wormhole, is a protocol for transferring files from one device to another over the internet.[1] It is used for one-time transfers of files, unlike other protocols such as FTP which serve multiple files to multiple users. The sender uses a wormhole 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. Wormhole uses encryption based on Password-authenticated key agreement (PAKE) for security.

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. Due to the PAKE encryption, the sender and receiver do not need to trust the mailbox or relay servers. 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.

Implementations

[edit]

The original implementation, known as Magic Wormhole, is written in Python. The protocol has also been implemented in Rust, Go, and Haskell. The file transfer application Rymdport is based on the Wormhole protocol.

References

[edit]
  1. ^ Warner, Brian. "Protocol/API/Library Introduction". readthedocs.io. Retrieved 8 April 2025.