docs: update message diagram to account for user-server auth and encryption

This commit is contained in:
Evgeny Poberezkin 2019-12-21 22:34:58 +00:00
parent 902c2007dc
commit 4da5ae01b5
2 changed files with 156 additions and 151 deletions

View file

@ -1,12 +1,17 @@
sequenceDiagram
participant Alice
participant App A
participant Server A
participant Server B
participant App B
participant App A as Alice's app
participant Server A as Alice's server
participant Server B as Bob's server
participant App B as Bob's app
participant Bob
Alice ->> App A: Alice writes the message to Bob in the app
App A ->> Server A: The message (including ID & timestamp) is encrypted with Bob's <BA public key> and sent to all Alice's servers<br>{from: <AB public key hash>, to: <BA public key hash>, message: <encrypted with BA public key>}
Server A ->> Server B: Alice's servers use <BA public key hash> to locate Bob's servers<br>and forward encrypted message to all Bob's servers (when they are different from Alice's servers)
Alice -->> App A: Alice writes the message to Bob in the app
App A ->> Server B: The message (including msg ID & timestamp) is signed with <AB private key>, encrypted with Bob's <BA public key> and sent to Bob's servers<br>{to: <BA public key hash>, message: <encrypted with BA public key>} (also signed/encrypted with <A_BA server private/public keys>)
Server B ->> App B: Bob's servers send the message to Bob's app
App B ->> Bob: Bob's app uses <AB public key hash> to identify Alice<br>and decrypts the messages with Bob's <BA private key>
App B -->> Bob: Bob's app uses <BA public key hash> to identify Alice<br>and decrypts the messages with Bob's <BA private key>
Note over App B: App creates<br>"message received"<br>including:<br>- msg correlation ID<br>- timestamp
App B ->> Server A: "message received" signed with <BA private key>, encrypted with Alice's <AB public key><br>{to: <AB public key hash>, message: <encrypted with AB public key>} (also signed/encrypted with <B_AB server private/public keys>)
Server A ->> App A: "message received": Alice's app uses <AB public key hash> to identify Bob<br>and decrypts "message received" with Alice's <AB private key>
App A -->> Alice: "message received" shown to Alice

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Before After
Before After