summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/Crypto.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/docs/Crypto.txt b/docs/Crypto.txt
index 3abfe82e..0f7d42da 100644
--- a/docs/Crypto.txt
+++ b/docs/Crypto.txt
@@ -40,11 +40,12 @@ only crypto_box() is used for encryption and only crypto_box_open() for decrypti
40 40
41Connecting to an already added friend: 41Connecting to an already added friend:
42 Alice and Bob are friends. 42 Alice and Bob are friends.
43 As soon as they connect they each send themselves the following packet (encrypted part encrypted with the public nonce in the packet 43 As soon as they connect they each send themselves the following packet (the crypto handshake) (encrypted part encrypted with the public nonce in the packet
44 the public key of the receiver and private key of the sender) 44 the public key of the receiver and private key of the sender)
45 [char with a value of 02][Random nonce (24 bytes)][Encrypted message containing a random 24 bytes base nonce] 45 [char with a value of 02][Senders Public key (client_id) (32 bytes)][Random nonce (24 bytes)][Encrypted message containing a random 24 bytes base nonce]
46 If the packet is decrypted successfully: 46 If the packet is decrypted successfully:
47 Each start using the secret nonce provided by the other to encrypt data packets (adding to it + 1 for each packet.) 47 Each start using the secret nonce provided by the other to encrypt data packets (adding to it + 1 for each packet.)
48 Each node sends themselves an empty data packet (data packet with 4 encrypted zero bytes)
48 Data packet: 49 Data packet:
49 [char with a value of 03][Encrypted data] 50 [char with a value of 03][Encrypted data]
50 Each data packet received it is decrypted using the secret nonce sent to the other(with +1 added for the first packet +2 for the second, etc...) 51 Each data packet received it is decrypted using the secret nonce sent to the other(with +1 added for the first packet +2 for the second, etc...)