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