summaryrefslogtreecommitdiff
path: root/docs/Prevent_Tracking.txt
diff options
context:
space:
mode:
Diffstat (limited to 'docs/Prevent_Tracking.txt')
-rw-r--r--docs/Prevent_Tracking.txt42
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
21long term one. 21long term one.
22 22
23But, how do people find themselves then? We have to add a way for people to 23But, how do people find themselves then? We have to add a way for people to
24tell their friends what their DHT public key is, we also have to somehow make 24tell their friends what their DHT public key is. We also have to somehow make
25it so people can send/receive friend requests, this has to be done without non 25it so people can send/receive friend requests. This has to be done without
26friends being able to find out where a node is. 26non-friends being able to find out where a node is.
27 27
28The solution: Onion routing + enable the storage of some small amount of data 28The solution: Onion routing + enable the storage of some small amount of data
29on 29on DHT nodes.
30DHT nodes.
31 30
32 31
33Alice and bob are friends, before joining the DHT they generate temporary 32Alice and bob are friends. Before joining the DHT they generate temporary
34session keypairs to be used for the DHT instead of their long term keys. 33session keypairs to be used for the DHT instead of their long term keys.
35 34
36Bob finds a bunch of random nodes then picks 3 random working ones (A, B, C). 35Bob finds a bunch of random nodes then picks 3 random working ones (A, B, C).
37 36
38Bob gets the know working node with an id closest to his real one from his list (D) 37Bob gets the known working node with an id closest to his real one from his list (D)
39 38
40Bob then creates an onion (the packet will go through A, B, C and will end up at D) 39Bob then creates an onion (the packet will go through A, B, C and will end up at D)
41announce request packet with his real public key, ping_id as zeros and 40announce request packet with his real public key, ping_id as zeros and
42searching for his real public key. 41searching for his real public key.
43 42
44Bob will announce response packets and will recursively send onion announce request packets 43Bob will announce response packets and will recursively send onion announce request
45to closer and closer nodes until he finds the ones closest to his real public key. 44packets to closer and closer nodes until he finds the ones closest to his real public key.
46 45
47Once he has done this, he will send some onion announce request packets with the right ping_id previously 46Once he has done this, he will send some onion announce request packets with the right
48received from the node when he queried it to announce himself to the node. 47ping_id previously received from the node when he queried it to announce himself to the node.
49 48
50The nodes he announces himself to keep the information to send onion packets to that node in memory. 49The nodes he announces himself to keep the information to send onion packets to that node in
50memory.
51 51
52Alice meanwhile searches for the Nodes closest to Bobs real id using a temporary keypair and announce 52Alice meanwhile searches for the nodes closest to Bobs real id using a temporary keypair and
53request packets, she does this until she finds nodes that respond with a ping_id of zero. 53announce request packets. She does this until she finds nodes that respond with a ping_id of zero.
54 54
55She sends data to route request packet with information telling Bob her temporary id in the DHT 55She 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
58Bob finds her by using her temporary id and they connect to each other. 58Bob finds her by using her temporary id and they connect to each other.
59 59
60 60
61NOTE: crypto_box is used for all the asymmetric encryption and crypto_secretbox is used for all the symmetric. 61NOTE: crypto_box is used for all the asymmetric encryption and crypto_secretbox is used for all
62Also every DHT node have a random symmetric key which they use to encrypt the stuff in normal get node request that is 62the symmetric. Also every DHT node have a random symmetric key which they use to encrypt the stuff
63used to encrypt stuff in the following. 63in normal get node request that is used to encrypt stuff in the following.
64 64
65Onion packet (request): 65Onion 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
152Data packets: 152Data packets:
153 153
154To 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 154To tell our friend what our DHT public key is so that he can connect to us we send a data packet
155the 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] 155with 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] 156accepted if this number is bigger than the last one recieved] [our dht public key][Node_Format * (
157 157maximum of 8) nodes closest to us so that the friend can find us faster]