As I understand it, TOR uses encrypted layers each of which tells the node where to send the partially unwrapped message on to.
So, if I encrypt something to, say, three layers and sent it to some TOR nodes:
1-2-3
1 knows it came from me and knows to send it to 2
2 knows it came from 1 and to send it to 3
3 knows it came from 2 and to send it to wherever
No one point on the system, IIRC, is meant to have the information necessary to compromise the entire chain. Though, if you could compromise a sizeable portion of the network, you'd be in with a significant chance of compromising any given message - which I find hard to believe that the government hasn't done.
So, if I encrypt something to, say, three layers and sent it to some TOR nodes:
1-2-3
1 knows it came from me and knows to send it to 2
2 knows it came from 1 and to send it to 3
3 knows it came from 2 and to send it to wherever
No one point on the system, IIRC, is meant to have the information necessary to compromise the entire chain. Though, if you could compromise a sizeable portion of the network, you'd be in with a significant chance of compromising any given message - which I find hard to believe that the government hasn't done.