The first attack, known as a traffic confirmation attack, works when the adversary controls or observes relays on both ends of a Tor circuit and compares traffic timing, volume, or other characteristics to discover pairs of relays on the same circuit.