Add basic repo

This commit is contained in:
Byron Lathi
2025-06-28 15:48:14 -07:00
parent 369e29557c
commit 8136a7526b
21 changed files with 1069 additions and 0 deletions

View File

@@ -0,0 +1,388 @@
<mxfile host="Electron" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/26.2.2 Chrome/134.0.6998.178 Electron/35.1.2 Safari/537.36" version="26.2.2">
<diagram name="Page-1" id="0d7VDhRL_w2sMOeykiQh">
<mxGraphModel dx="304" dy="205" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="ga53GqhnnIqpRH2Q9tV7-8" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="HEWMo3yU8EMGNTpzQ4xJ-1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="360" y="400" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-9" value="to poly1305" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="ga53GqhnnIqpRH2Q9tV7-8">
<mxGeometry x="-0.118" relative="1" as="geometry">
<mxPoint y="55" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="HEWMo3yU8EMGNTpzQ4xJ-1" value="CC_0" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="320" y="280" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-6" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.25;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="HEWMo3yU8EMGNTpzQ4xJ-2" target="ga53GqhnnIqpRH2Q9tV7-1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="HEWMo3yU8EMGNTpzQ4xJ-2" value="CC_1" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="400" y="280" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-7" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.75;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="HEWMo3yU8EMGNTpzQ4xJ-4" target="ga53GqhnnIqpRH2Q9tV7-1">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="HEWMo3yU8EMGNTpzQ4xJ-4" value="CC_n-1" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="480" y="280" width="80" height="40" as="geometry" />
</mxCell>
<mxCell id="HEWMo3yU8EMGNTpzQ4xJ-33" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;exitX=0;exitY=0.5;exitDx=0;exitDy=0;" parent="1" source="HEWMo3yU8EMGNTpzQ4xJ-6" target="HEWMo3yU8EMGNTpzQ4xJ-1" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="310" y="220" as="sourcePoint" />
<Array as="points">
<mxPoint x="290" y="220" />
<mxPoint x="290" y="300" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="HEWMo3yU8EMGNTpzQ4xJ-34" value="valid" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="HEWMo3yU8EMGNTpzQ4xJ-33" vertex="1" connectable="0">
<mxGeometry x="0.2588" relative="1" as="geometry">
<mxPoint x="10" y="-68" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-16" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" target="HEWMo3yU8EMGNTpzQ4xJ-6">
<mxGeometry relative="1" as="geometry">
<mxPoint x="440" y="160" as="sourcePoint" />
<Array as="points">
<mxPoint x="440" y="170" />
<mxPoint x="440" y="170" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-17" value="key, nonce" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="ga53GqhnnIqpRH2Q9tV7-16">
<mxGeometry x="-0.9174" relative="1" as="geometry">
<mxPoint y="-12" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="HEWMo3yU8EMGNTpzQ4xJ-6" value="Metadata Scheduler" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
<mxGeometry x="320" y="200" width="240" height="40" as="geometry" />
</mxCell>
<mxCell id="HEWMo3yU8EMGNTpzQ4xJ-7" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.042;exitY=1;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.125;entryY=0;entryDx=0;entryDy=0;entryPerimeter=0;" parent="1" source="HEWMo3yU8EMGNTpzQ4xJ-6" target="HEWMo3yU8EMGNTpzQ4xJ-1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="370" y="300" as="sourcePoint" />
<mxPoint x="420" y="250" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="HEWMo3yU8EMGNTpzQ4xJ-8" value="key" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="HEWMo3yU8EMGNTpzQ4xJ-7" vertex="1" connectable="0">
<mxGeometry x="0.0588" relative="1" as="geometry">
<mxPoint y="-11" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="HEWMo3yU8EMGNTpzQ4xJ-9" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.042;exitY=1;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.125;entryY=0;entryDx=0;entryDy=0;entryPerimeter=0;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="359.9" y="240" as="sourcePoint" />
<mxPoint x="359.9" y="280" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="HEWMo3yU8EMGNTpzQ4xJ-10" value="nonce" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="HEWMo3yU8EMGNTpzQ4xJ-9" vertex="1" connectable="0">
<mxGeometry x="0.0588" relative="1" as="geometry">
<mxPoint y="-1" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="HEWMo3yU8EMGNTpzQ4xJ-13" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.042;exitY=1;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.125;entryY=0;entryDx=0;entryDy=0;entryPerimeter=0;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="390" y="240" as="sourcePoint" />
<mxPoint x="390" y="280" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="HEWMo3yU8EMGNTpzQ4xJ-14" value="0" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="HEWMo3yU8EMGNTpzQ4xJ-13" vertex="1" connectable="0">
<mxGeometry x="0.0588" relative="1" as="geometry">
<mxPoint y="-1" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-55" value="c+0" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="HEWMo3yU8EMGNTpzQ4xJ-13">
<mxGeometry x="-0.0294" y="1" relative="1" as="geometry">
<mxPoint as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="HEWMo3yU8EMGNTpzQ4xJ-17" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.042;exitY=1;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.125;entryY=0;entryDx=0;entryDy=0;entryPerimeter=0;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="409.93" y="240" as="sourcePoint" />
<mxPoint x="409.93" y="280" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="HEWMo3yU8EMGNTpzQ4xJ-18" value="key" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="HEWMo3yU8EMGNTpzQ4xJ-17" vertex="1" connectable="0">
<mxGeometry x="0.0588" relative="1" as="geometry">
<mxPoint y="-11" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="HEWMo3yU8EMGNTpzQ4xJ-19" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.042;exitY=1;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.125;entryY=0;entryDx=0;entryDy=0;entryPerimeter=0;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="439.90000000000003" y="240" as="sourcePoint" />
<mxPoint x="439.90000000000003" y="280" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="HEWMo3yU8EMGNTpzQ4xJ-20" value="nonce" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="HEWMo3yU8EMGNTpzQ4xJ-19" vertex="1" connectable="0">
<mxGeometry x="0.0588" relative="1" as="geometry">
<mxPoint y="-1" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="HEWMo3yU8EMGNTpzQ4xJ-23" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.042;exitY=1;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.125;entryY=0;entryDx=0;entryDy=0;entryPerimeter=0;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="469.93" y="240" as="sourcePoint" />
<mxPoint x="469.93" y="280" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="HEWMo3yU8EMGNTpzQ4xJ-24" value="c+1" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="HEWMo3yU8EMGNTpzQ4xJ-23" vertex="1" connectable="0">
<mxGeometry x="0.0588" relative="1" as="geometry">
<mxPoint y="-1" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="HEWMo3yU8EMGNTpzQ4xJ-25" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.042;exitY=1;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.125;entryY=0;entryDx=0;entryDy=0;entryPerimeter=0;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="489.93" y="240" as="sourcePoint" />
<mxPoint x="489.93" y="280" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="HEWMo3yU8EMGNTpzQ4xJ-26" value="key" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="HEWMo3yU8EMGNTpzQ4xJ-25" vertex="1" connectable="0">
<mxGeometry x="0.0588" relative="1" as="geometry">
<mxPoint y="-11" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="HEWMo3yU8EMGNTpzQ4xJ-27" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.042;exitY=1;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.125;entryY=0;entryDx=0;entryDy=0;entryPerimeter=0;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="519.9" y="240" as="sourcePoint" />
<mxPoint x="519.9" y="280" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="HEWMo3yU8EMGNTpzQ4xJ-28" value="nonce" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="HEWMo3yU8EMGNTpzQ4xJ-27" vertex="1" connectable="0">
<mxGeometry x="0.0588" relative="1" as="geometry">
<mxPoint y="-1" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="HEWMo3yU8EMGNTpzQ4xJ-31" value="" style="endArrow=classic;html=1;rounded=0;exitX=0.042;exitY=1;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.125;entryY=0;entryDx=0;entryDy=0;entryPerimeter=0;" parent="1" edge="1">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="549.9300000000001" y="240" as="sourcePoint" />
<mxPoint x="549.9300000000001" y="280" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="HEWMo3yU8EMGNTpzQ4xJ-32" value="c+n" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="HEWMo3yU8EMGNTpzQ4xJ-31" vertex="1" connectable="0">
<mxGeometry x="0.0588" relative="1" as="geometry">
<mxPoint y="-1" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-13" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="ga53GqhnnIqpRH2Q9tV7-1" target="ga53GqhnnIqpRH2Q9tV7-10">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-1" value="keystream sr" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="400" y="360" width="160" height="40" as="geometry" />
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-14" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" target="ga53GqhnnIqpRH2Q9tV7-10">
<mxGeometry relative="1" as="geometry">
<mxPoint x="620" y="200" as="sourcePoint" />
</mxGeometry>
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-15" value="data" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="ga53GqhnnIqpRH2Q9tV7-14">
<mxGeometry x="-0.9286" relative="1" as="geometry">
<mxPoint y="-16" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-10" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="1">
<mxGeometry x="600" y="360" width="40" height="40" as="geometry" />
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-11" value="" style="endArrow=none;html=1;rounded=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="ga53GqhnnIqpRH2Q9tV7-10" target="ga53GqhnnIqpRH2Q9tV7-10">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="540" y="380" as="sourcePoint" />
<mxPoint x="590" y="330" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-12" value="" style="endArrow=none;html=1;rounded=0;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="ga53GqhnnIqpRH2Q9tV7-10" target="ga53GqhnnIqpRH2Q9tV7-10">
<mxGeometry width="50" height="50" relative="1" as="geometry">
<mxPoint x="540" y="380" as="sourcePoint" />
<mxPoint x="590" y="330" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-26" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="ga53GqhnnIqpRH2Q9tV7-19" target="ga53GqhnnIqpRH2Q9tV7-25">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-42" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.25;exitY=0;exitDx=0;exitDy=0;entryX=0.25;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" target="ga53GqhnnIqpRH2Q9tV7-19">
<mxGeometry relative="1" as="geometry">
<mxPoint x="309.96273291925456" y="520" as="sourcePoint" />
<Array as="points">
<mxPoint x="310" y="541" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-45" value="key" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="ga53GqhnnIqpRH2Q9tV7-42">
<mxGeometry x="-0.948" relative="1" as="geometry">
<mxPoint x="-10" y="-11" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-43" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" target="ga53GqhnnIqpRH2Q9tV7-19">
<mxGeometry relative="1" as="geometry">
<mxPoint x="340" y="520" as="sourcePoint" />
<Array as="points">
<mxPoint x="340" y="530" />
<mxPoint x="340" y="530" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-46" value="counter" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="ga53GqhnnIqpRH2Q9tV7-43">
<mxGeometry x="-0.9775" relative="1" as="geometry">
<mxPoint y="-10" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-44" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.75;exitY=0;exitDx=0;exitDy=0;entryX=0.75;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" target="ga53GqhnnIqpRH2Q9tV7-19">
<mxGeometry relative="1" as="geometry">
<mxPoint x="369.96273291925456" y="520" as="sourcePoint" />
<Array as="points">
<mxPoint x="370" y="541" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-48" value="nonce" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="ga53GqhnnIqpRH2Q9tV7-44">
<mxGeometry x="-0.9552" relative="1" as="geometry">
<mxPoint x="10" y="-11" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-53" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="ga53GqhnnIqpRH2Q9tV7-19">
<mxGeometry relative="1" as="geometry">
<mxPoint x="439.9999999999999" y="699.9999999999999" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-54" value="state_out" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="ga53GqhnnIqpRH2Q9tV7-53">
<mxGeometry x="0.7409" y="1" relative="1" as="geometry">
<mxPoint x="-1" y="31" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-19" value="state" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="280" y="560" width="120" height="40" as="geometry" />
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-20" value="QR" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="280" y="660" width="30" height="20" as="geometry" />
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-33" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="ga53GqhnnIqpRH2Q9tV7-21" target="ga53GqhnnIqpRH2Q9tV7-19">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="325" y="700" />
<mxPoint x="260" y="700" />
<mxPoint x="260" y="580" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-21" value="QR" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="310" y="660" width="30" height="20" as="geometry" />
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-34" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="ga53GqhnnIqpRH2Q9tV7-22">
<mxGeometry relative="1" as="geometry">
<mxPoint x="280" y="579.9999999999999" as="targetPoint" />
<Array as="points">
<mxPoint x="355" y="700" />
<mxPoint x="260" y="700" />
<mxPoint x="260" y="580" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-22" value="QR" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="340" y="660" width="30" height="20" as="geometry" />
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-23" value="QR" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="370" y="660" width="30" height="20" as="geometry" />
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-25" value="even/odd shuffle" style="shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;" vertex="1" parent="1">
<mxGeometry x="280" y="620" width="120" height="20" as="geometry" />
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-27" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.125;exitY=1;exitDx=0;exitDy=0;exitPerimeter=0;" edge="1" parent="1" source="ga53GqhnnIqpRH2Q9tV7-25" target="ga53GqhnnIqpRH2Q9tV7-20">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-29" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.375;exitY=1;exitDx=0;exitDy=0;exitPerimeter=0;" edge="1" parent="1" source="ga53GqhnnIqpRH2Q9tV7-25" target="ga53GqhnnIqpRH2Q9tV7-21">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-30" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.625;exitY=1;exitDx=0;exitDy=0;exitPerimeter=0;" edge="1" parent="1" source="ga53GqhnnIqpRH2Q9tV7-25" target="ga53GqhnnIqpRH2Q9tV7-22">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-31" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.875;exitY=1;exitDx=0;exitDy=0;exitPerimeter=0;" edge="1" parent="1" source="ga53GqhnnIqpRH2Q9tV7-25" target="ga53GqhnnIqpRH2Q9tV7-23">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-32" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="ga53GqhnnIqpRH2Q9tV7-20" target="ga53GqhnnIqpRH2Q9tV7-19">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="295" y="700" />
<mxPoint x="260" y="700" />
<mxPoint x="260" y="580" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-35" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="ga53GqhnnIqpRH2Q9tV7-23" target="ga53GqhnnIqpRH2Q9tV7-19">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="385" y="700" />
<mxPoint x="260" y="700" />
<mxPoint x="260" y="580" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-52" value="state_next" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="ga53GqhnnIqpRH2Q9tV7-35">
<mxGeometry x="-0.0423" relative="1" as="geometry">
<mxPoint x="22" y="10" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-37" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="ga53GqhnnIqpRH2Q9tV7-36" target="ga53GqhnnIqpRH2Q9tV7-25">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="270" y="620" />
<mxPoint x="270" y="630" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-38" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="ga53GqhnnIqpRH2Q9tV7-36">
<mxGeometry relative="1" as="geometry">
<mxPoint x="220" y="680" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-39" value="valid out" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="ga53GqhnnIqpRH2Q9tV7-38">
<mxGeometry x="-0.399" relative="1" as="geometry">
<mxPoint y="38" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-40" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="219.75000000000006" y="600" as="targetPoint" />
<mxPoint x="219.75" y="560" as="sourcePoint" />
<Array as="points">
<mxPoint x="220" y="581" />
<mxPoint x="220" y="581" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-41" value="valid in" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="ga53GqhnnIqpRH2Q9tV7-40">
<mxGeometry x="-0.8756" relative="1" as="geometry">
<mxPoint y="-12" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-47" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.75;entryDx=0;entryDy=0;" edge="1" parent="1" source="ga53GqhnnIqpRH2Q9tV7-36" target="ga53GqhnnIqpRH2Q9tV7-19">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="270" y="620" />
<mxPoint x="270" y="590" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-51" value="count" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="ga53GqhnnIqpRH2Q9tV7-47">
<mxGeometry x="0.1001" y="-1" relative="1" as="geometry">
<mxPoint x="19" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-49" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.25;exitDx=0;exitDy=0;entryX=0;entryY=0.25;entryDx=0;entryDy=0;" edge="1" parent="1" source="ga53GqhnnIqpRH2Q9tV7-36" target="ga53GqhnnIqpRH2Q9tV7-19">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="250" y="610" />
<mxPoint x="250" y="570" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-50" value="init" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="ga53GqhnnIqpRH2Q9tV7-49">
<mxGeometry x="0.4511" y="1" relative="1" as="geometry">
<mxPoint x="2" y="-9" as="offset" />
</mxGeometry>
</mxCell>
<mxCell id="ga53GqhnnIqpRH2Q9tV7-36" value="count" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="200" y="600" width="40" height="40" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@@ -31,3 +31,71 @@ To support AEAD, The first round becomes the key for the Poly1305 block. This
can be done in parallel with the second round, which becomes the cipher, at the
expense of double the gates. Otherwise, there would be a delay in between
packets as this is generated.
Okay so we did some timing tests and we can easily do 1 round of ChaCha20 in a
single cycle on a Titanium FPGA at 250MHz (~350-400 MHz)
So then it will take 20 cycles to calculate 512 bits, or 25.6 bits/cycle, or
6.4Gbps. So then we will need 2 of these for 10Gbps.
So in order to use multiple cores, we would calculate 1024 bits in 20 cycles.
Then we would put those bits into a memory or something and start calculating
the next 1024 bits. Those bits would all be used up in 16 cycles, (but the
throughput still checks out). Once they are used, we load the memory with the
new output.
This puts a 20 cycle minimum on small packets since the core is not completely
pipelined. This puts a hard cap at 12.5Mpps. At 42 byte packets, this is
4.2Gbps, and for 64 byte packets is 6.4Gbps. In order to saturate the link, you
would need packets of at least 100 bytes.
This is with the 20 cycle minimum, though in reality it would be more like 25
or 30 with the final addition, scheduling, pipelining etc. Adding more cores
increases the throughput for larger packets, but does nothing for small packets
since the latency is the same. To solve this, we could instantiate the entire
core twice, such that we could handle 2 minimum size packets at the same time.
If we say there is a 30 cycle latency, the worst case is 2.8Gbps. Doubling the
number of cores gives 5.6, quadrupling the number of cores gives 11.2Gbps. This
would of course more than quadrouple the area since we need 4x the cores as
well as the mux and demux between them.
This could be configurable at compile time though. The number of ChaChas per
core would also be configurable, but at the moment I choose 2.
Just counting the quarter rounds, there are 4\*2\*4 = 32 QR modules, or 64 if
we want to 8 QRs per core instead of 4 for timing reasons.
Each QR is 322 XLR, so just the QR would be either 10k or 20k XLR.. That's kind
of a lot. A fully pipelined design would use 322\*20\*4 or 25k XLR. If we can
pass timing using 10k luts than that would be nice. We get a peak throughput
of 50Gbps, its just that the latency kills our packet rate. If we reduce the
latency to 25 cycles and have 2 alternating cores, our packet rate would be
20Mpps, increasing with every cycle we take off. I think that is good. This
would result in 5k XLR which is not so bad.
Okay so starting over now, our clock speed cannot be 250MHz, the best we can do
is 200MHz. If we assume this same 25 cycle latency, thats 4Gbps per block, so
we would need 3 of them to surpass 10Gbps (each is 4096) so now we need 3 blocks
instead of 2.
We are barely going to be able to pass at 180MHz. maybe the fully pipelined
core is a better idea, but we can just fully pipeline a quarter stage, and
generate 512 bits every 4 clock cycles. This would give us a theoretical
throughput of 32Gbps, and we would not have to worry about latency and small
packets slowing us down. Lets experiment with what that would look like.
For our single round its using 1024 adders, which almost sounds like it is
instantiating 8 quarter rounds instead of just 4. Either way, we can say that
a quarter round is 128ff + 128add + 250lut.
So pipelining 20 of these gives 10k luts. Not so bad.
Actualyl its 88k luts... its 512ff * 4 * 20 = 40k ff
Lets just leave it for now even if its overkill. The hardware would support up to
40Gbps, and technically the FPGA has 16 lanes so could do 160Gbps in total, if
we designed a custom board for it (or 120 if we used FMC connectors).