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