docs: sending message diagram

This commit is contained in:
Evgeny Poberezkin
2019-12-21 14:08:57 +00:00
parent daab409837
commit d24053aba3
4 changed files with 515 additions and 1 deletions

2
.gitignore vendored
View File

@@ -13,3 +13,5 @@
# Dependency directories (remove the comment below to include it)
# vendor/
.DS_Store

12
diagrams/message.mmd Normal file
View File

@@ -0,0 +1,12 @@
sequenceDiagram
participant Alice
participant App A
participant Server A
participant Server B
participant App B
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 by <Alice-Bob public key> and sent to all Alice's servers<br>{from: <Bob-Alice key hash>, to: <Alice-Bob key hash>, message: <encrypted with Alice-Bob public key>}
Server A ->> Server B: Alice's servers use <Alice-Bob key hash> to locate Bob's servers<br>and forwards encrypted message to all Bob's servers (in case they are different from Alice's servers
Server B ->> App B: Bob's servers send the message to Bob's app
App B ->> Bob: Bob's app uses <Bob-Alice key hash> to identify Alice<br>and decrypts the message with <Bob-Alice private key> to show it

494
diagrams/message.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -71,4 +71,10 @@ Client apps should provide the following:
- optionally define the server(s) they trust and will connect to, including the servers that require server key to access.
- optionally require that connected users connect to one of the servers they trust when sending messages to the user profile.
- store history of all conversations encrypted using user client app password (or some other device specific encryption mechanism).
## Sequence diagrams
### Sending message
![Sending message](/diagrams/message.svg)