%%{init: {'themeVariables': {'fontFamily': 'Bernard MT Condensed', 'fontSize': '24px','fontWeight': 'bold'}}}%%
sequenceDiagram
participant Alice as π© Alice
participant Bob as π¨ Bob
participant Server as π» Server
rect rgb(200, 220, 255)
note over Alice: Step 1
Alice ->> Alice: π© generates private key a π
Bob ->> Bob: π¨ generates private key b π
end
rect rgb(200, 220, 255)
note over Alice: Step 2
Alice ->> Alice: π© computes public key A = g^a mod p π
Alice ->> Bob: π© sends public key A to π¨ βοΈ
end
rect rgb(200, 220, 255)
note over Bob: Step 3
Bob ->> Bob: π¨ computes public key B = g^b mod p π
Bob ->> Alice: π¨ sends public key B to π© βοΈ
end
rect rgb(200, 220, 255)
note over Alice, Bob: Step 4
Alice ->> Alice: π© computes shared secret s = B^a mod p = g^(ab) mod p π
Bob ->> Bob: π¨ computes shared secret s = A^b mod p = g^(ab) mod p π
end
rect rgb(200, 220, 255)
note over Alice, Server: Step 5
Alice ->> Server: π© sends encrypted message to Server π»: {Alice, Bob, s} βοΈ
Bob ->> Server: π¨ sends encrypted message to Server π»: {Alice, Bob, s} βοΈ
end
rect rgb(200, 220, 255)
note over Server: Step 6
Server ->> Server: π» matches secrets received from π© and π¨
Server ->> Server: π» generates session key Ks π
Server ->> Alice: π» sends session key Ks to π© βοΈ
Server ->> Bob: π» sends session key Ks to π¨ βοΈ
end
rect rgb(200, 220, 255)
note over Alice, Bob: Step 7
Alice ->> Alice: π© receives session key Ks from Server π
Bob ->> Bob: π¨ receives session key Ks from Server π
end
rect rgb(200, 220, 255)
note over Alice, Bob: Result
Alice ->> Bob: π© π¨ can now communicate securely using session key Ks π
end
-
Notifications
You must be signed in to change notification settings - Fork 0
c6ai/c6ai
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Β | Β | |||
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published