Live data from Hacker News

Magic-Wormhole – Get things from one computer to another, safely

github.com

41–50 of 192 posts

Re: Magic-Wormhole – Get things from one computer to another, safely

#41

The security model here is pretty great assuming you trust the rendezvous server. Maybe consider an optional challenge/response prompt (like when your pal enters the prompt code, their client generates a second code that they give back to you) to make sure nobody's intercepted the request before them, odds aside (if someone got your initial code somehow, they could definitely man in the middle the request otherwise).

If I did things right, the rendezvous server shouldn't get any advantage over a network attacker: one guess per invocation of the program, 1-out-of-65536 chance of getting it right, 65535-out-of-65536 chance of giving you a WrongPasswordError. FWIW, there's also a --verify option, which causes the program to print out a hex hash of the session key, and wait for you to approve it before sending anything. Not as ergono…

Does the session key hash help if the attacker guessed the code correctly?

Re: Magic-Wormhole – Get things from one computer to another, safely

#46
post #37
post #12

Earlier quoted context omitted.

Any attacker only gets a single guess

What if there are 65535 active send requests? Perhaps of which 65534 are opened by an attacker?

The attacker still just gets 1 guess per wormhole / send request. Each send-request / wormhole is its own separate thing.

Re: Magic-Wormhole – Get things from one computer to another, safely

#47

Cool. Does the data transit the server, or does it do NAT / UPNP type stuff for direct comms after the initial rendezvous?

The two sides exchange IP addresses (inside the encrypted channel), and try to connect to all of them. If that fails to produce a successful handshake, they fall back to a "Transit Relay Server" that I run. So they'll manage a direct connection if one of the machines has a public IP address, or if they're both on the same LAN.

I'm hoping to add NAT/UPnP support, but it's not there yet.. still looking for an easy library with Python support.

Re: Magic-Wormhole – Get things from one computer to another, safely

#49

Earlier quoted context omitted.

If I did things right, the rendezvous server shouldn't get any advantage over a network attacker: one guess per invocation of the program, 1-out-of-65536 chance of getting it right, 65535-out-of-65536 chance of giving you a WrongPasswordError. FWIW, there's also a --verify option, which causes the program to print out a hex hash of the session key, and wait for you to approve it before sending anything. Not as ergono…

Does the session key hash help if the attacker guessed the code correctly?

Yup, it still does. In the face of a lucky-guessing attacker, PAKE basically degenerates down into plain unauthenticated Diffie-Hellman, which means Alice-Mallory has one key, and Mallory-Bob has a different key. Mallory could decrypt the messages from Alice and then reencrypt them for Bob, but Alice and Bob will still both see different keys. If they have some out-of-band means to compare those keys (which Mallory can't corrupt), then they can detect the attack.
Post reply on HN