snow: How It Works

How It Works

This is the TL;DR version. For the full technical details you can always read the code.

The gibberish you see in front of ".key" is the hash of your machine's public key. You use snow (or sdns) as your name resolver and it answers a query for a .key name by assigning an address from a pool to that key. Your computer sends packets to that block of addresses to the snow daemon using a TUN/TAP virtual network interface. Snow forwards the packets to the machine with the associated key. Each machine translates the addresses to the ones it assigned for the other.

This illustrates the basic idea:

snow

The transport snow uses is completely independent of the one used by your applications. The addresses visible to your applications stay the same even if your IP address or the remote IP address (or address family or transport protocol) changes. All the traffic is transparently secured using the public keys, currently with datagram TLS.

Not shown above is how snow maps keys to unknown "real" IP addresses. The general idea is to have some other machine(s) relay the information and then verify with the public key. This conveniently allows snow to do automatic NAT traversal by using the same relay to coordinate UDP hole punch.

The current relay implementation uses an overlay network with DHT-style routing. This has the advantage of being completely decentralized at the cost of having to rely on potentially unreliable third parties. In the works are an improved overlay routing method that should provide better performance and more resistance to denial of service, and the option to specify a preferred known-reliable relay.

All of this is transparent to the applications. They look up a name, they send packets to the address, the packets go to the other machine. The application on the other machine responds to the address the packets came from and the response goes back to the first machine. So you can ping a machine behind a NAT from a machine behind a different NAT using the ping that is already on your machine.

[snow] [How it works] [How to use it] [How to install it] [Advanced Configuration] [App Development] [Read the FAQ]