diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/Group-Chats.md | 8 | ||||
-rw-r--r-- | docs/Prevent_Tracking.txt | 5 | ||||
-rw-r--r-- | docs/TCP_Network.txt | 4 | ||||
-rw-r--r-- | docs/av_api.md | 2 | ||||
-rw-r--r-- | docs/updates/Crypto.md | 2 |
5 files changed, 11 insertions, 10 deletions
diff --git a/docs/Group-Chats.md b/docs/Group-Chats.md index e318613d..5e00b550 100644 --- a/docs/Group-Chats.md +++ b/docs/Group-Chats.md | |||
@@ -21,18 +21,18 @@ See DHT, currently uses the IPv6 Node_format. | |||
21 | Get nodes (Request): | 21 | Get nodes (Request): |
22 | Packet contents: | 22 | Packet contents: |
23 | ``` | 23 | ``` |
24 | [char with a value of 48][Bob's (The reciever's) Public key (client_id) (32 bytes))][Alice's (The sender's) Public key (client_id) (32 bytes)][Random nonce (24 bytes)][Encrypted with the nonce, private key of the sender and public key of the reciever:[char with a value of 48][random 8 byte (ping_id)] | 24 | [char with a value of 48][Bob's (The receiver's) Public key (client_id) (32 bytes))][Alice's (The sender's) Public key (client_id) (32 bytes)][Random nonce (24 bytes)][Encrypted with the nonce, private key of the sender and public key of the receiver:[char with a value of 48][random 8 byte (ping_id)] |
25 | ``` | 25 | ``` |
26 | Valid replies: a send_nodes packet | 26 | Valid replies: a send_nodes packet |
27 | 27 | ||
28 | Send_nodes (response): | 28 | Send_nodes (response): |
29 | ``` | 29 | ``` |
30 | [char with a value of 48][Bob's (The reciever's) Public key (client_id) (32 bytes))][Alice's (The sender's) Public key (client_id) (32 bytes)][Random nonce (24 bytes)][Encrypted with the nonce, private key of the sender and public key of the reciever:[char with a value of 49][random 8 byte (ping_id)][Nodes in node format, length=40 * (number of nodes (maximum of 6 nodes)) bytes]] | 30 | [char with a value of 48][Bob's (The receiver's) Public key (client_id) (32 bytes))][Alice's (The sender's) Public key (client_id) (32 bytes)][Random nonce (24 bytes)][Encrypted with the nonce, private key of the sender and public key of the receiver:[char with a value of 49][random 8 byte (ping_id)][Nodes in node format, length=40 * (number of nodes (maximum of 6 nodes)) bytes]] |
31 | ``` | 31 | ``` |
32 | 32 | ||
33 | Broadcast packet: | 33 | Broadcast packet: |
34 | ``` | 34 | ``` |
35 | [char with a value of 48][Bob's (The reciever's) Public key (client_id) (32 bytes))][Alice's (The sender's) Public key (client_id) (32 bytes)][nonce][Encrypted with the nonce, private key of the sender and public key of the reciever:[char with a value of 50][Data to send to everyone]] | 35 | [char with a value of 48][Bob's (The receiver's) Public key (client_id) (32 bytes))][Alice's (The sender's) Public key (client_id) (32 bytes)][nonce][Encrypted with the nonce, private key of the sender and public key of the receiver:[char with a value of 50][Data to send to everyone]] |
36 | ``` | 36 | ``` |
37 | 37 | ||
38 | 38 | ||
@@ -68,4 +68,4 @@ Ban a peer | |||
68 | [uint8_t message[messagelen]] | 68 | [uint8_t message[messagelen]] |
69 | 69 | ||
70 | 65 - action (/me) | 70 | 65 - action (/me) |
71 | [uint8_t message[messagelen]] \ No newline at end of file | 71 | [uint8_t message[messagelen]] |
diff --git a/docs/Prevent_Tracking.txt b/docs/Prevent_Tracking.txt index c5f33e96..d170103f 100644 --- a/docs/Prevent_Tracking.txt +++ b/docs/Prevent_Tracking.txt | |||
@@ -110,7 +110,8 @@ encrypted with that temporary private key and the nonce and the public key from | |||
110 | (if Node D contains the ret data for the node, it sends the stuff in this packet as a data to route response packet to the right node) | 110 | (if Node D contains the ret data for the node, it sends the stuff in this packet as a data to route response packet to the right node) |
111 | 111 | ||
112 | The data in the previous packet is in format: [real public key of sender] | 112 | The data in the previous packet is in format: [real public key of sender] |
113 | encrypted with real private key of the sender, the nonce in the data packet and the real public key of the reciever:[[uint8_t id][data (optional)]] | 113 | encrypted with real private key of the sender, the nonce in the data packet and |
114 | the real public key of the receiver:[[uint8_t id][data (optional)]] | ||
114 | 115 | ||
115 | Data sent to us: | 116 | Data sent to us: |
116 | announce response packet: | 117 | announce response packet: |
@@ -153,5 +154,5 @@ Data packets: | |||
153 | 154 | ||
154 | To tell our friend what our DHT public key is so that he can connect to us we send a data packet | 155 | To tell our friend what our DHT public key is so that he can connect to us we send a data packet |
155 | with id 156 and the data being:[uint64_t (in network byte order) no_replay, the packet will only be | 156 | with id 156 and the data being:[uint64_t (in network byte order) no_replay, the packet will only be |
156 | accepted if this number is bigger than the last one recieved] [our dht public key][Node_Format * ( | 157 | accepted if this number is bigger than the last one received] [our dht public key][Node_Format * ( |
157 | maximum of 8) nodes closest to us so that the friend can find us faster] | 158 | maximum of 8) nodes closest to us so that the friend can find us faster] |
diff --git a/docs/TCP_Network.txt b/docs/TCP_Network.txt index 775ccc88..9841329c 100644 --- a/docs/TCP_Network.txt +++ b/docs/TCP_Network.txt | |||
@@ -81,7 +81,7 @@ received | |||
81 | client sent the server the public key and the public key we sent to the client, | 81 | client sent the server the public key and the public key we sent to the client, |
82 | the next with base nonce + 1...) | 82 | the next with base nonce + 1...) |
83 | 83 | ||
84 | The connection is set to an unconfirmed state until a packet is recieved and | 84 | The connection is set to an unconfirmed state until a packet is received and |
85 | decrypted correctly using the information in the handshake. | 85 | decrypted correctly using the information in the handshake. |
86 | 86 | ||
87 | each packet sent to/from the server has an id (the first byte of the plain text | 87 | each packet sent to/from the server has an id (the first byte of the plain text |
@@ -135,7 +135,7 @@ responses must be sent to the proper client. | |||
135 | 135 | ||
136 | Ping responses must have the same ping_id as the request. | 136 | Ping responses must have the same ping_id as the request. |
137 | 137 | ||
138 | If the server recieves a ping packet he must respond with a ping response. | 138 | If the server receives a ping packet he must respond with a ping response. |
139 | 139 | ||
140 | The server will send a ping packet to clients every 30 seconds, they have 30 | 140 | The server will send a ping packet to clients every 30 seconds, they have 30 |
141 | seconds to respond, if they don't the connection is deleted. | 141 | seconds to respond, if they don't the connection is deleted. |
diff --git a/docs/av_api.md b/docs/av_api.md index 17930144..2f536ade 100644 --- a/docs/av_api.md +++ b/docs/av_api.md | |||
@@ -34,7 +34,7 @@ msi_session_t* - pointer to a newly created msi session handler. | |||
34 | ###msi_session_t reference: | 34 | ###msi_session_t reference: |
35 | 35 | ||
36 | How to handle msi session: | 36 | How to handle msi session: |
37 | Controling is done via callbacks and action handlers. | 37 | Controlling is done via callbacks and action handlers. |
38 | First register callbacks for every state/action received and make sure | 38 | First register callbacks for every state/action received and make sure |
39 | NOT TO PLACE SOMETHING LIKE LOOPS THAT TAKES A LOT OF TIME TO EXECUTE; every callback is being called | 39 | NOT TO PLACE SOMETHING LIKE LOOPS THAT TAKES A LOT OF TIME TO EXECUTE; every callback is being called |
40 | directly from event loop. You can find examples in phone.c. | 40 | directly from event loop. You can find examples in phone.c. |
diff --git a/docs/updates/Crypto.md b/docs/updates/Crypto.md index a6c701d3..939c15e2 100644 --- a/docs/updates/Crypto.md +++ b/docs/updates/Crypto.md | |||
@@ -74,4 +74,4 @@ Crypto request packets | |||
74 | 74 | ||
75 | The encrypted message is encrypted with crypto_box() (using Bobs public key, Alice's private key and the nonce (randomly generated 24 bytes)) and is a message from Alice in which she tells Bob who she is. | 75 | The encrypted message is encrypted with crypto_box() (using Bobs public key, Alice's private key and the nonce (randomly generated 24 bytes)) and is a message from Alice in which she tells Bob who she is. |
76 | 76 | ||
77 | Each node can route the request to the reciever if they are connected to him. This is to bypass bad NATs. | 77 | Each node can route the request to the receiver if they are connected to him. This is to bypass bad NATs. |