diff options
author | irungentoo <irungentoo@gmail.com> | 2014-03-04 16:07:08 -0500 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2014-03-04 16:07:08 -0500 |
commit | ce6440c5a20b3eefe478636a10778206a3454fb8 (patch) | |
tree | 5240d28b5986a1ed09044b6dc6e353b583d8c090 /docs/Prevent_Tracking.txt | |
parent | b6fe49e59a39cb12334cbcad82b07a6247eb22d5 (diff) | |
parent | 81f748e4f8940ec0783b007136059ace4fecc937 (diff) |
Merge branch 'master' of https://github.com/irungentoo/ProjectTox-Core
Diffstat (limited to 'docs/Prevent_Tracking.txt')
-rw-r--r-- | docs/Prevent_Tracking.txt | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/docs/Prevent_Tracking.txt b/docs/Prevent_Tracking.txt index 07e8ae1e..c5f33e96 100644 --- a/docs/Prevent_Tracking.txt +++ b/docs/Prevent_Tracking.txt | |||
@@ -21,36 +21,36 @@ So, every node in the DHT now has a temporary keypair not related to their real | |||
21 | long term one. | 21 | long term one. |
22 | 22 | ||
23 | But, how do people find themselves then? We have to add a way for people to | 23 | But, how do people find themselves then? We have to add a way for people to |
24 | tell their friends what their DHT public key is, we also have to somehow make | 24 | tell their friends what their DHT public key is. We also have to somehow make |
25 | it so people can send/receive friend requests, this has to be done without non | 25 | it so people can send/receive friend requests. This has to be done without |
26 | friends being able to find out where a node is. | 26 | non-friends being able to find out where a node is. |
27 | 27 | ||
28 | The solution: Onion routing + enable the storage of some small amount of data | 28 | The solution: Onion routing + enable the storage of some small amount of data |
29 | on | 29 | on DHT nodes. |
30 | DHT nodes. | ||
31 | 30 | ||
32 | 31 | ||
33 | Alice and bob are friends, before joining the DHT they generate temporary | 32 | Alice and bob are friends. Before joining the DHT they generate temporary |
34 | session keypairs to be used for the DHT instead of their long term keys. | 33 | session keypairs to be used for the DHT instead of their long term keys. |
35 | 34 | ||
36 | Bob finds a bunch of random nodes then picks 3 random working ones (A, B, C). | 35 | Bob finds a bunch of random nodes then picks 3 random working ones (A, B, C). |
37 | 36 | ||
38 | Bob gets the know working node with an id closest to his real one from his list (D) | 37 | Bob gets the known working node with an id closest to his real one from his list (D) |
39 | 38 | ||
40 | Bob then creates an onion (the packet will go through A, B, C and will end up at D) | 39 | Bob then creates an onion (the packet will go through A, B, C and will end up at D) |
41 | announce request packet with his real public key, ping_id as zeros and | 40 | announce request packet with his real public key, ping_id as zeros and |
42 | searching for his real public key. | 41 | searching for his real public key. |
43 | 42 | ||
44 | Bob will announce response packets and will recursively send onion announce request packets | 43 | Bob will announce response packets and will recursively send onion announce request |
45 | to closer and closer nodes until he finds the ones closest to his real public key. | 44 | packets to closer and closer nodes until he finds the ones closest to his real public key. |
46 | 45 | ||
47 | Once he has done this, he will send some onion announce request packets with the right ping_id previously | 46 | Once he has done this, he will send some onion announce request packets with the right |
48 | received from the node when he queried it to announce himself to the node. | 47 | ping_id previously received from the node when he queried it to announce himself to the node. |
49 | 48 | ||
50 | The nodes he announces himself to keep the information to send onion packets to that node in memory. | 49 | The nodes he announces himself to keep the information to send onion packets to that node in |
50 | memory. | ||
51 | 51 | ||
52 | Alice meanwhile searches for the Nodes closest to Bobs real id using a temporary keypair and announce | 52 | Alice meanwhile searches for the nodes closest to Bobs real id using a temporary keypair and |
53 | request packets, she does this until she finds nodes that respond with a ping_id of zero. | 53 | announce request packets. She does this until she finds nodes that respond with a ping_id of zero. |
54 | 54 | ||
55 | She sends data to route request packet with information telling Bob her temporary id in the DHT | 55 | She sends data to route request packet with information telling Bob her temporary id in the DHT |
56 | (or a friend request if she is not friends with him). | 56 | (or a friend request if she is not friends with him). |
@@ -58,9 +58,9 @@ She sends data to route request packet with information telling Bob her temporar | |||
58 | Bob finds her by using her temporary id and they connect to each other. | 58 | Bob finds her by using her temporary id and they connect to each other. |
59 | 59 | ||
60 | 60 | ||
61 | NOTE: crypto_box is used for all the asymmetric encryption and crypto_secretbox is used for all the symmetric. | 61 | NOTE: crypto_box is used for all the asymmetric encryption and crypto_secretbox is used for all |
62 | Also every DHT node have a random symmetric key which they use to encrypt the stuff in normal get node request that is | 62 | the symmetric. Also every DHT node have a random symmetric key which they use to encrypt the stuff |
63 | used to encrypt stuff in the following. | 63 | in normal get node request that is used to encrypt stuff in the following. |
64 | 64 | ||
65 | Onion packet (request): | 65 | Onion packet (request): |
66 | 66 | ||
@@ -151,7 +151,7 @@ encrypted with temp symmetric key of Node A: [IP_Port (of us)][data to send back | |||
151 | 151 | ||
152 | Data packets: | 152 | Data packets: |
153 | 153 | ||
154 | To tell our friend what our DHT public key is so that he can connect to us we send a data packet with id 156 and | 154 | To tell our friend what our DHT public key is so that he can connect to us we send a data packet |
155 | the data being:[uint64_t (in network byte order) no_replay, the packet will only be accepted if this number is bigger than the last one recieved] | 155 | with id 156 and the data being:[uint64_t (in network byte order) no_replay, the packet will only be |
156 | [our dht public key][Node_Format * (maximum of 8) nodes closest to us so that the friend can find us faster] | 156 | accepted if this number is bigger than the last one recieved] [our dht public key][Node_Format * ( |
157 | 157 | maximum of 8) nodes closest to us so that the friend can find us faster] | |