Sending a File in 2025

January 23, 2025

Collaboratively written with Shae Erisson while teaching him about Magic Wormhole.

We want to send a file to our friend.

Simple diagram of sending a file to a peer

Many people will reach for GMail; this will work, but has a few issues:

So we made the requirements a bit more complex: we want to privately send a file to our friend.

Being professional computer-touchers, we reach for Python! We can run a Web server (python3 -m http.server) and put “kittens.jpeg” on it!

This has different issues:

We’re security conscious people, so we could use Let’s Encrypt and get a TLS certificate! And a public server! This is rapidly becoming “real work”, and doesn’t even solve one of the above problems – we’d need to add “authorization” and “authentication” too.

Whew

Okay, so although we could do all that, hours of dev-ops is not what we wanted to do – we wanted to “send kittens.jpeg to our friend”.

There IS a Better Way

Magic Wormhole does just what we want: I can run wormhole send kittens.jpeg which produces a magic “code” like “1-foo-bar”.

My friend runs wormhole receive 1-foo-bar.

The file is transferred!

However, we claimed we are professional computer touchers and security conscious – how does Magic Wormhole solve all our problems above?

Let’s look a little deeper.

Attachments Have Limits

Magic Wormhole uses a direct connection to the peer, so the only limits are your network bandwidth, disk space, and patience.

Google Can’t See kittens.jpeg

Since we have a direct connection to our peer, email providers do not get a chance to do whatever they like with kittens.jpeg – train their AI, sell advertising, etc.

The connection is also “end to end encrypted”, which means that even if a hoodie-clad coffee shop patron is nearby, they also cannot see kittens.jpeg.

We’re On A Different Network

There are many network conditions that make it really hard to connect directly to a peer. In very restricted networks, you might only be able to make “outgoing” connections. Even in these “worst case” scenarios, Magic Wormhole will use an intermediate server to allow our computers to connect.

This intermediate server cannot see kittens.jpeg because all traffic is “end to end encrypted”.

Only Our Friend Gets kittens.jpeg

Magic Wormhole features single-use codes: once created, a code may only be consumed once, ever. This means we can be sure that only one other person gets kittens.jpeg.

That means that when we send kittens.jpeg, we cause a magic code to be created. We then communicate this code to our friend, and they consume the code.

After this, the code is useless: nobody else can use it, and the file will only ever be sent a single time.

Wrapping Up

Since you made it this far, and we like you, here is kittens.jpeg (recently seen on my timeline on Mastodon):

Some very cute young cats cuddling

The “Magic Wormhole” tool lets me send a picture – or any other kind of file! – easily and securely.

Even if you have the skills to do this some other way, Magic Wormhole provides good answers for our requirements.

We haven’t delved into the technical details or math (cryptography) behind any of this; fellow computer-touchers will want to know more!

Coming soon™ are two additional blog posts that describe the technical details of all of the above high-level features.

Stay tuned!

Comments may be made on Mastodon.