From 165fb7a1aa789aefb01b7384639567a317940479 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Sun, 20 Mar 2016 16:33:02 +0300 Subject: [PATCH] [DOC] Much more compact handshake scheme --- doc/handshake.txt | 43 +++++++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/doc/handshake.txt b/doc/handshake.txt index 43ed4ff..50b479a 100644 --- a/doc/handshake.txt +++ b/doc/handshake.txt @@ -3,26 +3,33 @@ hide footbox participant Client participant Server -== Preparation == -Client -> Client : R=rand(64bit) -Client -> Client : CDHPriv=rand(256bit) - -== Interaction == Client -> Server : R, enc(H(DSAPub), R, El(CDHPub)) -Server -> Server : SDHPriv=rand(256bit) -Server -> Server : K=H(DH(SDHPriv, CDHPub)) -Server -> Server : RS=rand(64bit) -Server -> Server : SS=rand(256bit) -Server -> Client : enc(H(DSAPub), R+1, El(SDHPub)); enc(K, R, RS+SS) -Client -> Client : K=H(DH(CDHPriv, SDHPub)) -Client -> Client : RC=rand(64bit); SC=rand(256bit) +note right +R=rand(64bit) +CDHPriv=rand(256bit) +end note + +Server -> Client : enc(H(DSAPub), R+1, El(SDHPub))\nenc(K, R, RS+SS) +note right +SDHPriv=rand(256bit) +K=H(DH(SDHPriv, CDHPub)) +RS=rand(64bit) +SS=rand(256bit) +end note + Client -> Server : enc(K, R+1, RS+RC+SC+Sign(DSAPriv, K)) -Server -> Server : compare(RS) -Server -> Server : Verify(DSAPub, Sign(DSAPriv, K), K) +note right +K=H(DH(CDHPriv, SDHPub)) +RC=rand(64bit) +SC=rand(256bit) +end note + Server -> Client : enc(K, R+2, RC) +note right +compare(RS) +compare(RC) +Verify(DSAPub, Sign(DSAPriv, K), K) +MasterKey=SS XOR SC +end note -== Finalizing == -Client -> Client : compare(RC) -Client -> Client : MasterKey=SS XOR SC -Server -> Server : MasterKey=SS XOR SC @enduml -- 2.44.0