Day 1 - Onion routing

Onion Routing

Onion routing is a method of transferring a message through computer networks anonymously. The anonymity is done by encapsulating the message by layers of encryptions, just like layers on onion. To decrypt the onion message, the sender pick a series of nodes to route the onion. This series of nodes is called a chain, the first node is called entry node and the last node is called exit node.
When the sender send the onion message to the entry node, the entry node will only decrypt the onion message, pealing off the first layer of encryption to reveal the next destination. It will not know whether the previous node is actually the sender, or just one of the node in the chain, therefore it would not be able to know where the location of sender, but only the location for the next node. After the first layer of node had been decrypted, the onion message will send to the second node in the chain to decrypt, and send to the third node in the chain... until the exit node, which reveal the message. The message will then send to the receiver by the exit node.

Disadvantages 

Even this technique of encryption will increase the anonymity of the sender, hiding the origin of the sender, some ISP can trace and log the connection between two computers/node. The information such as the time the connection occur and the amount of data sent can be seen by ISP. For example, sender send an onion message on 0 seconds and the size is 50 kilobytes. ISP will log the connection between the sender and the entry node. Then, the entry node receives, decrypt and send the message with the size exactly 50 kilobytes to the next node. A few second later, the node received the exact same 50 kilobytes of the file... By this, ISP can determine the connection from entry node to exit node.

Secondly, the exit node can be compromised to see the raw message. The job of the exit node is to reveal the last encryption and send the raw message to the receiver. Therefore, the exit node could be compromised and crackers can extract the raw message from it, possibly containing passwords, personal identity and bank accounts.

This article is referred from Wikipedia's Onion routing article.