How does Tor guarantee anonymity of Tor network?

It doesn't guarantee anonymity if enough of the network is controlled by a single adversary. There's no general way you can do so; if your whole connection goes entirely through adversary-run computers, your adversary is going to be able to track it, no matter what system you're using.

What Tor does is make it really, really, really hard for an adversary to control enough of the network to make this happen. It passes each connection through multiple nodes, so you have to control enough nodes that not just one but at least three nodes selected from the list are yours (in specific cases, it may use more than three). The reason Tor works is that with a single Tor network, you have lots and lots of people running Tor servers; an adversary has to compete with tons of legitimate nodes. It's the same basic idea as Bitcoin - make it so an attacker inherently has to compete with legitimate users, and then the bigger the system gets the harder it is to attack.

Tags:

Anonymity

Tor