summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/Group-Chats.md8
-rw-r--r--docs/Prevent_Tracking.txt5
-rw-r--r--docs/TCP_Network.txt4
-rw-r--r--docs/av_api.md2
-rw-r--r--docs/updates/Crypto.md2
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.
21Get nodes (Request): 21Get nodes (Request):
22Packet contents: 22Packet 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```
26Valid replies: a send_nodes packet 26Valid replies: a send_nodes packet
27 27
28Send_nodes (response): 28Send_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
33Broadcast packet: 33Broadcast 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
7065 - action (/me) 7065 - 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
112The data in the previous packet is in format: [real public key of sender] 112The data in the previous packet is in format: [real public key of sender]
113encrypted 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)]] 113encrypted with real private key of the sender, the nonce in the data packet and
114the real public key of the receiver:[[uint8_t id][data (optional)]]
114 115
115Data sent to us: 116Data sent to us:
116announce response packet: 117announce response packet:
@@ -153,5 +154,5 @@ Data packets:
153 154
154To tell our friend what our DHT public key is so that he can connect to us we send a data packet 155To tell our friend what our DHT public key is so that he can connect to us we send a data packet
155with id 156 and the data being:[uint64_t (in network byte order) no_replay, the packet will only be 156with id 156 and the data being:[uint64_t (in network byte order) no_replay, the packet will only be
156accepted if this number is bigger than the last one recieved] [our dht public key][Node_Format * ( 157accepted if this number is bigger than the last one received] [our dht public key][Node_Format * (
157maximum of 8) nodes closest to us so that the friend can find us faster] 158maximum 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
81client sent the server the public key and the public key we sent to the client, 81client sent the server the public key and the public key we sent to the client,
82the next with base nonce + 1...) 82the next with base nonce + 1...)
83 83
84The connection is set to an unconfirmed state until a packet is recieved and 84The connection is set to an unconfirmed state until a packet is received and
85decrypted correctly using the information in the handshake. 85decrypted correctly using the information in the handshake.
86 86
87each packet sent to/from the server has an id (the first byte of the plain text 87each 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
136Ping responses must have the same ping_id as the request. 136Ping responses must have the same ping_id as the request.
137 137
138If the server recieves a ping packet he must respond with a ping response. 138If the server receives a ping packet he must respond with a ping response.
139 139
140The server will send a ping packet to clients every 30 seconds, they have 30 140The server will send a ping packet to clients every 30 seconds, they have 30
141seconds to respond, if they don't the connection is deleted. 141seconds 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
36How to handle msi session: 36How to handle msi session:
37Controling is done via callbacks and action handlers. 37Controlling is done via callbacks and action handlers.
38First register callbacks for every state/action received and make sure 38First register callbacks for every state/action received and make sure
39NOT TO PLACE SOMETHING LIKE LOOPS THAT TAKES A LOT OF TIME TO EXECUTE; every callback is being called 39NOT TO PLACE SOMETHING LIKE LOOPS THAT TAKES A LOT OF TIME TO EXECUTE; every callback is being called
40directly from event loop. You can find examples in phone.c. 40directly 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
75The 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. 75The 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
77Each node can route the request to the reciever if they are connected to him. This is to bypass bad NATs. 77Each node can route the request to the receiver if they are connected to him. This is to bypass bad NATs.