<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Aamir Hameed on Medium]]></title>
        <description><![CDATA[Stories by Aamir Hameed on Medium]]></description>
        <link>https://medium.com/@aamirmir001?source=rss-aef5251658a7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*pRZUK8vlWPwcoto2kr2eOw@2x.jpeg</url>
            <title>Stories by Aamir Hameed on Medium</title>
            <link>https://medium.com/@aamirmir001?source=rss-aef5251658a7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 00:01:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aamirmir001/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[You Can’t Migrate What You Can’t See: Building the Evidence Engine for Cryptographic Discovery]]></title>
            <link>https://medium.com/writingsofaamirhameed-com/you-cant-migrate-what-you-can-t-see-building-the-evidence-engine-for-cryptographic-discovery-d2c95602f57a?source=rss-aef5251658a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/d2c95602f57a</guid>
            <category><![CDATA[cbomkit]]></category>
            <category><![CDATA[pqc-migration]]></category>
            <category><![CDATA[nist]]></category>
            <category><![CDATA[cryptographic-discovery]]></category>
            <category><![CDATA[cryptography]]></category>
            <dc:creator><![CDATA[Aamir Hameed]]></dc:creator>
            <pubDate>Fri, 28 Aug 2026 09:15:02 GMT</pubDate>
            <atom:updated>2026-08-28T09:15:02.252Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fY0wkGrIy4FrvVgphDeEiQ.png" /></figure><p>One of the hardest problems in the transition to post-quantum cryptography is not implementing a new algorithm.</p><p>It is answering a much more basic question:</p><blockquote><strong><em>Where is cryptography actually being used?</em></strong></blockquote><p>An organization may have thousands of applications, servers, devices, firmware images, certificates, repositories, APIs and third-party dependencies. Somewhere inside that environment may be RSA, ECDSA, Ed25519, classical key exchange, hashing algorithms, post-quantum algorithms and proprietary cryptographic implementations.</p><p>Before an organization can migrate any of it, it first needs to know <strong>what exists, where it exists, how it is being used, and how certain we are that the discovery is correct.</strong></p><p>This is the problem we are beginning to address at <strong>Sirraya Labs</strong> with <strong>Sirraya CBOM</strong>.</p><p>And we are deliberately approaching it differently.</p><p>We are not starting with a dashboard.</p><p>We are starting with an <strong>evidence engine</strong>.</p><h3>What is a Cryptographic Inventory?</h3><p>A conventional asset inventory answers:</p><blockquote><em>What systems and assets do we have?</em></blockquote><p>A cryptographic inventory asks a different question:</p><blockquote><strong><em>What cryptographic mechanisms are associated with those assets?</em></strong></blockquote><p>For example, an organization might have:</p><pre>Payment API<br> ├── ECDSA P-256 certificate<br> ├── RSA-2048 dependency<br> └── SHA-256</pre><pre>Firmware<br> ├── Ed25519 signature verification<br> └── SHA-256</pre><pre>Device Gateway<br> ├── ECDSA P-256<br> └── X25519</pre><pre>Build Pipeline<br> └── ML-DSA signing</pre><p>This information becomes the foundation for understanding cryptographic exposure and eventually planning migration.</p><p>But there is a fundamental problem.</p><p><strong>How do you know these findings are actually correct?</strong></p><p>That question is at the heart of our architecture.</p><h3>Discovery is not the same as evidence</h3><p>Imagine a scanner finds this in a project’s Cargo.toml:</p><pre>rsa = &quot;...&quot;</pre><p>Does that prove the application uses RSA?</p><p>No.</p><p>The dependency may be present but never imported.</p><p>Now imagine a binary scanner finds:</p><pre>RSA_verify</pre><p>That is stronger evidence.</p><p>Now imagine a runtime sensor observes an actual RSA verification operation.</p><p>That is stronger still.</p><p>We therefore don’t want our system to treat every discovery as equivalent.</p><p>Instead, we want to preserve <strong>what was observed, where it was observed, how it was observed, and which independent evidence sources agree with it.</strong></p><p>That is why sirraya-cbom is deliberately <strong>not a scanner</strong>.</p><h3>The architecture begins with evidence</h3><p>The architecture separates discovery mechanisms from the system that reasons about their output.</p><p>Future discovery components can specialize in different evidence sources:</p><pre>Source Code<br>     │<br>Binary<br>     │<br>Certificates<br>     │<br>TLS<br>     │<br>Firmware<br>     │<br>Dependencies<br>     │<br>Runtime<br>     │<br>     ▼<br>┌─────────────────────┐<br>│   Sirraya CBOM      │<br>│   Evidence Engine   │<br>└─────────────────────┘<br>          │<br>          ▼<br>    Normalization<br>          │<br>          ▼<br>      Correlation<br>          │<br>          ▼<br>   Confidence Fusion<br>          │<br>          ▼<br>   Cryptographic Finding<br>          │<br>          ▼<br>      CBOM Output</pre><p>This separation is intentional.</p><p>The scanners report <strong>what they saw</strong>.</p><p>The evidence engine determines <strong>how those observations should be represented, correlated and evaluated</strong>.</p><h3>Seven discovery surfaces, one evidence model</h3><p>Cryptography can hide in many places.</p><p>A source-code scanner may find a cryptographic API.</p><p>A dependency scanner may find a cryptographic library.</p><p>A binary scanner may identify symbols or implementation fingerprints.</p><p>A certificate scanner may discover a public-key algorithm.</p><p>A TLS scanner may observe what is actually negotiated over a live connection.</p><p>A firmware scanner may uncover cryptographic components buried inside an image.</p><p>A runtime scanner may observe cryptographic operations that static analysis could not establish conclusively.</p><p>Each of these provides a different window into the same underlying system.</p><p>The challenge is preventing those observations from becoming seven disconnected inventories.</p><p><strong>Sirraya CBOM is designed to bring them together.</strong></p><h3>Canonical algorithm identity</h3><p>One of the first problems we are solving is deceptively simple:</p><p><strong>different systems use different names for the same algorithm.</strong></p><p>You might encounter:</p><pre>RSA<br>RSA2048<br>rsaEncryption<br>EVP_PKEY_RSA</pre><p>If every scanner treats those strings as independent identifiers, an enterprise inventory quickly becomes polluted with duplicates.</p><p>Sirraya CBOM introduces a canonical algorithm identity layer.</p><p>Conceptually:</p><pre>RSA<br>RSA2048<br>rsaEncryption<br>EVP_PKEY_RSA<br>       │<br>       ▼<br>Canonical Algorithm<br>       │<br>       ▼<br>RSA / 2048-bit</pre><p>The same principle applies to other cryptographic nomenclature.</p><p>For example:</p><pre>P-256<br>prime256v1<br>secp256r1<br>NIST P-256</pre><p>should not become four different cryptographic assets simply because four tools use different terminology.</p><p>Our canonical algorithm model is also connected directly to the algorithm vocabulary exposed by <strong>Sirraya Crypto</strong>, allowing discovery and cryptographic implementation layers to share a consistent identity model.</p><h3>Evidence is a first-class object</h3><p>We don’t want evidence to be a text field saying:</p><blockquote><em>“Found RSA somewhere.”</em></blockquote><p>Evidence needs structure.</p><p>A finding should be able to answer:</p><p><strong>What was found?</strong></p><p><strong>Where was it found?</strong></p><p><strong>Which scanner found it?</strong></p><p><strong>What exactly matched?</strong></p><p><strong>When was it observed?</strong></p><p><strong>What type of evidence is it?</strong></p><p>Conceptually:</p><pre>Crypto Evidence</pre><pre>Asset:<br>    payment-api</pre><pre>Algorithm:<br>    RSA-2048</pre><pre>Observation:<br>    RSA verification symbol</pre><pre>Source:<br>    Binary analysis</pre><pre>Location:<br>    application ELF</pre><pre>Match:<br>    RSA_verify</pre><pre>Confidence contribution:<br>    Binary evidence</pre><p>This means the final inventory remains <strong>traceable back to its underlying observations</strong>.</p><p>That becomes extremely important when the inventory is used for security decisions.</p><h3>From individual observations to a CryptoFinding</h3><p>Multiple observations should not automatically create multiple findings.</p><p>Suppose we have:</p><pre>Dependency scanner<br>    ↓<br>RSA library detected</pre><pre>Binary scanner<br>    ↓<br>RSA verification symbol detected</pre><pre>Runtime scanner<br>    ↓<br>RSA verification observed</pre><p>The system should understand that these observations may describe the <strong>same underlying cryptographic usage</strong>.</p><p>They are evidence contributing to one finding:</p><pre>CryptoFinding</pre><pre>RSA-2048<br>Usage: Signature Verification</pre><pre>Evidence:<br>    ✓ Dependency<br>    ✓ Binary<br>    ✓ Runtime</pre><p>This is where the evidence engine becomes more than a data store.</p><p>It becomes the layer that <strong>correlates cryptographic observations into an explainable finding</strong>.</p><h3>Confidence should be explainable</h3><p>We are deliberately avoiding the idea of a mysterious numerical score that says:</p><blockquote><em>Confidence: 87%</em></blockquote><p>That number is not very useful if nobody can explain where it came from.</p><p>Instead, confidence should be based on understandable evidence.</p><p>For example:</p><pre>LOW</pre><pre>✓ Dependency declaration</pre><pre>But:<br>✗ Not confirmed in binary<br>✗ Not observed at runtime</pre><p>versus:</p><pre>HIGH</pre><pre>✓ Dependency evidence<br>✓ Binary evidence<br>✓ Runtime evidence</pre><p>The principle is simple:</p><blockquote><strong><em>Independent evidence agreeing with one another should provide stronger confidence than a single weak observation.</em></strong></blockquote><p>This is why the architecture calls it <strong>confidence fusion</strong>.</p><p>And importantly, the rules are intended to be explicit and auditable rather than hidden inside a black-box scoring system.</p><h3>A dependency is not proof of usage</h3><p>This distinction deserves special emphasis.</p><p>Consider:</p><pre>Cargo.toml<br>    rsa = &quot;0.9&quot;</pre><p>A conventional dependency inventory might immediately report:</p><blockquote><em>RSA present.</em></blockquote><p>But the real question is:</p><blockquote><strong><em>Is RSA actually used?</em></strong></blockquote><p>Perhaps the dependency exists because of an unused feature.</p><p>Perhaps another dependency brings it transitively.</p><p>Perhaps it is compiled out of the production build.</p><p>Perhaps the production binary uses a completely different implementation.</p><p>This is why our model treats different evidence sources differently.</p><p>A dependency declaration is useful evidence.</p><p>It is simply not equivalent to observed runtime behavior.</p><p>That difference becomes critical when an organization is making migration decisions.</p><h3>Coverage matters as much as findings</h3><p>There is another problem with cryptographic discovery:</p><p><strong>not finding something does not necessarily mean it isn’t there.</strong></p><p>Suppose a scanner says:</p><blockquote><em>No RSA found.</em></blockquote><p>That statement is meaningless without knowing what was actually scanned.</p><p>Did we inspect:</p><ul><li>10 files?</li><li>10,000 files?</li><li>binaries?</li><li>dependencies?</li><li>certificates?</li><li>firmware?</li><li>runtime traffic?</li></ul><p>Our architecture therefore explicitly leaves room for <strong>negative and coverage evidence</strong>.</p><p>Eventually, the system should be able to say something closer to:</p><pre>Scan coverage</pre><pre>Files scanned:       4,218<br>Binaries analyzed:      37<br>Certificates:           112<br>Firmware images:          8<br>TLS endpoints:           24</pre><pre>Scanner versions:<br>    source-v3<br>    binary-v2<br>    cert-v2<br>    tls-v1</pre><pre>Coverage:<br>    93.7%</pre><pre>Unknown / inaccessible:<br>    12 assets</pre><p>Now:</p><blockquote><em>“No RSA detected”</em></blockquote><p>has context.</p><p>This is a much more honest and useful security statement.</p><h3>Claimed versus observed cryptography</h3><p>Another capability we are designing toward is reconciliation between <strong>what a system claims to use and what we actually observe</strong>.</p><p>For example:</p><pre>Configuration says:<br>    ML-DSA</pre><pre>Binary says:<br>    RSA</pre><pre>Runtime says:<br>    RSA</pre><p>That is not merely an inventory record.</p><p>That is a <strong>security discrepancy</strong>.</p><p>Or the reverse:</p><pre>Configuration:<br>    RSA</pre><pre>Runtime:<br>    ML-DSA</pre><p>Again, something interesting has happened.</p><p>This distinction between <strong>claimed cryptographic state</strong> and <strong>observed cryptographic state</strong> becomes increasingly important as organizations migrate systems.</p><p>A migration plan should not be based only on what configuration files say.</p><p>It should be based on evidence.</p><h3>Why CBOM?</h3><p>The output of all this work needs to remain interoperable with the broader ecosystem.</p><p>That is where <strong>CBOM — Cryptography Bill of Materials</strong> — comes in.</p><p>An SBOM describes the software components inside a system.</p><p>A CBOM describes the cryptographic components associated with that system.</p><p>Sirraya CBOM is designed to export the resulting inventory as a <strong>CycloneDX 1.6 cryptographic-asset document</strong>.</p><p>But we don’t want interoperability to mean throwing away the information that makes our findings useful.</p><p>Where the standard does not provide a native representation for our richer evidence and confidence information, we preserve that information through a Sirraya-specific properties namespace.</p><p>So the architecture becomes:</p><pre>Discovery<br>    ↓<br>Evidence<br>    ↓<br>Canonicalization<br>    ↓<br>Correlation<br>    ↓<br>Confidence<br>    ↓<br>Inventory<br>    ↓<br>CycloneDX CBOM</pre><p>Standards compatibility on the outside.</p><p>Richer evidence internally.</p><h3>Why we believe this approach is different</h3><p>There are already tools that can generate CBOMs and identify cryptographic components.</p><p>We are not claiming that cryptographic discovery itself is a new idea.</p><p>Our focus is on a different layer of the problem.</p><p><strong>We want the inventory to retain the reasoning behind the finding.</strong></p><p>Instead of:</p><pre>RSA-2048</pre><p>we want to be able to represent:</p><pre>RSA-2048</pre><pre>Found by:<br>    dependency analysis<br>    binary analysis<br>    runtime observation</pre><pre>Evidence:<br>    RSA library<br>    RSA_verify symbol<br>    observed verification</pre><pre>Confidence:<br>    HIGH</pre><pre>Asset:<br>    firmware-loader</pre><pre>Usage:<br>    signature verification</pre><p>And ideally, someone should be able to move from that finding back to the evidence that produced it.</p><p>That is the foundation of an <strong>evidence-driven cryptographic inventory</strong>.</p><h3>Why we are building this underneath Sirraya Crypto</h3><p>This work also connects directly to our broader cryptographic engineering at Sirraya Labs.</p><p><strong>Sirraya Crypto</strong> provides the cryptographic implementation foundation.</p><p><strong>Sirraya CBOM</strong> provides a structured way to understand cryptographic usage and evidence.</p><p>The relationship is important because discovery and migration need a common cryptographic vocabulary.</p><p>If the inventory identifies:</p><pre>RSA-2048<br>ECDSA P-256<br>Ed25519<br>ML-DSA<br>SLH-DSA<br>LMS<br>XMSS</pre><p>the system should not merely know their names.</p><p>It should understand them as canonical cryptographic identities and, where appropriate, understand their relationship to the cryptographic capabilities available in the underlying Sirraya ecosystem.</p><p>That gives us a path from:</p><p><strong>discovering cryptography</strong></p><p>to:</p><p><strong>understanding cryptography</strong></p><p>without making those two problems independent systems.</p><h3>This is the foundation, not the dashboard</h3><p>The temptation with security products is to start with the visual layer.</p><p>A beautiful dashboard can show:</p><pre>RSA: 42%<br>ECDSA: 31%<br>Ed25519: 18%<br>PQC: 9%</pre><p>But a percentage is only as trustworthy as the discovery process underneath it.</p><p>Our priority is therefore the opposite.</p><p>First:</p><p><strong>Can we discover it?</strong></p><p>Then:</p><p><strong>Can we preserve the evidence?</strong></p><p>Then:</p><p><strong>Can we normalize it?</strong></p><p>Then:</p><p><strong>Can we correlate independent observations?</strong></p><p>Then:</p><p><strong>Can we explain our confidence?</strong></p><p>Then:</p><p><strong>Can we measure coverage and identify unknowns?</strong></p><p>Only after that does the dashboard become meaningful.</p><h3>Building the foundation for trustworthy cryptographic migration</h3><p>Post-quantum migration will eventually involve enormous numbers of systems.</p><p>Organizations will need to understand their cryptographic dependencies before they can make intelligent migration decisions.</p><p>That means the industry needs more than another list of algorithms.</p><p>It needs <strong>visibility, evidence, provenance, normalization and confidence</strong>.</p><p>That is what we are building with Sirraya CBOM.</p><p>The vision is deliberately straightforward:</p><pre>Find cryptography.<br>       ↓<br>Preserve the evidence.<br>       ↓<br>Normalize what was found.<br>       ↓<br>Correlate independent observations.<br>       ↓<br>Measure confidence.<br>       ↓<br>Understand the cryptographic inventory.<br>       ↓<br>Export it through an interoperable CBOM.</pre><p>And from there, the larger post-quantum migration problem becomes much more tractable.</p><p>Because before an organization can answer:</p><blockquote><strong><em>“How do we migrate our cryptography?”</em></strong></blockquote><p>it first needs to answer:</p><blockquote><strong><em>“What cryptography do we actually have — and how do we know?”</em></strong></blockquote><p><strong>That is the problem we are working on now.</strong></p><p>Not just discovering cryptography.</p><p><strong>Building the evidence layer that makes cryptographic discovery trustworthy.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d2c95602f57a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/writingsofaamirhameed-com/you-cant-migrate-what-you-can-t-see-building-the-evidence-engine-for-cryptographic-discovery-d2c95602f57a">You Can’t Migrate What You Can’t See: Building the Evidence Engine for Cryptographic Discovery</a> was originally published in <a href="https://medium.com/writingsofaamirhameed-com">Sirraya Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sirraya Crypto: Building Stateful, Crypto-Agile Signing Infrastructure for Software and Firmware]]></title>
            <link>https://medium.com/writingsofaamirhameed-com/sirraya-crypto-building-stateful-crypto-agile-signing-infrastructure-for-software-and-firmware-786f14766fd4?source=rss-aef5251658a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/786f14766fd4</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[sirraya-crypto]]></category>
            <category><![CDATA[firmware]]></category>
            <category><![CDATA[pqc-migration]]></category>
            <category><![CDATA[iot]]></category>
            <dc:creator><![CDATA[Aamir Hameed]]></dc:creator>
            <pubDate>Wed, 26 Aug 2026 18:03:36 GMT</pubDate>
            <atom:updated>2026-08-26T18:03:59.289Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AB2ZBkRgWZoRGXexIg2vew.jpeg" /></figure><p>The post-quantum cryptography transition is often described as an algorithm migration problem: replace RSA and elliptic-curve signatures with ML-DSA, SLH-DSA, or another post-quantum algorithm, update the certificates, and move forward.</p><p>In production environments, it is rarely that simple.</p><p>A software vendor may have millions of deployed devices, firmware signing systems integrated into CI/CD pipelines, hardware security modules, long-lived device identities, regulatory requirements, legacy verification logic, and software artifacts that may need to remain trustworthy for ten or twenty years. The cryptographic algorithm is only one component of that trust infrastructure.</p><p>The more fundamental problem is therefore <strong>cryptographic continuity</strong>: how do you allow an organization to evolve its cryptographic foundations without repeatedly rebuilding the systems that depend on them?</p><p>This is the problem we are addressing with <strong>Sirraya Sign</strong>, the cryptographic signing infrastructure being developed on top of <strong>Sirraya Crypto</strong> at Sirraya Labs.</p><p>Our approach is not to build a single “post-quantum signing algorithm” and call the migration complete. We are building a <strong>crypto-agile signing architecture</strong> capable of supporting multiple cryptographic families, different operational models, explicit signing policies, and controlled transitions between algorithms.</p><p>The recent addition of <strong>LMS/HSS</strong>, a stateful hash-based signature system standardized in RFC 8554, is an important step in that architecture.</p><h3>From Algorithm Support to Cryptographic Agility</h3><p>Cryptographic agility, or crypto-agility, is the ability of a system to change cryptographic algorithms and configurations without redesigning the entire application or trust infrastructure.</p><p>This distinction matters.</p><p>A system that contains four algorithms is not necessarily crypto-agile. If every algorithm has its own API, key-management model, policy logic, serialization format, and verification pathway, adding another algorithm can still require substantial architectural changes.</p><p>Our objective with Sirraya Crypto and Sirraya Sign is different.</p><p>The signing infrastructure should be able to treat cryptographic mechanisms as interchangeable components where appropriate, while still preserving the characteristics that make each mechanism secure.</p><p>Today, the architecture spans several fundamentally different cryptographic families:</p><ul><li><strong>Ed25519</strong> — a widely deployed classical elliptic-curve signature scheme.</li><li><strong>ML-DSA</strong> — a lattice-based post-quantum signature standardized by NIST.</li><li><strong>SLH-DSA</strong> — a stateless hash-based post-quantum signature standardized by NIST.</li><li><strong>LMS/HSS</strong> — stateful hash-based signatures standardized by the IETF in RFC 8554.</li><li><strong>XMSS</strong> — another stateful hash-based signature family standardized in RFC 8391, which we are implementing separately.</li></ul><p>This diversity is intentional.</p><p>The security of these schemes does not rest on one mathematical assumption. Their operational characteristics are also different. A robust crypto-agility architecture needs to understand those differences rather than flattening everything into a generic sign() function.</p><h3>Why LMS and HSS Change the Architecture</h3><p>LMS stands for <strong>Leighton-Micali Signature</strong>. It is a hash-based digital signature system built around Merkle trees and one-time signatures.</p><p>HSS, or <strong>Hierarchical Signature System</strong>, extends LMS by allowing multiple LMS trees to be organized hierarchically.</p><p>The important property for software engineers is that LMS/HSS is <strong>stateful</strong>.</p><p>A conventional signing operation can conceptually look like this:</p><pre>private key + message<br>        ↓<br>     signature</pre><p>The private key can generally be used repeatedly without the signing operation consuming a particular position in the key.</p><p>LMS does not work that way.</p><p>An LMS private key contains a finite set of signing positions. Each signature consumes one of those positions.</p><p>Conceptually:</p><pre>LMS private key<br>       │<br>       ├── signature state 0 → signature<br>       ├── signature state 1 → signature<br>       ├── signature state 2 → signature<br>       ├── ...<br>       └── signature state N → signature</pre><p>The state must advance safely.</p><p>Reusing a signing state incorrectly can compromise the security of the scheme. That means state management is not an implementation detail that can be left to an application developer who happens to call the signing function.</p><p>It is part of the cryptographic security boundary.</p><p>This presented an architectural question for Sirraya Crypto:</p><p><strong>Should LMS/HSS be forced into the same interface as stateless signature algorithms simply to make the API look uniform?</strong></p><p>We decided the answer should be no.</p><h3>Designing the API Around the Security Model</h3><p>Sirraya Crypto already has a SignatureScheme abstraction for conventional signing algorithms.</p><p>LMS/HSS led us to introduce a separate StatefulSignatureScheme abstraction.</p><p>The conceptual distinction is:</p><pre>Stateless signature:</pre><pre>sign(&amp;private_key, message)</pre><p>versus:</p><pre>Stateful signature:</pre><pre>sign(&amp;mut private_key, message)</pre><p>That difference is deliberate.</p><p>The mutable reference represents the fact that signing changes the cryptographic state.</p><p>We also deliberately avoid making LMS and HSS private keys freely cloneable. In a language such as Rust, the type system can become part of the security engineering strategy: we can make unsafe operational patterns harder to express accidentally.</p><p>This is an important principle in the way we are developing Sirraya Crypto:</p><blockquote><strong><em>The abstraction should represent the security model, not conceal it.</em></strong></blockquote><p>Crypto-agility does not mean pretending every algorithm behaves identically. It means building an architecture capable of accommodating different algorithms without losing the properties that make them secure.</p><h3>A Real Use Case: Long-Lived Firmware</h3><p>Consider an industrial controller, automotive system, telecommunications device, satellite subsystem, medical device, or network appliance.</p><p>Its firmware may be signed today and deployed into an environment where it remains operational for a decade or more.</p><p>The organization needs to answer several questions:</p><p>How is firmware authenticated?</p><p>Which algorithms are trusted?</p><p>What happens when an algorithm is deprecated?</p><p>Can a new post-quantum algorithm be introduced without replacing the entire signing infrastructure?</p><p>Can legacy devices continue verifying existing signatures?</p><p>Can new devices require stronger cryptographic policies?</p><p>Can firmware releases carry multiple signatures during a migration period?</p><p>How is signing state protected when a stateful signature scheme is used?</p><p>These are not purely cryptographic questions. They are <strong>software supply-chain security, key-management, infrastructure and lifecycle-management questions</strong>.</p><p>This is where Sirraya Sign is intended to operate.</p><p>A future firmware signing workflow can conceptually look like:</p><pre>Firmware Artifact<br>                           │<br>                           ▼<br>                    Sirraya Sign<br>                           │<br>                    Signing Policy<br>                           │<br>          ┌────────────────┼────────────────┐<br>          │                │                │<br>       Ed25519          ML-DSA           SLH-DSA<br>          │                │                │<br>          └────────────────┼────────────────┘<br>                           │<br>                    Signed Artifact<br>                           │<br>                           ▼<br>                    Device / Gateway<br>                           │<br>                    Policy Verification<br>                           │<br>                     ACCEPT / REJECT</pre><p>For specialized deployments, stateful hash-based signing can become another component:</p><pre>Signing Policy<br>                            │<br>             ┌──────────────┼──────────────┐<br>             │              │              │<br>           ML-DSA         SLH-DSA        LMS/HSS<br>             │              │              │<br>             └──────────────┼──────────────┘<br>                            │<br>                      Firmware Artifact</pre><p>The exact combination should be determined by the threat model, deployment requirements, interoperability constraints and operational environment. More algorithms do not automatically mean more security.</p><p>That distinction is important.</p><h3>Why Multiple Cryptographic Families Matter</h3><p>There is an understandable temptation to ask:</p><p>“If ML-DSA is standardized, why do we need anything else?”</p><p>Because post-quantum migration is not only about replacing one algorithm with another. It is also about managing <strong>cryptographic concentration risk</strong>.</p><p>ML-DSA is based on lattice problems.</p><p>SLH-DSA is based on hash-function security.</p><p>LMS and XMSS are also hash-based, but they have substantially different constructions and, critically, stateful signing semantics.</p><p>Ed25519 represents the existing classical ecosystem.</p><p>These schemes therefore provide different combinations of:</p><ul><li>security assumptions,</li><li>signature sizes,</li><li>key sizes,</li><li>computational characteristics,</li><li>state-management requirements,</li><li>implementation complexity,</li><li>ecosystem maturity,</li><li>interoperability,</li><li>and deployment constraints.</li></ul><p>A crypto-agile infrastructure should make these choices explicit rather than embedding one algorithm permanently into the trust layer.</p><h3>Our Three-Family Signing Demonstration</h3><p>Before adding LMS/HSS, we extended the Sirraya Sign firmware demonstration to perform genuine multi-family signing.</p><p>The same firmware artifact can be signed using:</p><pre>Ed25519<br>ML-DSA-87<br>SLH-DSA-SHAKE-256s</pre><p>and verified under an explicit policy requiring the configured signatures.</p><p>The demonstration also includes tamper testing.</p><p>If the firmware changes after signing:</p><pre>Original firmware<br>       ↓<br>Ed25519       ✓<br>ML-DSA        ✓<br>SLH-DSA       ✓<br>       ↓<br>       ACCEPT</pre><p>but:</p><pre>Modified firmware<br>       ↓<br>Ed25519       ✗<br>ML-DSA        ✗<br>SLH-DSA       ✗<br>       ↓<br>       REJECT</pre><p>We also test cross-family separation to ensure that a signature produced by one algorithm cannot be accidentally interpreted or accepted as a signature belonging to another.</p><p>This matters because crypto-agility is not only about having multiple implementations. The system must preserve <strong>algorithm identity, verification boundaries and policy semantics</strong>.</p><h3>Why Signature Size Becomes a Real Engineering Decision</h3><p>The multi-algorithm demonstration also exposes a practical reality of post-quantum cryptography.</p><p>For example, our current demonstration shows approximately:</p><pre>Ed25519       64 bytes<br>ML-DSA-87     4.6 KB<br>SLH-DSA       29.8 KB</pre><p>Those numbers are not merely academic.</p><p>A 29.8 KB signature may be perfectly reasonable for one firmware update and considerably less attractive for a high-volume constrained protocol.</p><p>Likewise, the stateful nature of LMS/HSS introduces operational requirements that a stateless signature does not.</p><p>Therefore, crypto-agility should not become:</p><blockquote><em>“Support every algorithm everywhere.”</em></blockquote><p>It should become:</p><blockquote><em>“Select the appropriate cryptographic mechanism according to the security policy and deployment context, while preserving the ability to transition later.”</em></blockquote><p>That is a much more useful definition of agility.</p><h3>How We Are Approaching Implementation</h3><p>Our engineering methodology is intentionally conservative.</p><p>We are not beginning with a marketing abstraction and filling it with algorithm names.</p><p>We begin with the cryptographic specification.</p><p>For LMS/HSS, that meant implementing the components defined by RFC 8554, including the LM-OTS layer, LMS Merkle tree construction and HSS hierarchy, together with the required signing-state behavior.</p><p>Then we validate the implementation against independent known-answer tests.</p><p>This distinction is critical.</p><p>A round-trip test looks like:</p><pre>our implementation<br>      ↓<br>sign<br>      ↓<br>our implementation<br>      ↓<br>verify<br>      ↓<br>PASS</pre><p>That proves internal consistency.</p><p>An RFC known-answer test looks like:</p><pre>RFC-defined input<br>      ↓<br>our implementation<br>      ↓<br>expected RFC output<br>      ↓<br>byte-for-byte comparison</pre><p>That provides substantially stronger evidence that the implementation follows the external specification.</p><p>Our LMS implementation now passes the RFC 8554 Appendix F Test Case 1 vector, alongside the broader test suite.</p><p>The complete Sirraya Crypto test suite currently passes <strong>108 tests</strong>, including the LMS-specific tests and the existing Ed25519, ML-DSA and SLH-DSA coverage.</p><p>The objective is not merely to make a new algorithm compile. The objective is to add it without destabilizing everything that was already working.</p><h3>Why We Are Not Treating XMSS as “Just Another Hash Signature”</h3><p>XMSS is next, but we are deliberately implementing it independently.</p><p>XMSS is standardized in RFC 8391 and uses a different construction involving WOTS+, Merkle trees and stateful signing.</p><p>The fact that both LMS and XMSS are hash-based does not justify assuming that one implementation can simply be adapted into the other.</p><p>This is another example of the engineering philosophy behind Sirraya Crypto:</p><p><strong>similar security categories do not necessarily imply interchangeable implementations.</strong></p><p>We will implement XMSS against its specification, validate it against RFC 8391 known-answer test vectors, and then integrate it into the stateful-signature architecture.</p><p>Only after those lower-level primitives are independently validated should they become part of the higher-level Sirraya Sign workflow.</p><h3>From PQC Migration to Cryptographic Continuity</h3><p>This is ultimately larger than LMS, XMSS, ML-DSA or SLH-DSA individually.</p><p>Organizations will not migrate their cryptographic infrastructure once and be finished forever.</p><p>Cryptography evolves.</p><p>Standards evolve.</p><p>Threat models evolve.</p><p>Hardware evolves.</p><p>Compliance requirements evolve.</p><p>And software deployed today can remain operational long after the cryptographic assumptions behind its original design have changed.</p><p>That creates a requirement for <strong>cryptographic continuity</strong>.</p><p>A system should be capable of moving:</p><pre>Classical<br>   ↓<br>Hybrid<br>   ↓<br>Post-Quantum<br>   ↓<br>Multi-family / policy-driven<br>   ↓<br>Future cryptographic configurations</pre><p>without forcing the organization to replace the entire trust architecture at every stage.</p><p>This is the problem we are trying to solve with Sirraya Sign.</p><p>Sirraya Crypto provides the underlying cryptographic implementation and abstraction layer. Sirraya Sign builds the signing, verification and policy infrastructure around it. Together, they are intended to form a foundation for <strong>crypto-agile software and firmware signing</strong>, particularly for environments where artifacts and device identities need to remain trustworthy over long operational lifetimes.</p><p>The long-term objective is not to claim that one algorithm will remain secure forever.</p><p>It is to build infrastructure that can <strong>change when the cryptographic environment changes</strong>.</p><p>That is what we mean by cryptographic agility.</p><p>And that is what we mean by cryptographic continuity.</p><h3>What Comes Next</h3><p>The immediate technical roadmap is to continue expanding the stateful-signature layer with XMSS, validate it against RFC 8391 test vectors, and then bring the stateful schemes into the same policy and signing workflows used by the existing classical and post-quantum algorithms.</p><p>From there, the more important engineering work begins: secure state persistence, key lifecycle management, policy enforcement, artifact formats, CI/CD integration, verification tooling, auditability and eventually independent external validation.</p><p>Because the ultimate test is not whether we can implement five signature algorithms.</p><p>The real test is whether an organization can take a real software or firmware supply chain, introduce post-quantum cryptography, maintain compatibility where necessary, enforce stronger cryptographic policies where required, and continue evolving its trust infrastructure as cryptography changes.</p><p>That is the standard we are building toward at Sirraya Labs.</p><p><strong>Not simply post-quantum cryptography.</strong></p><p><strong>Crypto-agile signing infrastructure for cryptographic continuity.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=786f14766fd4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/writingsofaamirhameed-com/sirraya-crypto-building-stateful-crypto-agile-signing-infrastructure-for-software-and-firmware-786f14766fd4">Sirraya Crypto: Building Stateful, Crypto-Agile Signing Infrastructure for Software and Firmware</a> was originally published in <a href="https://medium.com/writingsofaamirhameed-com">Sirraya Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SirrayaSign: Building the Trust Infrastructure for the Post-Quantum Software Supply Chain]]></title>
            <link>https://medium.com/writingsofaamirhameed-com/sirrayasign-building-the-trust-infrastructure-for-the-post-quantum-software-supply-chain-7898b675bad6?source=rss-aef5251658a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/7898b675bad6</guid>
            <category><![CDATA[crypto-agility]]></category>
            <category><![CDATA[post-quantum-cryptography]]></category>
            <category><![CDATA[hybrid-cryptography]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Aamir Hameed]]></dc:creator>
            <pubDate>Wed, 26 Aug 2026 08:36:39 GMT</pubDate>
            <atom:updated>2026-08-26T08:36:39.515Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZGFcykihhQD8HW_i1xMdmg.jpeg" /></figure><p>The post-quantum transition is often described as a cryptography problem: identify vulnerable algorithms, select their post-quantum replacements, update the software, and move on. In practice, the difficult part begins after the algorithm has been selected. Software still needs to be built, firmware still needs to be released, signing keys still need to be protected, updates still need to reach devices, and every party in the supply chain still needs a reliable way to determine whether the software it is receiving is authentic, authorized, and compliant with the organization’s current cryptographic policy.</p><p>At Sirraya Labs, we believe this is one of the missing pieces in the post-quantum transition. <strong>The industry does not only need post-quantum cryptography. It needs post-quantum cryptographic infrastructure.</strong></p><p>That is why we are building <strong>SirrayaSign</strong>.</p><p>SirrayaSign is our new product initiative to create a cryptographic signing, verification, transparency, and policy layer for the software and firmware supply chain. Our initial focus is deliberately narrow: firmware and embedded software, where cryptographic trust can remain embedded in products and devices for many years and where changing the underlying cryptography is often far more complicated than changing a line of code.</p><p>The central idea is simple: <strong>organizations should be able to transition their cryptographic trust infrastructure without having to rebuild their entire software supply chain.</strong></p><h3>Why we believe this problem is becoming urgent</h3><p>The direction of travel is becoming increasingly clear. Governments, standards organizations, technology companies and regulated industries are moving from awareness of post-quantum risk toward actual migration requirements. At the same time, software supply-chain security has become a fundamental part of product security.</p><p>This creates an intersection that we believe has not received enough attention.</p><p>It is no longer sufficient to ask whether an organization has implemented ML-DSA or another post-quantum algorithm. We need to ask whether its release infrastructure can actually use that algorithm, whether its signing policies can enforce its use, whether its firmware can be independently verified, whether signing events can be evidenced, and whether the organization can change those requirements again in the future without disrupting the entire chain of trust.</p><p>A company may successfully implement a post-quantum signature algorithm and still have no practical mechanism for enforcing that algorithm across thousands of releases, development teams, CI/CD pipelines and deployed devices.</p><p>That is the gap we are targeting.</p><h3>From cryptographic algorithms to cryptographic continuity</h3><p>Our work at Sirraya Labs has already taken us deep into the cryptographic layer. We have been building a Rust-based cryptographic foundation supporting post-quantum and classical signature families, including ML-DSA, SLH-DSA and Ed25519, with a strong emphasis on standards, verification and cryptographic agility.</p><p>But a cryptographic library answers one part of the problem: <strong>can the cryptographic operation be performed correctly?</strong></p><p>A production software supply chain needs to answer much more. It needs to know who was authorized to sign an artifact, exactly which artifact was signed, which cryptographic algorithms were used, which policy governed the release, whether the signing event was recorded, and whether another party can independently verify the resulting evidence.</p><p>This is where SirrayaSign begins.</p><p>We see cryptographic agility not simply as the ability to support multiple algorithms inside a library, but as the ability to <strong>operate a changing cryptographic policy without breaking the trust infrastructure around the software</strong>.</p><p>That is what we call cryptographic continuity.</p><h3>Consider a real firmware release</h3><p>Imagine an industrial company preparing a new firmware release for thousands of deployed devices. The engineering team builds firmware-v4.8.0, signs it, sends it through its OTA infrastructure, and ultimately delivers it to devices in the field.</p><p>Today, that process may work perfectly well with an existing classical signature system.</p><p>Now the organization begins its post-quantum migration.</p><p>The security team decides that production firmware must satisfy a new policy requiring an approved post-quantum signature alongside the existing classical signature during the transition period. Suddenly, the organization has a much larger problem than simply implementing ML-DSA.</p><p>The build system needs to produce the correct artifact. The signing system needs to apply the new cryptographic policy. The signing operation needs to remain under the organization’s control. The release needs to generate verifiable evidence. The OTA system needs to distribute the artifact. The receiving device needs to verify it. And the organization needs to be able to demonstrate later that the release actually satisfied its signing requirements.</p><p>SirrayaSign is being designed to sit across this workflow.</p><p>The artifact is produced, its exact contents are identified through a cryptographic digest, the appropriate signatures are created, the signing envelope records the relevant evidence, the organization’s policy is evaluated, and the signing event can be recorded in a transparency system. The resulting release can then be independently verified before it is accepted.</p><p>The existing CI/CD and OTA infrastructure does not have to disappear. <strong>SirrayaSign becomes the cryptographic trust layer around it.</strong></p><h3>This distinction matters: valid does not always mean trusted</h3><p>One of the most important concepts we want SirrayaSign to make operational is the distinction between cryptographic validity and organizational authorization.</p><p>Suppose somebody modifies a firmware image after it has been signed. The artifact digest changes and the original signature no longer corresponds to the artifact. Verification fails.</p><p>That is straightforward.</p><p>But now consider a different scenario. An engineer creates a perfectly valid Ed25519 signature, but the organization’s current production policy requires an ML-DSA-87 signature as part of its post-quantum migration.</p><p>The signature is mathematically valid.</p><p>The release should still be rejected.</p><p>Why? Because the question is no longer simply whether the signature is valid. The question is whether the artifact satisfies the organization’s current trust policy.</p><p>This is where SirrayaSign moves beyond the traditional cryptographic-library model. <strong>The cryptographic layer determines whether a signature is valid; the policy layer determines whether that valid signature is acceptable for this particular environment.</strong></p><p>As organizations transition between cryptographic regimes, that distinction becomes increasingly important.</p><h3>Transparency adds another layer of trust</h3><p>Signing establishes that an artifact was signed by a particular identity. But modern software supply chains increasingly require stronger evidence than a signature sitting beside an artifact.</p><p>Organizations need to know what was signed, when it was signed, under which policy, and whether the signing event can be independently established later.</p><p>SirrayaSign therefore includes a transparency model in its architecture. The long-term objective is to provide cryptographically verifiable records of signing events so that verification does not depend solely on trusting a central service.</p><p>The verifier should be able to inspect the artifact, verify the signatures, evaluate the applicable policy, and verify the associated transparency evidence.</p><p>That principle is important to us: <strong>the infrastructure should generate evidence that can be independently verified rather than asking customers to simply trust the infrastructure provider.</strong></p><h3>Your keys should remain yours</h3><p>Another architectural principle we consider fundamental is that private signing keys should not have to leave the customer’s environment.</p><p>A serious organization may already use hardware security modules, offline signing environments, hardware-backed keys, secure enclaves, or internal key-management infrastructure. We do not believe a new signing platform should require organizations to surrender control over those systems.</p><p>Our model is therefore designed around local signing.</p><p>The customer can keep its private keys inside its own environment and use SirrayaSign to perform the signing workflow. The resulting public evidence can then be used for transparency, verification, policy enforcement and audit.</p><p>This creates a clean separation between <strong>control of the signing key</strong> and <strong>infrastructure for trust, transparency and governance</strong>.</p><p>For high-assurance environments, industrial systems, defense-adjacent organizations and regulated industries, we believe that distinction will be critical.</p><h3>We have already built the first working layer</h3><p>This is not beginning as a whitepaper or a slide deck.</p><p>We have already built the first SirrayaSign technical demonstrator as a Rust workspace around our existing cryptographic implementation.</p><p>The MVP includes a signing and verification core, a structured signing envelope, a policy engine, an initial append-only transparency mechanism and a command-line interface for developers.</p><p>More importantly, we have now demonstrated the complete workflow using <strong>live ML-DSA-87 and Ed25519 signatures against our actual Sirraya cryptographic implementation</strong>.</p><p>The demonstrator signs a real firmware artifact, records the signing event, and successfully verifies the resulting release. We then modify the firmware and demonstrate that verification rejects it. Finally, we create a cryptographically valid signature that does not satisfy the required policy and demonstrate that the policy layer rejects the release.</p><p>For us, that is an important milestone because it validates the core product model: <strong>signing, verification, transparency and policy can operate together as a single trust workflow.</strong></p><p>The next step is to take that foundation out of the laboratory and into real software and firmware environments.</p><h3>Where we are taking SirrayaSign</h3><p>Our development strategy is intentionally incremental.</p><p>We are first strengthening the developer foundation around the Rust SDK, CLI, signing envelope, verification model, policy engine and transparency protocol. We will then introduce remote transparency and verification APIs and make the workflow easy to integrate into existing CI/CD systems.</p><p>From there, we want to work with organizations operating real firmware and embedded software pipelines. We want to integrate with the systems they already use rather than asking them to replace their entire infrastructure.</p><p>Only after validating these workflows will we expand the enterprise platform around capabilities such as private transparency infrastructure, organizational identity, policy management, SSO, audit logs, compliance evidence and dedicated deployments.</p><p>We believe this is the right way to build the product because the requirements of a production security environment should come from real deployments, not from a feature list created in isolation.</p><h3>Why we are starting with firmware</h3><p>Firmware gives us a particularly clear entry point.</p><p>A software application may be updated frequently, but physical devices can remain deployed for years. Their bootloaders, update mechanisms, verification logic, trust anchors and signing infrastructure can become part of the product’s long-term security architecture.</p><p>That makes firmware one of the places where cryptographic migration has the highest potential for operational disruption.</p><p>Our objective is therefore not to tell organizations to throw away their existing infrastructure and start again.</p><p>It is to give them a way to introduce post-quantum signing into the systems they already operate, enforce the cryptographic policies they need today, and retain the ability to evolve those policies tomorrow.</p><h3>We are building for the existing ecosystem, not against it</h3><p>SirrayaSign is not intended to replace CI/CD platforms, OTA systems, artifact repositories, PKI infrastructure, HSMs or device-management platforms.</p><p>We want to integrate with them.</p><p>The opportunity we see is to provide the cryptographic trust layer connecting these systems.</p><p>A developer should be able to integrate SirrayaSign into an existing release pipeline. A security team should be able to define the cryptographic policy governing production releases. An infrastructure team should be able to retain control of its signing keys. A device should be able to independently verify the software it receives. And an auditor should eventually be able to examine evidence showing how a release was signed and governed.</p><p>That is the experience we want to build.</p><h3>The bigger opportunity</h3><p>We believe the post-quantum transition will eventually change the industry’s understanding of cryptographic infrastructure.</p><p>Today, much of the conversation is focused on replacing vulnerable algorithms.</p><p>Tomorrow, organizations will have to operate environments in which cryptographic algorithms, standards, threat models and policies continuously evolve.</p><p>The real challenge will therefore not be simply becoming “post-quantum.”</p><p>It will be maintaining <strong>cryptographic trust while cryptography itself changes</strong>.</p><p>That is the long-term problem SirrayaSign is designed to address.</p><p>Quantum-safe migration is the immediate forcing function.</p><p>Cryptographic continuity is the larger opportunity.</p><h3>We are now looking for the people who operate these systems</h3><p>Sirraya Labs is opening conversations with a small number of potential design partners and technical collaborators across <strong>post-quantum cryptography, firmware security, embedded systems, automotive cybersecurity, industrial IoT, defense technology, critical infrastructure, OTA software updates, software supply-chain security, product security, DevSecOps and cryptographic engineering.</strong></p><p>We are particularly interested in organizations that are already thinking seriously about how their software and firmware signing infrastructure will evolve as post-quantum requirements become operational.</p><p>We do not want to build SirrayaSign based only on what we think the market needs.</p><p>We want to work with the people who actually build, secure, sign, distribute and verify software in production.</p><p>Our immediate goal is simple: take a real software or firmware release workflow, understand its existing trust model, introduce post-quantum signing and cryptographic policy enforcement, and determine what is required to make that transition practical.</p><p><strong>SirrayaSign is now moving from a working technical demonstrator toward real-world product validation.</strong></p><p>If you are responsible for <strong>post-quantum migration, firmware signing, embedded security, software supply-chain security, OTA infrastructure, product security or cryptographic agility</strong>, we would like to hear from you.</p><p><strong>We are looking for our first design partners, technical collaborators and early adopters.</strong></p><p>This is the beginning of SirrayaSign: <strong>building the infrastructure that allows software supply chains to remain trusted even as the cryptography protecting them changes.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7898b675bad6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/writingsofaamirhameed-com/sirrayasign-building-the-trust-infrastructure-for-the-post-quantum-software-supply-chain-7898b675bad6">SirrayaSign: Building the Trust Infrastructure for the Post-Quantum Software Supply Chain</a> was originally published in <a href="https://medium.com/writingsofaamirhameed-com">Sirraya Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Simulator to Silicon: Closing the Chemical Accuracy Gap with Qutub Transpiler and Zero-Noise…]]></title>
            <link>https://medium.com/writingsofaamirhameed-com/from-simulator-to-silicon-closing-the-chemical-accuracy-gap-with-qutub-transpiler-and-zero-noise-90606c534312?source=rss-aef5251658a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/90606c534312</guid>
            <category><![CDATA[qiskit]]></category>
            <category><![CDATA[sirraya-qutub-transpiler]]></category>
            <category><![CDATA[quantum-computing]]></category>
            <category><![CDATA[sirraya-qutub]]></category>
            <category><![CDATA[quantum-chemistry]]></category>
            <dc:creator><![CDATA[Aamir Hameed]]></dc:creator>
            <pubDate>Fri, 07 Aug 2026 04:48:50 GMT</pubDate>
            <atom:updated>2026-08-07T04:49:12.521Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-ICbtCbr5m2LxvUaGfXz9g.png" /></figure><h3>From Simulator to Silicon: Closing the Chemical Accuracy Gap with Qutub Transpiler and Zero-Noise Extrapolation</h3><p>A walkthrough of how we take a quantum chemistry calculation from an idealized simulator to a realistic, noisy backend — and get it back to a scientifically trustworthy answer.</p><h3>1. What Our System Is</h3><p>Every quantum program has to make the same journey: from an abstract description of what you <em>want</em> to compute, to a sequence of physical operations a real chip can actually execute. That journey is where most of the practical difficulty in quantum computing lives — not in writing the algorithm, but in getting it to survive contact with real hardware.</p><p><strong>Qutub Transpiler</strong> is the piece of infrastructure that manages that journey. Given an abstract circuit — a sequence of logical gates with no assumptions about <em>which</em> qubits are physically adjacent or <em>which</em> native gate set a chip supports — Qutub takes it through a full hardware-realization pipeline:</p><ul><li><strong>Optimization</strong> (ir_optimize): collapsing redundant or cancelling gates before anything touches hardware.</li><li><strong>Routing</strong> (route_best): real chips don&#39;t let every qubit talk to every other qubit. Each backend has a <em>coupling map</em> — a graph of which physical qubits can interact directly. Routing inserts the SWAP operations needed to make a circuit that assumes full connectivity actually work on a chip that doesn&#39;t have it.</li><li><strong>Decomposition</strong> (decompose): rewriting gates into whatever native gate set a specific backend actually implements at the pulse level.</li><li><strong>Backend-aware execution</strong> (emit): running the fully lowered circuit, either against an exact simulator or against a calibrated noise model of real hardware.</li></ul><p>Critically, Qutub isn’t tied to one piece of hardware. It ships coupling maps and calibration-derived noise models for multiple backend architectures side by side — trapped-ion, and three different superconducting platforms — so the same abstract circuit can be evaluated against several real topologies, and you can see, quantitatively, which one is going to serve a given algorithm best <em>before</em> you spend hardware time finding out.</p><p>If you’ve never built a compiler before: think of Qutub the way you’d think of rustc or llvm for quantum programs — except instead of targeting an ISA, it&#39;s targeting a physical qubit lattice with its own connectivity constraints and its own error rates, and those constraints change depending on which chip you&#39;re targeting.</p><h3>2. The Problem We’re Demoing</h3><p>Quantum computers are supposed to be good at exactly the kind of problem quantum chemistry needs solved: computing the ground-state energy of a molecule. This isn’t an academic exercise — ground-state energies are the quantity you need to predict reaction rates, binding affinities, and material properties, and they get classically intractable fast as molecules get bigger.</p><p>We demo this on the simplest possible non-trivial case: <strong>molecular hydrogen (H₂) at 0.75 Å bond length</strong>, mapped into a 2-qubit Hamiltonian via a minimal STO-3G-derived basis. Small enough that we can compute the <em>exact</em> answer by direct diagonalization and know, with certainty, what “correct” looks like:</p><pre>electronic energy:   -1.851199 Hartree<br>+ nuclear repulsion    0.705570 Hartree<br>= total energy:       -1.145630 Hartree</pre><p>The algorithm of choice is the <strong>Variational Quantum Eigensolver (VQE)</strong>: a parameterized quantum circuit (“ansatz”) whose parameters get tuned by a classical optimizer until the circuit’s measured expectation value approaches the true ground-state energy. It’s the flagship near-term algorithm precisely because it’s <em>variational</em> — it doesn’t need a fault-tolerant, error-corrected quantum computer to work in principle. It just needs the noise to not overwhelm the signal.</p><p>That’s the actual problem this demo is built to expose. Run VQE against a perfect, noiseless simulator, and it lands within a whisker of the true answer — 0.000630 Hartree off, comfortably inside the field’s standard bar for a “useful” result, <strong>chemical accuracy</strong> (&lt; 0.0016 Hartree, roughly 1 kcal/mol — the same threshold VQE demonstrations have been judged against since the original Google/IBM hardware papers).</p><p>Run the <em>identical</em> optimized circuit against a realistic model of actual NISQ (noisy intermediate-scale quantum) hardware, and that accuracy erodes. Gate errors, routing overhead, decoherence — none of it is exotic or contrived, all of it is standard, calibration-derived noise — and the result silently drifts outside the chemically meaningful window. The circuit is correct. The optimizer converged correctly. The hardware is what breaks it.</p><p>This is the gap every quantum chemistry application has to close before quantum advantage is anything more than a simulator result: <strong>ideal-simulator accuracy is necessary but nowhere near sufficient.</strong></p><h3>3. How We Approach It</h3><p>We treat “does it work on hardware” as a question with a real, falsifiable, quantitative answer rather than a hand-wave — which means building the demo in layers, each one testable independently.</p><p><strong>Layer 1 — Validate the algorithm in a noiseless world.</strong> VQE is optimized against an exact statevector simulator first. This isolates the <em>algorithmic</em> question — does the ansatz have enough expressivity, does the optimizer converge — from the <em>hardware</em> question. If it doesn’t work here, no amount of noise mitigation downstream will save it. (In our case: 3 layers, 21 parameters, coordinate-descent optimization, ~3,300 parameter evaluations, converging in a quarter of a second — and landing well inside chemical accuracy.)</p><p><strong>Layer 2 — Route and lower against real coupling maps, and compare backends honestly.</strong> The same optimized circuit gets pushed through Qutub’s routing and decomposition pipeline against four backend coupling maps — a trapped-ion architecture and three superconducting platforms — and each one is scored on an estimated circuit fidelity derived from its actual gate counts and connectivity after routing, not a generic vendor spec.</p><p>Here’s how the four backends stacked up after routing — SWAPs inserted, single-qubit gate count, two-qubit gate count, and estimated fidelity:</p><p><strong>Trapped-ion (winner):</strong> 0 SWAPs · 14 single-qubit gates · 3 two-qubit gates · <strong>99.61% estimated fidelity</strong></p><p><strong>Superconducting A:</strong> 0 SWAPs · 18 single-qubit gates · 6 two-qubit gates · 96.99% estimated fidelity</p><p><strong>Superconducting B:</strong> 0 SWAPs · 21 single-qubit gates · 6 two-qubit gates · 90.57% estimated fidelity</p><p><strong>Superconducting C:</strong> 0 SWAPs · 21 single-qubit gates · 6 two-qubit gates · 95.97% estimated fidelity</p><p>This step matters more than it looks: the “best” backend on paper isn’t always the best backend <em>for this circuit</em>, because connectivity and native gate overhead interact differently with every ansatz. Qutub picks a winner (here, the trapped-ion backend) based on this circuit’s actual routed profile, not a static leaderboard.</p><p><strong>Layer 3 — Simulate that backend’s real noise, honestly, at scale.</strong> We don’t stop at an estimated fidelity number. We actually inject it: after routing and decomposition, every resulting gate gets a calibration-derived Pauli-error kick, applied through independent Monte Carlo trajectories (thousands per configuration) to approximate what a real noisy execution would return, without needing access to a full density-matrix simulator.</p><p><strong>Layer 4 — Mitigate, and <em>prove</em> the mitigation is real.</strong> This is the layer that separates a compelling demo from a rigorous one. We apply <strong>Zero-Noise Extrapolation (ZNE)</strong> — deliberately amplifying the circuit’s noise to several scaled levels, measuring the energy at each, and fitting a line back to the zero-noise limit. But a naive ZNE demo has a trap in it: at low shot counts, the extrapolated fit can <em>look</em> better or worse than the raw noisy result purely by chance, and reporting whichever one came out ahead that run is not honest science.</p><p>So the fit itself is done properly — a <strong>weighted least-squares regression</strong> (each noise-scale point weighted by its own inverse variance, so more precisely measured points pull the line harder), which yields not just an extrapolated energy but a <strong>closed-form uncertainty on that extrapolated value</strong>. Every claim of improvement is checked against that uncertainty before it’s allowed to be called an improvement at all.</p><h3>4. Solutions and Results</h3><p>Putting all four layers together end-to-end, at 50,000 Monte Carlo shots per noise level:</p><p>Here’s where each estimate landed, and whether it cleared the chemical-accuracy bar (&lt; 0.0016 Hartree):</p><p><strong>Exact (diagonalization):</strong> −1.851199 Hartree — the reference answer, no error to report.</p><p><strong>VQE, ideal simulator:</strong> −1.850569 Hartree · error 0.000630 Hartree · <strong>PASS</strong></p><p><strong>VQE, raw NISQ (trapped-ion):</strong> −1.846057 Hartree · error 0.005142 Hartree · <strong>FAIL</strong></p><p><strong>VQE, ZNE-mitigated:</strong> −1.850236 Hartree · error 0.000963 Hartree (stderr 0.000590) · <strong>PASS</strong></p><p>The headline result is not “mitigation made the number slightly better.” It’s this:</p><blockquote><strong><em>Raw execution on realistically noisy hardware fails chemical accuracy by more than 3x the threshold. Zero-noise extrapolation recovers it — and the recovery is a ~7σ effect, not a statistical accident.</em></strong></blockquote><p>That distinction matters enormously when you’re presenting to people who build the hardware this runs on. “It got closer” is a claim that evaporates under one skeptical question about sample size. “It crossed a well-established scientific threshold, and the crossing is seven standard deviations outside what sampling noise alone could produce” is a claim that survives the question — because we asked it of ourselves first, and built the uncertainty accounting to answer it before anyone else had to ask.</p><p><strong>Why this generalizes:</strong> none of the four layers above are specific to H₂. The routing and decomposition pipeline scales to any circuit and any coupling map you hand it; the noise-injection model is driven by each backend’s calibration data, not hardcoded to this molecule; and the weighted ZNE fit with propagated uncertainty is a general tool for deciding, rigorously, whether <em>any</em> mitigation technique earned its keep on <em>any</em> circuit. H₂ is the right molecule to demo because we can check every number against an exact answer — but the pipeline underneath is the same one you’d point at a larger, classically-intractable system where you don’t get that luxury.</p><p><strong>The takeaway for a builder at any level:</strong> a correct algorithm and a correct compiler are each necessary and neither is sufficient. The gap between “works on a simulator” and “works on hardware” is real, measurable, and — with the right combination of honest backend comparison, calibrated noise modeling, and statistically rigorous mitigation — closable. That’s the whole demo in one sentence: we didn’t just show a number get better, we showed <em>why</em> it’s allowed to be trusted.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90606c534312" width="1" height="1" alt=""><hr><p><a href="https://medium.com/writingsofaamirhameed-com/from-simulator-to-silicon-closing-the-chemical-accuracy-gap-with-qutub-transpiler-and-zero-noise-90606c534312">From Simulator to Silicon: Closing the Chemical Accuracy Gap with Qutub Transpiler and Zero-Noise…</a> was originally published in <a href="https://medium.com/writingsofaamirhameed-com">Sirraya Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Bell State in Rust: What Sirraya QuTub Actually Does]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/writingsofaamirhameed-com/a-bell-state-in-rust-what-sirraya-qutub-actually-does-aa2ddfe9a38e?source=rss-aef5251658a7------2"><img src="https://cdn-images-1.medium.com/max/1201/1*dAR8VyI6L-0L3LLfR8PH6g.png" width="1201"></a></p><p class="medium-feed-snippet">If you&#x2019;re a Rust developer, quantum computing has mostly happened in someone else&#x2019;s language. The simulators people use for research are&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/writingsofaamirhameed-com/a-bell-state-in-rust-what-sirraya-qutub-actually-does-aa2ddfe9a38e?source=rss-aef5251658a7------2">Continue reading on Sirraya Labs »</a></p></div>]]></description>
            <link>https://medium.com/writingsofaamirhameed-com/a-bell-state-in-rust-what-sirraya-qutub-actually-does-aa2ddfe9a38e?source=rss-aef5251658a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/aa2ddfe9a38e</guid>
            <category><![CDATA[bell-state]]></category>
            <category><![CDATA[sirraya-qutub]]></category>
            <category><![CDATA[quantum-computing]]></category>
            <category><![CDATA[post-nisq-quantum-comp]]></category>
            <dc:creator><![CDATA[Aamir Hameed]]></dc:creator>
            <pubDate>Sun, 26 Jul 2026 09:19:32 GMT</pubDate>
            <atom:updated>2026-07-26T09:19:32.193Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Project Ripple: Why We’re Betting on Wave Physics as the Next Substrate for AI]]></title>
            <link>https://blog.stackademic.com/project-ripple-why-were-betting-on-wave-physics-as-the-next-substrate-for-ai-3ceb215159fb?source=rss-aef5251658a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/3ceb215159fb</guid>
            <category><![CDATA[neuromorphic-computing]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[physics]]></category>
            <dc:creator><![CDATA[Aamir Hameed]]></dc:creator>
            <pubDate>Mon, 29 Jun 2026 12:56:53 GMT</pubDate>
            <atom:updated>2026-06-29T12:56:53.445Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I8dygz_MjHonzBSQtSLssQ.png" /></figure><p><em>by Amir Hameed Mir, Founder &amp; Principal Investigator, Sirraya Labs</em></p><p>There is a foundational assumption embedded in almost every AI research agenda today, so deep it rarely gets stated explicitly: that intelligence is a software problem, and physics is just the substrate it runs on.</p><p>Under that assumption, progress means better architectures, more parameters, faster chips. The hardware is infrastructure — necessary, expensive, ultimately passive. What matters is what you run on top of it.</p><p>That assumption has been extraordinarily productive. It has also become increasingly expensive to sustain.</p><p>Training a frontier model today costs tens of millions of dollars and consumes energy at scales that would have seemed implausible a decade ago. Inference compounds the problem. Every query passes through thousands of floating-point multiplications across GPU clusters drawing kilowatts of power. The roadmap for making this cheaper is essentially a fabrication problem: denser chips, larger fabs, hoping that some analogue of Dennard scaling re-emerges in a new material or architecture. That is a legitimate roadmap. It is also one controlled by a handful of organizations with capital bases that dwarf most research institutions.</p><p>Project Ripple starts from a different question. Not: how do we make the current substrate faster? But: is the substrate assumption itself correct?</p><p><strong>What Wave Physics Actually Offers</strong></p><p>When waves meet in a medium — optical, acoustic, electromagnetic — they interfere. Constructive interference amplifies. Destructive interference cancels. The resulting pattern is a deterministic function of both inputs, governed by the wave equation of the medium.</p><p>This is worth being precise about: wave interference efficiently implements certain linear transforms — it is not matrix multiplication in general, and it is not a neuron. It operates under specific assumptions about coherence, linearity, and the geometry of the medium. Physicists and applied mathematicians will rightly hold you to that distinction, and it is an important one.</p><p>Within those constraints, however, something remarkable is true. The class of linear transforms that wave propagation naturally implements — Fourier transforms, convolutions, spatial correlations — is exactly the class of operations that dominates the computational cost of modern neural networks. And wave propagation computes these transforms passively, at the speed of light or sound, in continuous space, without transistor switching, and without dynamic power consumption for the operation itself.</p><p>This is the core observation behind a growing body of serious work: diffractive neural networks, neuromorphic photonics, physical reservoir computing. Researchers at MIT, UCLA, Caltech, Oxford, and EPFL have published rigorous results demonstrating that physical structures — diffractive metasurface arrays, waveguide networks, acoustic metamaterials — can implement learned transformations as wave propagation through matter. The computation is not running on the hardware. The computation is the hardware. The result emerges at the output plane the moment a signal enters the input plane.</p><p>For structured inference tasks over sensory data — images, audio, radar, RF signals — the theoretical efficiency advantage over electronic alternatives is not marginal. It is architectural. The question is whether it survives contact with real engineering constraints.</p><p><strong>The Training Problem Is the Real Problem</strong></p><p>Most public discussion of wave-physics AI focuses on inference. That is the wrong place to focus.</p><p>Inference is the easy part. If you have a physical system whose wave dynamics implement a useful transformation, you can demonstrate that it works. The hard part is getting the physical system to implement the transformation you actually want — which means training.</p><p>Training a neural network requires backpropagation: computing gradients of a loss function with respect to every parameter in the network, layer by layer, via the chain rule. This requires the forward pass to be differentiable. Software neural networks satisfy this trivially — every operation is a differentiable function in a computational graph. Physical wave propagation does not. You cannot compute a gradient with respect to the refractive index of a fabricated metamaterial element by calling .backward().</p><p>The current approach in most published work is to train a differentiable simulation of the physical system, optimize parameters in simulation, and then transfer those parameters to fabricated hardware. This works. It also inherits every sim-to-real gap that has troubled robotics, control theory, and physical AI for decades — fabrication tolerances, material imperfections, coherence degradation, thermal drift. The gap between simulated performance and deployed performance is where most demonstrations quietly underperform their published results.</p><p>There are more principled alternatives. Adjoint methods compute gradients through physical systems by solving a related wave problem in reverse — elegant mathematically, expensive experimentally. Equilibrium propagation reformulates learning as a relaxation process that physical systems with the right energy structure can perform natively. Perturbation-based methods estimate gradients through small physical perturbations of parameters, without ever computing a derivative analytically.</p><p>These are not peripheral techniques. They represent a genuine reframing of what learning means.</p><p>The central question is no longer how to build a physical neural network. It is whether physical systems possess native optimization dynamics that can replace digital gradient descent.</p><p>That question is not primarily about photonics. It is about the foundations of optimization — and it should interest anyone in machine learning seriously, regardless of whether they care about waves.</p><p><strong>What Project Ripple Is Investigating</strong></p><p>We are working on three questions, in order of tractability:</p><p><strong>Where does the wave-computation analogy hold, and where does it break?</strong></p><p>Demonstrations of diffractive neural networks have been, with some notable exceptions, proofs of concept. Simple classification tasks in controlled conditions. The scientific question that matters is what happens at the boundary: how do coherence constraints, fabrication tolerances, and the absence of native nonlinearity degrade performance as task complexity increases? Understanding failure modes carefully is prerequisite to knowing whether the approach has a real engineering future or is permanently limited to narrow demonstration cases.</p><p><strong>What is the practical training path when the forward pass is physical?</strong></p><p>We are investigating whether equilibrium propagation and perturbation-based gradient estimation are viable for the physical substrates we’re working with — specifically, whether the signal-to-noise characteristics of physical perturbation measurements are compatible with the gradient accuracy that useful learning requires. This is an empirical question. The theoretical arguments are promising. Whether they hold at the precision required for real tasks is not yet known.</p><p><strong>Can acoustic wave media serve as a productive research platform?</strong></p><p>Optical implementations require fabrication at nanometer scales — cleanrooms, electron-beam lithography, facilities inaccessible to most research groups. Acoustic metamaterials operate at millimeter to centimeter scales, fabricatable with equipment available to a much broader set of institutions. The computational speed advantage is smaller — sound is not light — but for low-power edge inference on audio and RF signals, acoustic wave networks may be the more practically accessible path. We are beginning here, not because it is the ultimate destination, but because it is where honest empirical work can start.</p><p><strong>The Deeper Question Underneath</strong></p><p>There is a research vision beneath these specific investigations that is worth stating explicitly, because it is what gives the work its direction.</p><p>Modern AI treats physics as the hardware beneath computation. The field has become extraordinarily good at designing software that runs efficiently on physical substrates — but the substrate itself is treated as inert, as infrastructure, as the thing you buy from TSMC or NVIDIA.</p><p>Project Ripple is asking whether that relationship can be inverted.</p><p>Not just: can waves perform inference efficiently?</p><p>But: can the dynamics of physical matter perform learning? Can optimization emerge from the physics of a system rather than from a gradient descent algorithm running on digital hardware above it?</p><p>This is a question that reaches beyond a single implementation. It connects to long-standing work in thermodynamic computing, physical reservoir computing, and the statistical mechanics of learning systems. It also connects to something philosophically prior: the question of what computation is, and whether the boundary between physical process and mathematical operation is as clear as von Neumann architecture has led us to assume.</p><p>We don’t know the answer. But we think it is the right question to be asking.</p><p><strong>Why This Research Makes Sense From Where We Sit</strong></p><p>Sirraya Labs is based in Kashmir. We do not have access to GPU clusters at scale. We are not going to compete in a race decided primarily by capital and fabrication capacity.</p><p>That is a straightforward fact. It shapes research priorities honestly.</p><p>Wave-physics computation is one of the few areas in AI where the fundamental advantage — if it materializes — comes from the physics, not from scale. A correctly designed and fabricated diffractive network does not become less accurate because it is running at a smaller institution. The wave equation is the same everywhere.</p><p>The physics doesn’t care about institutional prestige.</p><p>There is also an intellectual reason to work at this layer that has nothing to do with resource constraints. Most AI research today is empirical in a specific sense: architectures are tested, results are compared, the better one is adopted, and the theoretical account of why follows later — sometimes much later. That methodology has produced remarkable results. It also leaves a great deal unknown about why things work, under what conditions they fail, and what the fundamental limits are.</p><p>Working at the level of physical substrates forces you back to first principles. The design space is constrained by Maxwell’s equations and the acoustic wave equation. There is no additional scale to appeal to when the physics doesn’t cooperate. Failure is informative in a way that benchmark underperformance often isn’t.</p><p><strong>What We Expect, and What We Don’t Know</strong></p><p>We expect wave-based inference to be genuinely competitive with electronic approaches for signal-domain tasks where the input is already a wave-domain signal — audio, radar, RF classification. In these cases, converting to digital, running through an electronic network, and converting back is architecturally wasteful in ways that become significant at the edge. There is a real efficiency argument here that does not depend on ambitious extrapolation.</p><p>We expect the training problem to be harder than existing literature suggests. Sim-to-real gaps are underreported. Fabrication tolerances matter more than demonstrations typically acknowledge. We intend to characterize these gaps specifically rather than optimize around them quietly.</p><p>We do not know whether there is a path to general-purpose wave-based AI that competes with transformer-scale models on language or reasoning tasks. Our prior is that there is not — at least not with current physical substrates. But we would rather determine that empirically than assume it.</p><p>We do not know whether native physical optimization dynamics are practically exploitable, or whether the noise floor of physical perturbation measurements makes gradient estimation too unreliable for real learning tasks. That is the most important open question in the work, and the one we are least certain about.</p><p><strong>A Note on How We Will Report This</strong></p><p>We will publish what we find, including negative results.</p><p>The field has a well-documented publication bias toward positive demonstrations. Wave-physics AI is accumulating a body of work that tends to emphasize what the approach can do under ideal conditions, and underemphasizes what happens when conditions are not ideal. We think that gap is a problem — not because the positive results are wrong, but because they create a misleading picture of the distance between demonstrated capability and deployable technology.</p><p>If acoustic metamaterials turn out to be inadequate for our target applications, we will write about that specifically. If the training problem proves intractable with the methods we’re exploring, we will characterize where the approach failed and why. If the central premise of Project Ripple turns out to be wrong in some important way, that will be the most valuable thing we can report.</p><p>The name is deliberate. A ripple is what remains after a wave has passed through a medium — small, persistent, traceable back to its source. That is what this work should be: not a wave of announcements, but something you can follow back to the physics.</p><p><em>Amir Hameed Mir is the Founder and Principal Investigator at Sirraya Labs, a research lab based in Kashmir working on frontier AI, decentralized identity, and quantum-resistant systems. Project Ripple is an active research thread. Work will be published as it progresses, including results that don’t go as planned.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3ceb215159fb" width="1" height="1" alt=""><hr><p><a href="https://blog.stackademic.com/project-ripple-why-were-betting-on-wave-physics-as-the-next-substrate-for-ai-3ceb215159fb">Project Ripple: Why We’re Betting on Wave Physics as the Next Substrate for AI</a> was originally published in <a href="https://blog.stackademic.com/">Stackademic</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Open Standards Are Broken for the AI Age. Here’s How We Fix Them.]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://blog.stackademic.com/open-standards-are-broken-for-the-ai-age-heres-how-we-fix-them-ee4cc0db7f70?source=rss-aef5251658a7------2"><img src="https://cdn-images-1.medium.com/max/1280/1*HPiPhv0p3d7t5LB2IvOFJw.jpeg" width="1280"></a></p><p class="medium-feed-snippet">The framework that defined &#x201C;open&#x201D; for 20 years needs four new principles. Amir Hameed Mir explains why.</p><p class="medium-feed-link"><a href="https://blog.stackademic.com/open-standards-are-broken-for-the-ai-age-heres-how-we-fix-them-ee4cc0db7f70?source=rss-aef5251658a7------2">Continue reading on Stackademic »</a></p></div>]]></description>
            <link>https://blog.stackademic.com/open-standards-are-broken-for-the-ai-age-heres-how-we-fix-them-ee4cc0db7f70?source=rss-aef5251658a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/ee4cc0db7f70</guid>
            <category><![CDATA[data-governance]]></category>
            <category><![CDATA[interoperability]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[krechmer-framework]]></category>
            <category><![CDATA[open-standards]]></category>
            <dc:creator><![CDATA[Aamir Hameed]]></dc:creator>
            <pubDate>Mon, 18 May 2026 06:29:28 GMT</pubDate>
            <atom:updated>2026-05-18T06:29:28.611Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Building a DID-Native Network Stack in Rust: How UDNA Phase 2 Works]]></title>
            <link>https://medium.com/writingsofaamirhameed-com/building-a-did-native-network-stack-in-rust-how-udna-phase-2-works-3ce8d9f9fa07?source=rss-aef5251658a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/3ce8d9f9fa07</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[communication]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[blockchain]]></category>
            <dc:creator><![CDATA[Aamir Hameed]]></dc:creator>
            <pubDate>Wed, 06 May 2026 08:31:28 GMT</pubDate>
            <atom:updated>2026-05-06T08:32:14.982Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0bcWaRfRbv2eBSNdgnV0fA.png" /></figure><p><em>What happens when you replace IP addresses with cryptographic identities at the protocol level? We built it to find out.</em></p><p>There is a persistent tension at the heart of internet networking. The protocols that move packets across the world — IP, TCP, UDP — were designed around the concept of <em>location</em>. An IP address tells you where a machine is, not who it is. Identity was always an afterthought, bolted on top by TLS certificates, DNS, and a patchwork of PKI infrastructure that has spent decades accumulating trust anchors, revocation lists, and certificate authorities that themselves become targets.</p><p>UDNA — Universal DID-Native Addressing — is an experiment in what a network stack looks like if you flip that assumption from the start. Instead of addressing packets to locations that happen to have identities associated with them, UDNA addresses packets directly to cryptographic identities. A Decentralized Identifier, or DID, takes the place of an IP address as the first-class addressing primitive. Routing, encryption, authentication, and replay protection are all derived from the same identity substrate rather than assembled from separate systems.</p><p>Phase 2 of UDNA is the production-hardened implementation of this idea: a complete overlay network written in Rust, built on #![forbid(unsafe_code)], with Ed25519 signatures, XChaCha20-Poly1305 end-to-end encryption, X25519 forward secrecy, a Kademlia-style DHT for endpoint discovery, fragmentation and reassembly, sliding-window replay protection, and a full telemetry layer. This post walks through how it all fits together.</p><h3>The Core Idea: DIDs as First-Class Addresses</h3><p>A Decentralized Identifier is a URI that looks like this:</p><pre>did:key:z6MkrJVnaZkeFzdQyMZu1cgjg7k1bZZw7pf9c7Dg5bKBz5tP</pre><p>It has three parts: the did: scheme, a <em>method</em> (here, key), and a method-specific identifier. The method defines how the DID is resolved — how you go from the string to a document that contains public keys, service endpoints, and other metadata. The key method encodes the public key directly in the identifier itself. Other methods like web, ion, or peer resolve against a web endpoint, a blockchain, or a local store respectively.</p><p>In UDNA, every participant in the network has a DID. When Alice wants to send a packet to Bob, she doesn’t look up Bob’s IP address — she uses Bob’s DID as the destination. The protocol stack handles the rest: resolving the DID to a document, extracting the right public key for encryption, finding a transport endpoint via the DHT, and assembling a packet that is simultaneously routable, authenticated, and encrypted by construction.</p><p>The Did type in the implementation validates the structure at parse time and precomputes a BLAKE3 fingerprint used as the DHT routing key:</p><p>rust</p><pre>pub fn fingerprint(&amp;self) -&gt; [u8; HASH_SIZE] {<br>    blake3_hash(self.full.as_bytes())<br>}</pre><p>This fingerprint is a 256-bit hash of the full DID string. It serves the same role as a node ID in Kademlia — it positions the identity in the DHT keyspace and determines which nodes are “close” for routing purposes.</p><h3>The Packet Format</h3><p>Every UDNA packet has a fixed 12-byte header followed by variable-length fields:</p><pre>Version  (1 byte)<br>Flags    (1 byte)<br>SrcDIDLen (2 bytes, big-endian)<br>DstDIDLen (2 bytes, big-endian)<br>ExtLen   (2 bytes, big-endian)<br>Nonce    (4 bytes, big-endian)</pre><p>After the fixed header: the source DID bytes, the destination DID bytes, the extensions block, and then a 4-byte payload length followed by the payload itself.</p><p>The flags byte packs six independent boolean capabilities into a single octet: ENCRYPTED, REQUIRES_ACK, FRAGMENTED, HAS_ROUTE_HINTS, HAS_SIGNATURE, and HAS_ENCRYPTION. Most of these appear in combination — an encrypted and signed unicast packet will have ENCRYPTED | HAS_SIGNATURE | HAS_ENCRYPTION set simultaneously.</p><p>The extensions block is a TLV (type-length-value) sequence. Each extension carries a 1-byte type tag, a 2-byte big-endian length, and its payload. The 2-byte length field is important: extensions like the encryption envelope can exceed 255 bytes (a 32-byte ephemeral public key, a 24-byte nonce, and a variable-length ciphertext that grows with the payload), so a single byte is not sufficient.</p><p>Defined extension types include:</p><ul><li><strong>RouteHint</strong> — a suggested intermediate DID for onion-style routing</li><li><strong>Timestamp</strong> — an 8-byte Unix timestamp for cross-session replay protection</li><li><strong>FragmentIndex</strong> — fragment number and total count for reassembly</li><li><strong>FragmentationId</strong> — a 32-bit ID shared across all fragments of the same message</li><li><strong>Ttl</strong> — hop count for broadcast packets</li><li><strong>Signature</strong> — a 64-byte Ed25519 signature over the packet</li><li><strong>KeyHint</strong> — identifies which verification method from the DID document to use</li><li><strong>EncryptionEnvelope</strong> — ephemeral X25519 public key, XChaCha20-Poly1305 nonce, and AEAD ciphertext</li></ul><h3>Identity and Key Management</h3><p>Each UDNA node holds two independent key pairs. The first is an Ed25519 signing key, used to authenticate packets. The second is an X25519 static key pair, used for Diffie-Hellman key agreement during encryption. These are deliberately separate: signing and encryption involve different mathematical structures and different trust assumptions, and conflating them creates subtle vulnerabilities.</p><p>The SecureSigningKey type wraps ed25519-dalek&#39;s SigningKey, which uses the well-audited Ristretto group implementation. Key generation draws from the OS entropy pool via getrandom:</p><p>rust</p><pre>pub fn generate() -&gt; Self {<br>    let mut rng = SystemRandom;<br>    let mut seed = [0u8; 32];<br>    rng.fill_bytes(&amp;mut seed);<br>    Self { inner: SigningKey::from_bytes(&amp;seed) }<br>}</pre><p>The X25519StaticSecret type handles the static identity key for ECDH. When generating it, the implementation applies the X25519 clamping specified in RFC 7748 — clearing the three low bits of the first byte and the high bit of the last byte, setting the second-highest bit of the last byte. This clamping ensures the scalar multiplication always produces a point in the correct subgroup:</p><p>rust</p><pre>bytes[0] &amp;= 248;<br>bytes[31] &amp;= 127;<br>bytes[31] |= 64;</pre><h3>End-to-End Encryption with Forward Secrecy</h3><p>When Alice sends an encrypted packet to Bob, the protocol performs an X25519 Diffie-Hellman key exchange with forward secrecy. The key insight is that Alice generates a fresh ephemeral keypair for <em>each packet</em> — she never reuses the same DH values. This means that even if Alice’s static secret key is later compromised, an attacker cannot retroactively decrypt past packets because the ephemeral private key used for each session is gone.</p><p>The encryption sequence in EncryptionEnvelope::encrypt:</p><ol><li>Generate an ephemeral X25519 key pair using OS entropy</li><li>Perform DH: shared_secret = DH(ephemeral_private, bob_static_public)</li><li>Derive a session key: session_key = BLAKE3-KDF(&quot;UDNA-ENC-V2&quot;, shared_secret)</li><li>Generate a random 192-bit nonce</li><li>Encrypt with XChaCha20-Poly1305: ciphertext = AEAD(session_key, nonce, plaintext)</li><li>Transmit the ephemeral public key, nonce, and ciphertext in the extension block</li></ol><p>The BLAKE3 KDF step is important. The raw DH output has structure — it is a point on Curve25519 — and using it directly as a symmetric key can leak information. The KDF mixes in a domain separation string (&quot;UDNA-ENC-V2&quot;) and produces a uniform 256-bit key.</p><p>Decryption on Bob’s side reconstructs the shared secret using his static private key and the ephemeral public key from the extension:</p><pre>shared_secret = DH(bob_static_private, ephemeral_public)<br>session_key   = BLAKE3-KDF(&quot;UDNA-ENC-V2&quot;, shared_secret)<br>plaintext     = AEAD-Decrypt(session_key, nonce, ciphertext)</pre><p>The XChaCha20-Poly1305 AEAD provides both confidentiality and integrity. The Poly1305 authentication tag (16 bytes appended to the ciphertext) means any tampering with the ciphertext will cause decryption to fail with an authentication error rather than silently producing corrupted plaintext. This is the DecryptionFailed error path.</p><h3>Packet Authentication</h3><p>Every packet sent through a UdnaNode carries an Ed25519 signature over a canonical signing payload. The signing payload is carefully constructed to be deterministic and unambiguous: it includes the version, flags (with HAS_SIGNATURE stripped out so the flag doesn&#39;t create a circular dependency), the DID lengths, the extensions block (excluding the Signature extension itself), the nonce, both DIDs, and the payload.</p><p>rust</p><pre>pub fn signing_payload(&amp;self) -&gt; Vec&lt;u8&gt; {<br>    let canonical_flags = self.flags.without(PacketFlags::HAS_SIGNATURE);<br>    // ... assemble version, canonical_flags, lengths, ext_block, nonce, DIDs, payload<br>}</pre><p>Stripping HAS_SIGNATURE from the flags before signing is subtle but essential. If you sign the flags as-is with HAS_SIGNATURE set, the signature covers a bit that only exists <em>because</em> a signature is being added — it creates a chicken-and-egg problem during verification. Stripping it means the signing payload represents &quot;the packet that would exist without its signature&quot;, which is stable.</p><p>On the receiving side, the verifier resolves the source DID to a DID Document, finds the verification method indicated by the KeyHint extension (defaulting to #key-1), checks that the DID is not deactivated, and verifies the Ed25519 signature against the same canonical payload.</p><p>The sign method always adds the KeyHint extension <em>before</em> computing the signing payload, so the hint itself is covered by the signature and cannot be tampered with in transit.</p><h3>DID Documents and Resolution</h3><p>A DID Document is the data structure that makes a DID useful. It contains:</p><ul><li><strong>Verification methods</strong> — public keys for signature verification, identified by fragment (e.g. #key-1)</li><li><strong>Key agreement methods</strong> — public keys for ECDH encryption (e.g. #enc-1)</li><li>A <strong>deactivated</strong> flag that allows a DID to be retired</li></ul><p>In the UDNA Phase 2 implementation, the InMemoryDidResolver serves as a local registry. In production, this would be backed by a DHT lookup, a blockchain query, or an HTTP fetch depending on the DID method. The resolver interface is a simple trait:</p><p>rust</p><pre>pub trait DidResolver: Send + Sync {<br>    fn resolve(&amp;self, did: &amp;Did) -&gt; UdnaResult&lt;DidDocument&gt;;<br>}</pre><p>The separation between the DID resolution interface and its implementation means the same cryptographic logic works regardless of whether identities are stored locally, on-chain, or distributed across a peer-to-peer network.</p><h3>The DHT Overlay and Endpoint Discovery</h3><p>Knowing Bob’s DID is necessary but not sufficient to send him a packet — you also need to know how to reach him at the transport layer. UDNA solves this with a Kademlia-style DHT where nodes announce signed EndpointDescriptor records.</p><p>An EndpointDescriptor contains the DID being announced, a list of transport endpoints (tcp://203.0.113.1:9000, udp://203.0.113.1:9000, etc.), a timestamp, a TTL, and an Ed25519 signature. The signing payload covers the DID, all endpoints, the timestamp, and the TTL — if any of these change, the signature is invalid and the record is rejected.</p><p>The DHT key is the BLAKE3 fingerprint of the DID string. This means that finding the nodes responsible for a given DID’s endpoint record is a pure keyspace lookup — no DNS, no centralized registry, no trusted third party.</p><p>rust</p><pre>pub fn announce(&amp;mut self, descriptor: EndpointDescriptor) {<br>    let key = descriptor.did.fingerprint();<br>    self.storage.insert(key, descriptor);<br>}</pre><p>Records expire automatically based on their TTL, and the cleanup method purges expired entries during the node&#39;s periodic maintenance tick. In the Phase 2 demonstration, Alice announces endpoints for both herself and Bob at startup, then performs a lookup to retrieve Bob&#39;s transport addresses before sending.</p><h3>Addressing Modes</h3><p>UDNA supports four distinct addressing modes, each serving a different communication pattern:</p><p><strong>Unicast</strong> is the standard one-to-one delivery mode. Source and destination DIDs are both present, and the packet is routed to a specific peer. This is what Alice uses when sending an encrypted message to Bob.</p><p><strong>Anycast</strong> delivers a packet to <em>any</em> node that provides a given service. The destination is a service DID rather than a peer DID, and the REQUIRES_ACK flag signals that the sender expects a response. This is used for service discovery — if you want a weather report, you send to did:service:weather and whichever weather node responds first wins. The addressing mode is inferred from the packet header: if a destination DID is present and REQUIRES_ACK is set, it&#39;s anycast.</p><p><strong>Broadcast</strong> delivers to all reachable nodes. The destination is did:broadcast:all, and a TTL extension limits propagation to a fixed number of hops. This is appropriate for network-wide announcements — maintenance windows, topology changes, emergency alerts.</p><p><strong>Anonymous</strong> is used when the sender wants to omit their identity. Source DID length is zero; the packet cannot be replied to but the payload can still be encrypted for the destination.</p><p>The AddressingMode enum is derived from the packet header at decode time rather than stored explicitly — it&#39;s a pure function of which DIDs are present and which flags are set.</p><h3>Fragmentation and Reassembly</h3><p>IP has a maximum transmission unit (MTU). UDNA imposes its own practical limit — MAX_PACKET_SIZE = 1400 bytes — to fit comfortably within typical network MTUs. Large payloads are fragmented before transmission and reassembled at the destination.</p><p>The fragmentation scheme works as follows. When send_to is called with a payload that would produce an oversized packet, the payload is split into chunks. Each chunk becomes a separate UdnaPacket with:</p><ul><li>Its own unique nonce (for replay protection — fragments sharing a nonce would be dropped as duplicates)</li><li>A FragmentIndex extension indicating its position and the total count</li><li>A FragmentationId extension carrying the shared ID that groups all fragments of the same message</li></ul><p>Each fragment is independently encrypted and signed before transmission. This means the receiver can authenticate each fragment as it arrives rather than waiting for the full message, and a tampered fragment is detected immediately.</p><p>On the receiving side, the FragmentBuffer maintains a BTreeMap keyed by (source_did, fragmentation_id). As fragments arrive, they are stored in order. When the last fragment completes the set, the buffer concatenates them in index order and returns the complete payload. The whole operation is bounded by a 30-second timeout — if not all fragments arrive within the window, the partial assembly is discarded.</p><p>rust</p><pre>pub fn insert(&amp;mut self, source: &amp;Did, frag_id: u32, fragment_number: u16,<br>              total_fragments: u16, data: Vec&lt;u8&gt;, now: u64) -&gt; UdnaResult&lt;Option&lt;Vec&lt;u8&gt;&gt;&gt;</pre><p>The return type — UdnaResult&lt;Option&lt;Vec&lt;u8&gt;&gt;&gt; — elegantly captures three states: Ok(None) means the fragment was stored and reassembly is ongoing, Ok(Some(payload)) means reassembly is complete, and Err(...) means a timeout or internal error.</p><h3>Replay Protection</h3><p>Replay attacks are a fundamental threat to any authenticated protocol. If an attacker captures a valid authenticated packet and retransmits it later, the receiver should reject it — even though the signature is valid. UDNA uses a sliding window nonce tracker to make this guarantee.</p><p>Each packet carries a 32-bit nonce. The NonceTracker maintains a map from (source_did, dest_did) pairs to a window state: the highest nonce seen so far, and a 64-bit bitmap representing which of the 64 nonces below the highest have been seen.</p><p>When a new nonce arrives:</p><ul><li>If it’s higher than the current maximum, the window shifts forward, the new nonce is marked as seen, and the maximum is updated</li><li>If it’s within the window, the bitmap is checked — if already set, the packet is a replay and is dropped</li><li>If it’s below the window entirely, it’s too old and is dropped regardless</li></ul><p>This is essentially the QUIC/DTLS sliding window algorithm, adapted for DID-keyed sessions. The window size is 4096 nonces, which provides strong replay protection while accommodating out-of-order delivery.</p><p>The replay drop is silent — the receiver increments its dropped_replay counter and returns Ok(None) rather than an error. This prevents an attacker from learning whether their replay was detected.</p><h3>Node Architecture and the Processing Pipeline</h3><p>The UdnaNode struct is the top-level abstraction that ties all the subsystems together. It holds a DID, a signing key, an encryption key, a DHT node, a nonce tracker, a fragment buffer, a DID resolver, a clock, and a statistics counter.</p><p>When a packet arrives at receive, it passes through a strict four-stage pipeline:</p><ol><li><strong>Decode</strong> — parse the binary wire format into a UdnaPacket</li><li><strong>Replay check</strong> — consult the nonce tracker; drop silently if replayed</li><li><strong>Signature verification</strong> — if HAS_SIGNATURE is set, resolve the source DID and verify the Ed25519 signature</li><li><strong>Decryption</strong> — if ENCRYPTED is set, use the encryption envelope to recover the plaintext</li><li><strong>Fragment reassembly</strong> — if FRAGMENTED is set, store the fragment and return None until complete</li></ol><p>The ordering matters. Replay protection runs before signature verification because the nonce check is cheap (a bitmap lookup) while DID resolution can be expensive. Signature verification runs before decryption because there is no point decrypting a packet that cannot be authenticated. The pipeline fails fast and cheaply.</p><p>Outbound packets follow the reverse preparation: encrypt first, then sign. Signing last means the signature covers the encrypted payload and the encryption envelope, so the receiver can verify both authenticity and integrity before spending cycles on decryption.</p><h3>The Cryptographic Stack</h3><p>A deliberate choice was made to build on a small set of well-audited, modern primitives rather than a general-purpose cryptographic library:</p><p><strong>BLAKE3</strong> for all hashing. It serves as the DHT key derivation function, the ECDH KDF, and content addressing throughout the stack. BLAKE3 is significantly faster than SHA-2 or SHA-3 on modern hardware and has a clean streaming API. The KDF mode (Hasher::new_derive_key) provides domain separation, preventing a hash computed in one context from being used in another.</p><p><strong>Ed25519</strong> (via ed25519-dalek) for all signatures. Ed25519 is a Schnorr signature scheme over the Edwards25519 curve. It offers strong security, fast verification, small keys (32 bytes) and signatures (64 bytes), and — importantly — no random number generation required at signing time. This eliminates an entire class of nonce-reuse vulnerabilities that plague ECDSA implementations.</p><p><strong>X25519</strong> (via x25519-dalek) for key agreement. X25519 is Diffie-Hellman over Curve25519, the same curve underlying Ed25519. Using the same curve family for both operations simplifies the dependency tree and shares the audit pedigree.</p><p><strong>XChaCha20-Poly1305</strong> for AEAD encryption. The “X” prefix indicates the extended nonce variant with 192-bit nonces rather than the 96-bit nonces of standard ChaCha20-Poly1305. The extended nonce makes random nonce generation safe even over billions of messages — the collision probability for randomly-sampled 192-bit nonces is negligible.</p><p>The entire stack carries #![forbid(unsafe_code)], preventing any unsafe blocks from being introduced anywhere in the codebase. All buffer accesses are bounds-checked by the compiler, all cryptographic operations use constant-time implementations from the underlying libraries, and there are no panics on malformed input — errors propagate through the UdnaResult&lt;T&gt; type instead.</p><h3>What the Phase 2 Demonstration Shows</h3><p>The end-to-end demonstration exercises the full stack across ten scenarios:</p><p><strong>Identity creation</strong> — three DIDs are parsed and fingerprinted: Alice, Bob, and a weather service. The BLAKE3 fingerprints are deterministic — the same DID always maps to the same 256-bit keyspace position.</p><p><strong>DID Document publishing</strong> — signing and encryption keys are registered for each identity. The resolver maps each DID string to its document.</p><p><strong>Node initialization</strong> — two UdnaNode instances are created, each with their own signing key, encryption key, and a reference to the shared resolver.</p><p><strong>DHT announcement</strong> — Alice and Bob publish signed EndpointDescriptor records. Alice performs a DHT lookup for Bob&#39;s transport address, which succeeds and returns the correct endpoints with a valid unexpired TTL.</p><p><strong>Encrypted unicast</strong> — Alice sends “Hello Bob! Meeting at 3pm UTC. -Alice” to Bob’s DID. The 37-byte message is encrypted with X25519 + XChaCha20-Poly1305, signed with Ed25519, and transmitted as a 344-byte packet. Bob decrypts and verifies it, recovering the exact original message.</p><p><strong>Large file transfer</strong> — a 5,420-byte payload is fragmented into 7 packets (6 × 816 bytes + 1 × 636 bytes), each independently encrypted and signed. Bob’s fragment buffer reassembles them in order, recovering the complete payload.</p><p><strong>Anycast service query</strong> — Alice sends a weather query to did:service:weather, an encrypted unicast routed by service DID rather than peer DID.</p><p><strong>Replay attack prevention</strong> — Alice’s message is captured and replayed twice. Both replay attempts are silently dropped by Bob’s nonce tracker. The first delivery succeeds; neither replay does.</p><p><strong>Network broadcast</strong> — Alice sends a maintenance announcement to did:broadcast:all with a TTL of 5 hops. Bob receives and decodes the plaintext announcement correctly.</p><p><strong>Telemetry</strong> — after all operations, packets_sent and encrypted_sent are equal (every outbound packet was encrypted), dropped_replay is 2 (the two explicit replay attempts), dropped_signature is 0, and active_reassemblies is 0 (the fragment buffer was fully cleared).</p><h3>Where This Goes Next</h3><p>Phase 2 establishes the core protocol machinery. Several directions are natural extensions:</p><p><strong>Real DHT routing.</strong> The current implementation stores endpoint descriptors in a flat in-memory map. A full Kademlia implementation would distribute those records across the network, with the standard iterative closest-node lookup and the KADEMLIA_K = 20 bucket size already defined as a constant.</p><p><strong>Transport integration.</strong> UDNA packets are currently byte vectors — they need a carrier. The natural targets are QUIC (which provides its own congestion control and reliability) and raw UDP (for maximum flexibility). QUIC is particularly appealing because its connection IDs map naturally onto DID-keyed sessions.</p><p><strong>Multi-hop routing and onion paths.</strong> The RouteHint extension type already exists for specifying intermediate nodes. A full implementation would allow Alice to route a packet through Carol before it reaches Bob, with each hop peeling one layer of encryption — similar to how Tor operates, but over the DID namespace.</p><p><strong>DID method diversity.</strong> The current demonstrations use did:key, which encodes the public key directly in the DID string. Adding support for did:web (keys resolved from a well-known HTTPS endpoint) and did:ion (keys anchored to the Bitcoin blockchain) would allow the same protocol to operate across different trust models.</p><p><strong>Key rotation and revocation.</strong> DID Documents support multiple verification methods and have a deactivation flag, both of which are already handled in the signature verification path. The infrastructure for key rotation exists; the higher-level logic for managing key lifecycles — generating new keys, publishing updated documents, revoking old ones — is the next layer to build.</p><p>The fundamental insight behind UDNA is simple: if you make identity the foundation of your network stack rather than an overlay on top of it, you get authentication and encryption for free, as structural properties of addressing rather than optional features. The complexity budget that normally goes into certificate chains, hostname verification, and session negotiation is redirected into building a richer, more capable packet model. Phase 2 is proof that the full stack — crypto, routing, fragmentation, replay protection, telemetry — fits comfortably in a single Rust file with no unsafe code and a clean, auditable design.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3ce8d9f9fa07" width="1" height="1" alt=""><hr><p><a href="https://medium.com/writingsofaamirhameed-com/building-a-did-native-network-stack-in-rust-how-udna-phase-2-works-3ce8d9f9fa07">Building a DID-Native Network Stack in Rust: How UDNA Phase 2 Works</a> was originally published in <a href="https://medium.com/writingsofaamirhameed-com">Sirraya Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Trust Isn’t Forever: Why Digital Credentials Need to Fade]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/writingsofaamirhameed-com/trust-isnt-forever-why-digital-credentials-need-to-fade-6b95fa1c168c?source=rss-aef5251658a7------2"><img src="https://cdn-images-1.medium.com/max/1120/1*b92XBSaOl6mr0uTnVsU_yA.jpeg" width="1120"></a></p><p class="medium-feed-snippet">Amir Hameed Mir &#x2014; Sirraya Labs</p><p class="medium-feed-link"><a href="https://medium.com/writingsofaamirhameed-com/trust-isnt-forever-why-digital-credentials-need-to-fade-6b95fa1c168c?source=rss-aef5251658a7------2">Continue reading on Sirraya Labs »</a></p></div>]]></description>
            <link>https://medium.com/writingsofaamirhameed-com/trust-isnt-forever-why-digital-credentials-need-to-fade-6b95fa1c168c?source=rss-aef5251658a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b95fa1c168c</guid>
            <category><![CDATA[trust-wallet]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[decentralization]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[privacy]]></category>
            <dc:creator><![CDATA[Aamir Hameed]]></dc:creator>
            <pubDate>Wed, 01 Apr 2026 16:45:41 GMT</pubDate>
            <atom:updated>2026-04-01T16:45:41.757Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Building Post-Quantum Identity: A Complete Implementation of ML-DSA-87 from FIPS 204The Quantum…]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/writingsofaamirhameed-com/building-post-quantum-identity-a-complete-implementation-of-ml-dsa-87-from-fips-204the-quantum-e55b48af7e69?source=rss-aef5251658a7------2"><img src="https://cdn-images-1.medium.com/max/1920/1*uJ_Sczn0dTxPRl_VYUjTzA.jpeg" width="1920"></a></p><p class="medium-feed-snippet">By 2030, experts predict quantum computers capable of breaking RSA and ECC encryption will exist. Every digital signature, every secure&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/writingsofaamirhameed-com/building-post-quantum-identity-a-complete-implementation-of-ml-dsa-87-from-fips-204the-quantum-e55b48af7e69?source=rss-aef5251658a7------2">Continue reading on Sirraya Labs »</a></p></div>]]></description>
            <link>https://medium.com/writingsofaamirhameed-com/building-post-quantum-identity-a-complete-implementation-of-ml-dsa-87-from-fips-204the-quantum-e55b48af7e69?source=rss-aef5251658a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/e55b48af7e69</guid>
            <category><![CDATA[quantum-computing]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[post-quantum-cryptography]]></category>
            <category><![CDATA[decentralized-identity]]></category>
            <dc:creator><![CDATA[Aamir Hameed]]></dc:creator>
            <pubDate>Wed, 01 Apr 2026 16:41:49 GMT</pubDate>
            <atom:updated>2026-04-01T16:41:49.935Z</atom:updated>
        </item>
    </channel>
</rss>