diff --git a/.gitignore b/.gitignore index 66fd13c90..62b493e6a 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,5 @@ # Dependency directories (remove the comment below to include it) # vendor/ + +.DS_Store diff --git a/diagrams/message.mmd b/diagrams/message.mmd new file mode 100644 index 000000000..36aae4bd3 --- /dev/null +++ b/diagrams/message.mmd @@ -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 and sent to all Alice's servers
{from: , to: , message: } + Server A ->> Server B: Alice's servers use to locate Bob's servers
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 to identify Alice
and decrypts the message with to show it \ No newline at end of file diff --git a/diagrams/message.svg b/diagrams/message.svg new file mode 100644 index 000000000..c5591f37d --- /dev/null +++ b/diagrams/message.svg @@ -0,0 +1,494 @@ +AliceApp AServer AServer BApp BBobAlice writes the message to Bob in the appthe message (including ID & timestamp) is encrypted by <Alice-Bob public key> and sent to all Alice's servers{from: <Bob-Alice key hash>, to: <Alice-Bob key hash>, message: <encrypted with Alice-Bob public key>}Alice's servers use <Alice-Bob key hash> to locate Bob's serversand forwards encrypted message to all Bob's servers (in case they are different from Alice's serversBob's servers send the message to Bob's appBob's app uses <Bob-Alice key hash> to identify Aliceand decrypts the message with <Bob-Alice private key> to show itAliceApp AServer AServer BApp BBob \ No newline at end of file diff --git a/readme.md b/readme.md index e6c966b3b..ab34038f2 100644 --- a/readme.md +++ b/readme.md @@ -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). - \ No newline at end of file + + +## Sequence diagrams + +### Sending message + +![Sending message](/diagrams/message.svg) \ No newline at end of file