Show the sequence diagrams as pre-rendered SVG images
GoLand and Typora fail to draw the Mermaid sequence diagrams even though the same text renders on the Mermaid versions they bundle. Embed SVGs rendered with Mermaid 11.16.1 (white background) and keep the Mermaid source in a collapsed section under each image. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -111,6 +111,10 @@ Role `enroll` (assigned to the anonymous group):
|
||||
|
||||
### 7.2 Protocol
|
||||
|
||||

|
||||
|
||||
<details><summary>Mermaid source of this diagram</summary>
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
participant B as Board
|
||||
@@ -128,6 +132,8 @@ sequenceDiagram
|
||||
B->>B: persist FN and pw to flash, then reconnect as FN
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
- `sig` = Ed25519 over `S || B || n1 || clientid || FN`. Binding the FN and the Client ID means a reply for another request, board or identity does not verify.
|
||||
- The password is **hex of HKDF-SHA256(shared secret, salt = n1, info = "robot-market/mqtt-pw/v1|" + FN, 32 bytes)**. The label separates this use of the secret from any other.
|
||||
- The first successful FN login is the enrollment acknowledgement.
|
||||
@@ -155,6 +161,10 @@ The board logs in as `FN`, Client ID `FN`, with the derived password, sends `boa
|
||||
|
||||
### 9.2 Flow
|
||||
|
||||

|
||||
|
||||
<details><summary>Mermaid source of this diagram</summary>
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
participant O as Operator (UI)
|
||||
@@ -175,6 +185,8 @@ sequenceDiagram
|
||||
G->>G: DB: ACTIVE, disable the FN client, audit
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### 9.3 Rules that make it safe
|
||||
1. **SAS bound to the activation key.** The board shows a code derived from `B2` (and `n2`, FN). The operator compares it with what the backend received. An attacker who stole an FN password and sends a request with their own key produces a code that does not match what the real board displays. **This check is mandatory**, not optional; without it the operator could attach a stranger's FN to a real SN.
|
||||
2. **Activation code** (from the existing activation flow): single use, expiring, bound to one SN, attempt-limited. It proves the operator is physically at the machine.
|
||||
|
||||
Reference in New Issue
Block a user