The project is to implement 2 peers (Alice and Bob) and a set of intermediary relays (R1, R2, R3, etc...) and a more easy approach of ToR-like protocol between them. The messages flowing from Alice to Bob will make use of these relays in a random way and will cipher the communication in order to provide content protection and anonymity. The programming language should be python (version3).
The project is divided in 4 steps :
1. implement the relays
2. randomize the routing
3. secure the communications on each link by building a shallot
4. relaying the messages
Alice reads from a file the topology of the network and after she will negotiate a symetric key with each node. This is done by using the Diffie-Helman [url removed, login to view] alice sends a message through the network using dijkstra algorithm and when the message arrived to the relay of the path, the following steps is performed to build the shallot:
1. The current shallot becomes the payload of this message.
2. The next hop and the key ID are added to the header of the message.
3. The new message is encrypted using the AES algorithm and the key negotiated by Alice and R.
4. These steps are repeated for each relay in the reverse path.
Note that if the next hop is the host itself, it means that the message has reached its destination..