From fddc5f9ed602bea457bba662c9ccd6f4803c6946 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Victor=20Anderss=C3=A9n?= Date: Thu, 12 Feb 2026 21:04:33 +0200 Subject: [PATCH] Docs: mermaid diagram update --- docs/ENCRYPTION_FLOW.md | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/docs/ENCRYPTION_FLOW.md b/docs/ENCRYPTION_FLOW.md index b309d79..cb55eb4 100644 --- a/docs/ENCRYPTION_FLOW.md +++ b/docs/ENCRYPTION_FLOW.md @@ -39,12 +39,15 @@ This document describes the encryption flow in Dialtone, what is encrypted, what ## Data flow overview ```mermaid -flowchart LR - A[User types message] --> B[Client encrypts with channel key] - B --> C[Ciphertext sent to server] - C --> D[Server stores/relays ciphertext] - D --> E[Client receives ciphertext] - E --> F[Client decrypts with channel key] +flowchart TD + A[User writes message] --> B[Client encrypts with channel key] + B --> C[Ciphertext sent to server] + C --> D[Server stores and relays ciphertext] + D --> E[Recipient client receives ciphertext] + E --> F[Client decrypts with channel key] + F --> G{Another message?} + G -->|Yes| A + G -->|No| H[Wait for next message] ``` ## Key lifecycle and sharing @@ -55,18 +58,18 @@ sequenceDiagram participant Server participant DeviceB as Device B - DeviceA->>Server: Upload public key (login/register) - DeviceB->>Server: Upload public key (login/register) + DeviceA->>Server: Upload public key + DeviceB->>Server: Upload public key Note over DeviceA: Create channel key - DeviceA->>Server: Create channel (name encrypted) + DeviceA->>Server: Create channel (encrypted name) Note over DeviceA: Build key envelopes - DeviceA->>Server: Upload channel key envelopes + DeviceA->>Server: Upload key envelopes - DeviceB->>Server: Request channel key envelope + DeviceB->>Server: Request key envelope Server->>DeviceB: Encrypted envelope - DeviceB->>DeviceB: Decrypt envelope with private key + Note over DeviceB: Decrypt envelope (private key) ``` ## Local keystore encryption