]> Cypherpunks.ru repositories - govpn.git/blob - doc/handshake.txt
9a3bef5a07cbfe77749b360c3758ba8200378b86
[govpn.git] / doc / handshake.txt
1 @startuml
2 hide footbox
3 participant Client
4 participant Server
5
6 Client -> Client : R=rand(64bit)
7 Client -> Client : CDHPriv=rand(256bit)
8 Client -> Server : R, enc(H(DSAPub), R, El(CDHPub))
9 Server -> Server : SDHPriv=rand(256bit)
10 Server -> Server : K=H(DH(SDHPriv, CDHPub))
11 Server -> Server : RS=rand(64bit)
12 Server -> Server : SS=rand(256bit)
13 Server -> Client : enc(H(DSAPub), R+1, El(SDHPub)); enc(K, R, RS+SS)
14 Client -> Client : K=H(DH(CDHPriv, SDHPub))
15 Client -> Client : RC=rand(64bit); SC=rand(256bit)
16 Client -> Server : enc(K, R+1, RS+RC+SC+Sign(DSAPriv, K))
17 Server -> Server : compare(RS)
18 Server -> Server : Verify(DSAPub, Sign(DSAPriv, K), K)
19 Server -> Server : MasterKey=SS XOR SC
20 Server -> Client : enc(K, R+2, RC)
21 Client -> Client : compare(RC)
22 Client -> Client : MasterKey=SS XOR SC
23 @enduml