%%{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
1st's Introduction
1st's People
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.