]> Cypherpunks.ru repositories - govpn.git/blob - doc/handshake.txt
Replace handshake NULLs with an IDtag
[govpn.git] / doc / handshake.txt
1 @startuml
2 participant Client
3 participant Server
4
5 Client -> Client : R=rand(64bit)
6 Client -> Client : CPrivKey=rand(256bit)
7 Client -> Server : R, enc(PSK, R, CPubKey)
8 Server -> Server : SPrivKey=rand(256bit)
9 Server -> Server : K=DH(SPrivKey, CPubKey)
10 Server -> Server : RS=rand(64bit)
11 Server -> Server : SS=rand(256bit)
12 Server -> Client : enc(PSK, R+1, SPubKey); enc(K, R, RS+SS)
13 Client -> Client : K=DH(CPrivKey, SPubKey)
14 Client -> Client : RC=rand(64bit); SC=rand(256bit)
15 Client -> Server : enc(K, R+1, RS+RC+SC)
16 Server -> Server : compare(RS)
17 Server -> Server : MasterKey=SS XOR SC
18 Server -> Client : enc(K, 0x00, RC)
19 Client -> Client : compare(RC)
20 Client -> Client : MasterKey=SS XOR SC
21 @enduml