<mxfile host="app.diagrams.net" agent="architecture-deliverables" version="24.0.0">
  <diagram name="End-to-End Encryption Architecture" id="12-e2e-encryption">
    <mxGraphModel dx="1400" dy="900" background="#ffffff" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1700" pageHeight="590" math="0" shadow="0">
      <root>
        <mxCell id="0" />
        <mxCell id="1" parent="0" />
        <mxCell id="_st1" value="Device key material" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontStyle=1;fontColor=#8a97a5;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="40" y="60" width="170" height="20" as="geometry" />
        </mxCell>
        <mxCell id="n.ik" value="&lt;b&gt;Identity Key Pair&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;Curve25519, long lived&lt;/font&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontColor=#3a2b44;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="40" y="90" width="170" height="90" as="geometry" />
        </mxCell>
        <mxCell id="n.spk" value="&lt;b&gt;Signed Prekey&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;Rotated weekly&lt;/font&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontColor=#3a2b44;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="40" y="210" width="170" height="90" as="geometry" />
        </mxCell>
        <mxCell id="n.opk" value="&lt;b&gt;One-time Prekeys&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;100 per device&lt;/font&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontColor=#3a2b44;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="40" y="330" width="170" height="90" as="geometry" />
        </mxCell>
        <mxCell id="_st2" value="Key distribution" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontStyle=1;fontColor=#8a97a5;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="320" y="60" width="190" height="20" as="geometry" />
        </mxCell>
        <mxCell id="n.kds" value="&lt;b&gt;Key Distribution Service&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;Public keys only&lt;/font&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#1a2b45;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="320" y="120" width="190" height="70" as="geometry" />
        </mxCell>
        <mxCell id="n.pks" value="&lt;b&gt;Prekey Store&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;Consumed once&lt;/font&gt;" style="shape=cylinder3;boundedLbl=1;backgroundOutline=1;size=11;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontColor=#1e3a1e;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="320" y="220" width="190" height="70" as="geometry" />
        </mxCell>
        <mxCell id="n.sn" value="&lt;b&gt;Safety Number&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;Out-of-band verify&lt;/font&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontColor=#3a2b44;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="320" y="320" width="190" height="70" as="geometry" />
        </mxCell>
        <mxCell id="_st3" value="Session setup" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontStyle=1;fontColor=#8a97a5;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="620" y="60" width="170" height="20" as="geometry" />
        </mxCell>
        <mxCell id="n.x3dh" value="&lt;b&gt;X3DH Handshake&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;Works while offline&lt;/font&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontColor=#3a2b44;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="620" y="170" width="170" height="70" as="geometry" />
        </mxCell>
        <mxCell id="n.root" value="&lt;b&gt;Root &amp; Chain Keys&lt;/b&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontColor=#3a2b44;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="620" y="270" width="170" height="70" as="geometry" />
        </mxCell>
        <mxCell id="_st4" value="Message encryption" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontStyle=1;fontColor=#8a97a5;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="900" y="60" width="170" height="20" as="geometry" />
        </mxCell>
        <mxCell id="n.dr" value="&lt;b&gt;Double Ratchet&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;New key per message&lt;/font&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontColor=#3a2b44;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="900" y="120" width="170" height="70" as="geometry" />
        </mxCell>
        <mxCell id="n.sk" value="&lt;b&gt;Sender Key&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;Group messages&lt;/font&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontColor=#3a2b44;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="900" y="220" width="170" height="70" as="geometry" />
        </mxCell>
        <mxCell id="n.mk" value="&lt;b&gt;Media Key&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;Per blob, AES-256&lt;/font&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontColor=#3a2b44;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="900" y="320" width="170" height="70" as="geometry" />
        </mxCell>
        <mxCell id="_st5" value="Transport" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontStyle=1;fontColor=#8a97a5;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="1180" y="60" width="170" height="20" as="geometry" />
        </mxCell>
        <mxCell id="n.ct" value="&lt;b&gt;Ciphertext + Header&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;Ratchet counters&lt;/font&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#1a2b45;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="1180" y="170" width="170" height="70" as="geometry" />
        </mxCell>
        <mxCell id="n.srv" value="&lt;b&gt;Platform&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;Cannot decrypt&lt;/font&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#8c8c8c;fontColor=#333333;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="1180" y="270" width="170" height="70" as="geometry" />
        </mxCell>
        <mxCell id="_st6" value="Recipient" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontStyle=1;fontColor=#8a97a5;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="1460" y="60" width="200" height="20" as="geometry" />
        </mxCell>
        <mxCell id="n.plain" value="&lt;b&gt;Plaintext in Secure Store&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;SQLCipher on device&lt;/font&gt;" style="shape=cylinder3;boundedLbl=1;backgroundOutline=1;size=11;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontColor=#1e3a1e;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="1460" y="170" width="200" height="70" as="geometry" />
        </mxCell>
        <mxCell id="n.step" value="&lt;b&gt;Ratchet Step&lt;/b&gt;&lt;br&gt;&lt;font style=&quot;font-size:10px;color:#5b6b7d&quot;&gt;Out-of-order tolerant&lt;/font&gt;" style="rounded=1;arcSize=8;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;fontColor=#3a2b44;fontSize=12;fontFamily=Segoe UI;verticalAlign=middle;align=center;" vertex="1" parent="1">
          <mxGeometry x="1460" y="270" width="200" height="70" as="geometry" />
        </mxCell>
        <mxCell id="_spine7" value="" style="html=1;endArrow=block;endFill=1;strokeColor=#b8c4d0;strokeWidth=2;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="220" y="250" as="sourcePoint" />
            <mxPoint x="310" y="250" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="_spine8" value="" style="html=1;endArrow=block;endFill=1;strokeColor=#b8c4d0;strokeWidth=2;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="520" y="250" as="sourcePoint" />
            <mxPoint x="610" y="250" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="_spine9" value="" style="html=1;endArrow=block;endFill=1;strokeColor=#b8c4d0;strokeWidth=2;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="800" y="250" as="sourcePoint" />
            <mxPoint x="890" y="250" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="_spine10" value="" style="html=1;endArrow=block;endFill=1;strokeColor=#b8c4d0;strokeWidth=2;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="1080" y="250" as="sourcePoint" />
            <mxPoint x="1170" y="250" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="_spine11" value="" style="html=1;endArrow=block;endFill=1;strokeColor=#b8c4d0;strokeWidth=2;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="1360" y="250" as="sourcePoint" />
            <mxPoint x="1450" y="250" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="_e12" value="key change warning" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;jettySize=auto;orthogonalLoop=1;dashed=1;endArrow=block;endFill=1;strokeColor=#b85450;strokeWidth=1.4;fontSize=10;fontColor=#42536a;labelBackgroundColor=#ffffff;verticalAlign=bottom;fontFamily=Segoe UI;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="n.sn" target="n.step">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="420" y="450" />
              <mxPoint x="1560" y="450" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="title" value="End-to-End Encryption Architecture" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=20;fontStyle=1;fontColor=#16202c;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="40" y="20" width="1610" height="30" as="geometry" />
        </mxCell>
        <mxCell id="rule" value="" style="line;strokeWidth=1;html=1;strokeColor=#c9d3de;" vertex="1" parent="1">
          <mxGeometry x="40" y="50" width="1610" height="10" as="geometry" />
        </mxCell>
        <mxCell id="_lg13" value="" style="rounded=1;arcSize=30;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;" vertex="1" parent="1">
          <mxGeometry x="40" y="490" width="20" height="10" as="geometry" />
        </mxCell>
        <mxCell id="_lg14" value="Security / platform" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontColor=#7b8794;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="70" y="490" width="110" height="20" as="geometry" />
        </mxCell>
        <mxCell id="_lg15" value="" style="rounded=1;arcSize=30;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
          <mxGeometry x="210" y="490" width="20" height="10" as="geometry" />
        </mxCell>
        <mxCell id="_lg16" value="Application we own" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontColor=#7b8794;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="240" y="490" width="110" height="20" as="geometry" />
        </mxCell>
        <mxCell id="_lg17" value="" style="rounded=1;arcSize=30;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
          <mxGeometry x="370" y="490" width="20" height="10" as="geometry" />
        </mxCell>
        <mxCell id="_lg18" value="Data store" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontColor=#7b8794;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="400" y="490" width="70" height="20" as="geometry" />
        </mxCell>
        <mxCell id="_lg19" value="" style="rounded=1;arcSize=30;html=1;fillColor=#f5f5f5;strokeColor=#8c8c8c;" vertex="1" parent="1">
          <mxGeometry x="480" y="490" width="20" height="10" as="geometry" />
        </mxCell>
        <mxCell id="_lg20" value="External / third party" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontColor=#7b8794;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="510" y="490" width="130" height="20" as="geometry" />
        </mxCell>
        <mxCell id="_lg21" value="" style="html=1;endArrow=none;dashed=1;strokeColor=#b85450;strokeWidth=1.4;" edge="1" parent="1">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="660" y="500" as="sourcePoint" />
            <mxPoint x="690" y="500" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="_lg22" value="failure / alternate" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontColor=#7b8794;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="690" y="490" width="110" height="20" as="geometry" />
        </mxCell>
        <mxCell id="note" value="The platform holds no private key and no plaintext at any point on this path." style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=10;fontColor=#8a97a5;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="40" y="520" width="1610" height="20" as="geometry" />
        </mxCell>
        <mxCell id="foot-rule" value="" style="line;strokeWidth=1;html=1;strokeColor=#e3e9ef;" vertex="1" parent="1">
          <mxGeometry x="40" y="540" width="1610" height="10" as="geometry" />
        </mxCell>
        <mxCell id="foot" value="v 1.0   ·   owner Platform Architecture   ·   date 2026-08" style="text;html=1;strokeColor=none;fillColor=none;align=left;verticalAlign=middle;whiteSpace=wrap;fontSize=9;fontColor=#9aa7b4;fontFamily=Segoe UI;" vertex="1" parent="1">
          <mxGeometry x="40" y="550" width="1610" height="10" as="geometry" />
        </mxCell>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>
