Skip to content
  • System Diagrams · Cryptography

System Diagrams

LearnViaNotes @learnvianotes· 1 min read

Text diagrams detailing secure handshakes and persistent message flows.

1. Key Exchange Handshake (ECDH)

User A (Private a, Pub A=aG)                     User B (Private b, Pub B=bG)
      |                                                |
      |------------ [1. Upload PubKey A] ------------->| (Server Store)
      |                                                |
      |<----------- [2. Download PubKey B] ------------| (Server Retrieval)
      |                                                |
      |-- Derives shared secret S = a * Pub B (abG) ---|
      |-- Runs through HKDF -> Symmetric Session Key --|

2. Message Flow Routing Lifecycle

+---------+         +---------+         +-----------+         +--------+
| ClientA |         | Backend |         |  Database |         |ClientB |
+---------+         +---------+         +-----------+         +--------+
     |                   |                    |                    |
     |--[AES Encrypt]    |                    |                    |
     |                   |                    |                    |
     |--- websocket ---->|                    |                    |
     |    {ct, iv, tag}  |                    |                    |
     |                   |-- db.insert ------>|                    |
     |                   |   {ct, iv, tag}    |                    |
     |                   |                    |                    |
     |                   |----------- websocket -------------->|
     |                   |            {ct, iv, tag}            |
     |                   |                                     |
     |                   |                                [AES Decrypt]
     |                   |<---------- ack delivery ------------|
     |<-- ack delivery --|                                     |

Free for students and teachers

Write notes like this one

Cards for every idea, quizzes and flashcards, read aloud — on the web and your phone.

Something wrong with this note? Open it to report