mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-08-25 14:53:34 +00:00
- MESH_CLUSTER.md: full documentation for autonomous AI mesh network - LAZY_TOOLS.md: lazy tool loading for smaller LLMs - mesh-architecture.svg: colorful network topology diagram - task-routing.svg: scoring algorithm visualization - pq-handshake.svg: ML-KEM-768 key exchange sequence diagram - HTML docs with dark theme styling - Renamed ironclaw references to optimclaw in .env.example and README Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
75 lines
4.6 KiB
XML
75 lines
4.6 KiB
XML
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 480" font-family="Inter, system-ui, sans-serif">
|
|
<defs>
|
|
<linearGradient id="bg4" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
<stop offset="0%" style="stop-color:#1a1a2e"/>
|
|
<stop offset="100%" style="stop-color:#16213e"/>
|
|
</linearGradient>
|
|
</defs>
|
|
|
|
<rect width="700" height="480" fill="url(#bg4)" rx="12"/>
|
|
|
|
<text x="350" y="35" text-anchor="middle" fill="#00d4aa" font-size="20" font-weight="700">Post-Quantum Handshake Protocol</text>
|
|
<text x="350" y="55" text-anchor="middle" fill="#8899aa" font-size="11">ML-KEM-768 (Kyber) Key Encapsulation + AES-256-GCM Channel Encryption</text>
|
|
|
|
<!-- Node A -->
|
|
<rect x="60" y="75" width="120" height="35" rx="6" fill="#0f3460" stroke="#5c9cf5" stroke-width="2"/>
|
|
<text x="120" y="97" text-anchor="middle" fill="#5c9cf5" font-size="13" font-weight="600">Node A (init)</text>
|
|
<line x1="120" y1="110" x2="120" y2="440" stroke="#5c9cf5" stroke-width="1.5" stroke-opacity="0.3"/>
|
|
|
|
<!-- Node B -->
|
|
<rect x="520" y="75" width="120" height="35" rx="6" fill="#0f3460" stroke="#fab283" stroke-width="2"/>
|
|
<text x="580" y="97" text-anchor="middle" fill="#fab283" font-size="13" font-weight="600">Node B (resp)</text>
|
|
<line x1="580" y1="110" x2="580" y2="440" stroke="#fab283" stroke-width="1.5" stroke-opacity="0.3"/>
|
|
|
|
<!-- Step 1 -->
|
|
<g>
|
|
<rect x="30" y="120" width="170" height="40" rx="4" fill="#0f3460" stroke="#333"/>
|
|
<text x="115" y="136" text-anchor="middle" fill="#ccc" font-size="9">Generate ML-KEM-768</text>
|
|
<text x="115" y="150" text-anchor="middle" fill="#00d4aa" font-size="9" font-weight="600">keypair (pk, sk)</text>
|
|
</g>
|
|
|
|
<!-- Arrow 1: A -> B -->
|
|
<line x1="200" y1="175" x2="520" y2="195" stroke="#5c9cf5" stroke-width="2"/>
|
|
<polygon points="515,192 525,195 515,198" fill="#5c9cf5"/>
|
|
<rect x="250" y="170" width="200" height="30" rx="4" fill="#16213e" stroke="#5c9cf5" stroke-width="1"/>
|
|
<text x="350" y="185" text-anchor="middle" fill="#5c9cf5" font-size="10">{node_id, kem_pk, sign_pk}</text>
|
|
<text x="350" y="196" text-anchor="middle" fill="#6a6a6a" font-size="8">WebSocket message 1</text>
|
|
|
|
<!-- Step 2: B encapsulates -->
|
|
<g>
|
|
<rect x="500" y="210" width="180" height="50" rx="4" fill="#0f3460" stroke="#333"/>
|
|
<text x="590" y="226" text-anchor="middle" fill="#ccc" font-size="9">Encapsulate with A's pk:</text>
|
|
<text x="590" y="240" text-anchor="middle" fill="#00d4aa" font-size="9" font-weight="600">(shared_secret, ct) =</text>
|
|
<text x="590" y="252" text-anchor="middle" fill="#00d4aa" font-size="9" font-weight="600">KEM.Encaps(pk_A)</text>
|
|
</g>
|
|
|
|
<!-- Arrow 2: B -> A -->
|
|
<line x1="520" y1="275" x2="200" y2="295" stroke="#fab283" stroke-width="2"/>
|
|
<polygon points="205,292 195,295 205,298" fill="#fab283"/>
|
|
<rect x="220" y="270" width="280" height="30" rx="4" fill="#16213e" stroke="#fab283" stroke-width="1"/>
|
|
<text x="360" y="285" text-anchor="middle" fill="#fab283" font-size="10">{node_id, ciphertext, sign_pk, ed25519_sig}</text>
|
|
<text x="360" y="296" text-anchor="middle" fill="#6a6a6a" font-size="8">WebSocket message 2</text>
|
|
|
|
<!-- Step 3: A decapsulates -->
|
|
<g>
|
|
<rect x="20" y="310" width="190" height="50" rx="4" fill="#0f3460" stroke="#333"/>
|
|
<text x="115" y="326" text-anchor="middle" fill="#ccc" font-size="9">Verify sig, then decapsulate:</text>
|
|
<text x="115" y="340" text-anchor="middle" fill="#00d4aa" font-size="9" font-weight="600">shared_secret =</text>
|
|
<text x="115" y="352" text-anchor="middle" fill="#00d4aa" font-size="9" font-weight="600">KEM.Decaps(ct, sk_A)</text>
|
|
</g>
|
|
|
|
<!-- Step 4: Both derive keys -->
|
|
<rect x="30" y="375" width="170" height="35" rx="4" fill="#0f3460" stroke="#7fd88f" stroke-width="1.5"/>
|
|
<text x="115" y="392" text-anchor="middle" fill="#7fd88f" font-size="9" font-weight="600">HKDF-SHA256 → AES keys</text>
|
|
<text x="115" y="404" text-anchor="middle" fill="#6a6a6a" font-size="8">(send_key, recv_key)</text>
|
|
|
|
<rect x="500" y="375" width="180" height="35" rx="4" fill="#0f3460" stroke="#7fd88f" stroke-width="1.5"/>
|
|
<text x="590" y="392" text-anchor="middle" fill="#7fd88f" font-size="9" font-weight="600">HKDF-SHA256 → AES keys</text>
|
|
<text x="590" y="404" text-anchor="middle" fill="#6a6a6a" font-size="8">(send_key, recv_key)</text>
|
|
|
|
<!-- Encrypted channel -->
|
|
<rect x="150" y="425" width="400" height="35" rx="6" fill="#303A30" stroke="#7fd88f" stroke-width="2"/>
|
|
<text x="350" y="447" text-anchor="middle" fill="#7fd88f" font-size="12" font-weight="700">AES-256-GCM Encrypted Channel Active</text>
|
|
<text x="350" y="455" text-anchor="middle" fill="#6a6a6a" font-size="8">nonce(8B) || ciphertext per frame | forward-secure</text>
|
|
</svg>
|