summaryrefslogtreecommitdiff
path: root/docs/Tox_middle_level_network_protocol.txt
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2014-04-22 20:28:40 -0400
committerirungentoo <irungentoo@gmail.com>2014-04-22 20:28:40 -0400
commit1bfe15ee88844bdbd43052b4026202cf924ad6ca (patch)
treea740f16199cf0a263447e2084dd8906028a7b268 /docs/Tox_middle_level_network_protocol.txt
parentc46ab5821d0fa8c604de52e15009e2b8da5d9c07 (diff)
Decided pretty much how the handshake would work.
Started writing the code. Astyled some files.
Diffstat (limited to 'docs/Tox_middle_level_network_protocol.txt')
-rw-r--r--docs/Tox_middle_level_network_protocol.txt24
1 files changed, 23 insertions, 1 deletions
diff --git a/docs/Tox_middle_level_network_protocol.txt b/docs/Tox_middle_level_network_protocol.txt
index ae0fd0f6..be8253cd 100644
--- a/docs/Tox_middle_level_network_protocol.txt
+++ b/docs/Tox_middle_level_network_protocol.txt
@@ -38,4 +38,26 @@ from evil "friends" framing relays must also be implemented.
38 38
39Detailed implementation details: 39Detailed implementation details:
40 40
41Coming soon. 41cookie request packet:
42[uint8_t 24][Senders DHT Public key (32 bytes)][Random nonce (24
43bytes)][Encrypted message containing: [Senders real public key (32
44bytes)][Recievers real public key (32 bytes)]]
45Encrypted message is encrypted with sender DHT private key, recievers DHT public
46key and the nonce.
47
48cookie response packet:
49[uint8_t 25][Random nonce (24 bytes)][Encrypted message containing: [Cookie]]
50Encrypted message is encrypted with sender DHT private key, recievers DHT public
51key and the nonce.
52
53The Cookie should be basically:
54[nonce][encrypted data:[uint64_t time][Senders real public key (32
55bytes)][Recievers real public key (32 bytes)]]
56
57Handshake packet:
58[uint8_t 26][Cookie][nonce][Encrypted message containing: [random 24 bytes base
59nonce][session public key of the peer (32 bytes)]]
60
61The handshake packet is encrypted using the real private key of the sender, the
62real private key of the reciever and the nonce.
63