<?xml version="1.0" encoding="UTF-8"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude"
     version="3" category="info"
     docName="draft-shuliak-sip-zero-egress-01" ipr="trust200902"
     submissionType="IETF" symRefs="true"
     sortRefs="true" tocInclude="true" tocDepth="3">
  <front>
    <title abbrev="SHULIAK SIP-1 Zero-Egress MCP">Shuliak Isolation Protocol (SIP-1): Zero-Egress Format-Preserving Cryptographic Pseudonymization, Information-Flow Control, and JSON-RPC 2.0 Firewalling for AI and MCP Transports</title>
    <author fullname="Dmitrii Shuliak" initials="D." surname="Shuliak">
      <organization>SHULIAK CORP</organization>
      <address>
        <postal>
          <street>17 Pirosmani Street</street>
          <city>Batumi</city>
          <code>6000</code>
          <country>Georgia</country>
        </postal>
        <email>hq@shuliak.dev</email>
        <uri>https://shuliak.dev</uri>
      </address>
    </author>
    <date year="2026" month="November" day="29"/>
    <area>Security</area>
    <workgroup>Network Working Group</workgroup>
    <keyword>MCP</keyword>
    <keyword>Zero-Egress</keyword>
    <keyword>FF1</keyword>
    <keyword>JSON-RPC</keyword>
    <abstract>
      <t>This document specifies the Shuliak Isolation Protocol (SIP-1, revision 3.1), a deterministic, zero-egress cryptographic firewall, format-preserving pseudonymization layer, and evidentiary audit protocol for autonomous Artificial Intelligence (AI) agents and Model Context Protocol (MCP) JSON-RPC 2.0 transports. SIP-1 interposes inline on local operating-system standard input/output (stdio) pipes with zero outbound network sockets.</t>
      <t>The protocol combines canonical JSON tool-schema pinning, stateless 10-round Feistel format-preserving encryption over arbitrary-precision integer domains (radix^n &gt;= 1,000,000), algebraic check-digit bijections, two-phase sentinel slot isolation, dynamic information-flow control (IFC) taint lattices with single-use Ed25519 execution warrants, and history-independent Cuckoo keyring crypto-shredding backed by Merkle tree inclusion and consistency proofs.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="intro">
      <name>Introduction and Local stdio Threat Model</name>
      <t>Autonomous coding agents and desktop Artificial Intelligence (AI) hosts invoke external tools over the Model Context Protocol (MCP) via JSON-RPC 2.0 frames. Remote HTTP servers pass through enterprise network firewalls, yet 33.4% of public MCP packages (15,785 of 47,267 cataloged servers as of October 2026) execute exclusively as child subprocesses over local operating-system standard input/output (stdio) pipes <xref target="ZENODO-SIP1"/>. Stdio opens zero network sockets.</t>
      <t>Cloud Data Loss Prevention (DLP) gateways and Cloud Access Security Brokers (CASB) cannot inspect unnamed kernel pipes between an IDE host and a local database, repository, or clinical record connector. As documented in <xref target="NSA-MCP"/>, baseline MCP transports omit mandatory mutual authentication and fine-grained authorization, allowing child processes to read plaintext secrets from local manifests and emit raw Personal Identifiable Information (PII) into remote language model prompts.</t>
      <t>Static redaction strings such as "[REDACTED]" corrupt downstream schema validators. Payment APIs reject non-Luhn card numbers; SEPA parsers reject broken ISO/IEC 7064 MOD 97-10 IBANs; multi-turn agent plans fail when distinct entities collapse into identical placeholders.</t>
      <t>SIP-1 (revision 3.1) enforces Split-Stream Context Rehydration inline on stdio without external servers. Outbound tool responses destined for cloud models carry format-valid synthetic twins, while authorized local tool calls rehydrate original values strictly from volatile process memory.</t>
    </section>
    <section anchor="conventions">
      <name>Conventions and Requirements Language</name>
      <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>", "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they appear in all capitals, as shown here.</t>
    </section>
    <section anchor="domains">
      <name>Canonicalization and Domain Separation</name>
      <t>Cross-platform signature verification fails whenever JSON serializers permute object keys or apply locale-dependent collation. All signed or hashed JSON objects in SIP-1 <bcp14>MUST</bcp14> be serialized under the JSON Canonicalization Scheme (JCS) <xref target="RFC8785"/> using raw UTF-16 code-unit sorting and IEEE 754 number formatting. Unpaired UTF-16 surrogates and non-finite numbers <bcp14>MUST</bcp14> be rejected prior to hashing.</t>
      <t>Binary digests and signatures <bcp14>MUST</bcp14> be encoded in unpadded base64url per Section 5 of <xref target="RFC4648"/> (43 characters for 32-byte SHA-256 digests and raw <xref target="RFC8032"/> Ed25519 public keys; 86 characters for 64-byte Ed25519 signatures). Every SHA-256 digest prepends a single domain byte: SHA-256([prefix] || payload). Every Ed25519 signature signs an explicit ASCII label terminated by a NUL byte: ASCII_LABEL || 0x00 || payload.</t>
      <table anchor="tbl-domains">
        <name>SIP-1 SHA-256 Domain-Separation Registry</name>
        <thead><tr><th>Prefix</th><th>Cryptographic Scope</th></tr></thead>
        <tbody>
          <tr><td>0x00</td><td>ISEP Event Skeleton (RFC 8785 JCS) &amp; Leaf</td></tr>
          <tr><td>0x01</td><td>Hash-Chain Link &amp; RFC 9162 Interior Node</td></tr>
          <tr><td>0x02</td><td>ISBL 512B-Padded Sidecar Blob Commitment</td></tr>
          <tr><td>0x03</td><td>GDPR Art. 17 Erasure Tombstone Witness</td></tr>
          <tr><td>0x04</td><td>Salted Slot Key-Destruction Commitment</td></tr>
          <tr><td>0x05</td><td>DSAR Cryptographic Erasure Receipt</td></tr>
          <tr><td>0x06</td><td>RFC 8785 Schema &amp; Runtime Tools Lock</td></tr>
          <tr><td>0x07</td><td>Stage 2 Normalized Tool Action Warrant</td></tr>
          <tr><td>0x08</td><td>CycloneDX 1.6 AIBOM Canonical Digest</td></tr>
          <tr><td>0x09</td><td>Sovereign Root License Token Envelope</td></tr>
          <tr><td>0x0A</td><td>Auditor Attestation Bundle Digest</td></tr>
          <tr><td>0x0B</td><td>RFC 9162 Merkle Inclusion/Consistency Proof</td></tr>
          <tr><td>0x0C</td><td>Domain Prefix Ci Receipt</td></tr>
          <tr><td>0x0D</td><td>Domain Prefix Mdm Policy</td></tr>
        </tbody>
      </table>
    </section>
    <section anchor="ff1">
      <name>Stateless FF1 Bijections and Slot Isolation</name>
      <t>Following algebraic attacks against FF3 and FF3-1 <xref target="BEYNE21"/>, NIST withdrew both modes in <xref target="NIST-FF1"/>. SIP-1 implementations <bcp14>MUST</bcp14> implement the 10-round Feistel mode FF1 over AES-256 exclusively and <bcp14>MUST NOT</bcp14> implement FF3 or FF3-1. All modular steps <bcp14>MUST</bcp14> execute over arbitrary-precision integers (BigInt) with minimum domain size radix^n &gt;= 1,000,000. Short strings where radix^n &lt; 1,000,000 <bcp14>MUST</bcp14> fall back to keyed HMAC-SHA256 scoped pseudonyms.</t>
      <t>Tweaks are derived per entity class via HMAC-SHA256("SIP1-FF1-v1" || domain || uint16BE(length) || prefix) truncated to 16 bytes. For ISO/IEC 7812 payment cards of length L &gt;= 13, SIP-1 preserves only the leading Major Industry Identifier (MII) digit, encrypts the interior L-2 digits (masking the issuer BIN body while keeping 10^(L-2) &gt;= 10^11 &gt; 10^6), and appends a freshly computed Luhn Modulo-10 digit. Inbound rehydration strips the synthetic check digit, applies FF1.Decrypt, and algebraically reconstructs the original Luhn digit with zero database state. Analogous bijections preserve ISO/IEC 7064 MOD 97-10 for SEPA IBANs (applying cycle-walking on radix-36 BBANs), ISO 3779 check characters at index 8 for VINs, and ICAO 9303 composite check digits for MRZs.</t>
      <t>Sequential regular expressions corrupt overlapping identifiers. SIP-1 prevents substring collisions via Two-Phase Sentinel Slot Isolation: Phase 1 captures matches in descending structural specificity into NUL-delimited inert slots (\x00SIP_SLOT_k\x00), and Phase 2 unwraps synthetic twins sorted by descending byte length. For OpenXML (.docx, .xlsx), OpenDocument (.odt), PDF FlateDecode text streams, HL7 v2 PID segments, and FHIR R4 resources, implementations <bcp14>SHOULD</bcp14> coalesce fragmented XML text runs inside each paragraph prior to Phase 1 capture.</t>
    </section>
    <section anchor="wire">
      <name>JSON-RPC 2.0 Wire Armor and IFC Taint Bus</name>
      <t>A compliant stdio proxy <bcp14>MUST</bcp14> parse newline-delimited JSON-RPC 2.0 frames through a state-machine key scanner that rejects duplicate JSON object keys, strips __proto__ and constructor.prototype keys, and drops downstream responses whose id does not match an inflight host request. Unsolicited server-to-client sampling/createMessage and elicitation/* requests <bcp14>MUST</bcp14> be rejected by default with JSON-RPC error codes -32011 or -32012. File URIs in resources/read <bcp14>MUST</bcp14> be URL-decoded, stripped of trailing dots and NTFS alternate data stream suffixes, resolved via OS realpath, and confined to declared workspace roots while blocking NAT64 (64:ff9b::/96) and link-local metadata IPs.</t>
      <t>On tools/list, Gate 1 computes the 0x06 JCS digest across tool name, title, description, inputSchema, outputSchema, and behavioral annotations, halting on unpinned schema drift or Unicode Plane-14 Tag (U+E0000..U+E007F) smuggling. On tools/call, Gate 2 classifies SQL, shell, and path arguments independently of untrusted readOnlyHint flags.</t>
      <t>To break multi-tool exfiltration chains formalized in <xref target="FIDES25"/>, SIP-1 maintains an HMAC-protected inter-process Information-Flow Control (IFC) state sharded by session scope. When untrusted external ingress coexists with unmasked private data, any subsequent mutating or external sink call <bcp14>MUST</bcp14> block unless accompanied by a single-use 0x07 <xref target="RFC8032"/> Ed25519 warrant bound to the exact JCS digest of {server, tool, args}.</t>
    </section>
    <section anchor="isep">
      <name>ISEP v3.0 Crypto-Shredding and Merkle Proofs</name>
      <t>Audit logs face a tension between immutability and statutory erasure (GDPR Article 17). The Immutable Shredding Evidentiary Protocol (ISEP v3.0) resolves this by encrypting per-subject audit payloads under 256-bit slot keys stored inside an encrypted Cuckoo hash keyring (ISEPKR03, 4 slots per 288-byte AES-256-GCM bucket) while chaining 0x00 JCS event skeletons via 0x01 hashes and 512-byte padded ISBL sidecars (0x02).</t>
      <t>Upon an erasure request, the custodian zeroizes the target slot key, rebuilds active Cuckoo buckets in canonical lexicographical order of 128-bit slot fingerprints (eliminating insertion-order history leakage), rotates both table and root wrapping keys, increments the 64-bit generation counter, and appends a signed tombstone (0x03..0x05). Log verifiers prove event inclusion and append-only consistency using Section 2.1 of <xref target="RFC9162"/> binary Merkle trees signed under prefix 0x0B, paired with 0x08 <xref target="CYCLONEDX"/> AI Bills of Materials (AIBOM) and 0x09/0x0A offline Ed25519 attestation bundles.</t>
    </section>
    <section anchor="security">
      <name>Security Considerations and Limitations</name>
      <t>SIP-1 mitigates local MCP command injection, post-approval tool-schema rug pulls, Unicode tag prompt smuggling, and cleartext PII leakage across stdio pipes. Ephemeral keys allocated outside pooled slabs are overwritten with CSPRNG bytes followed by zeros upon session teardown.</t>
      <t>Explicit Limitations and Residual Threat Surface: (1) Host OS Compromise: SIP-1 operates in user space; a local root or kernel attacker capable of reading /proc/$PID/mem can inspect volatile twin tables during an active session. (2) Domain Floor Bound: identifiers shorter than radix^n = 1,000,000 cannot use FF1 and receive non-format-preserving scoped HMAC tokens. (3) Unanchored Free-Form Prose: without probabilistic neural classifiers, Layer-1 automata guarantee deterministic capture on structured syntax, checksummed numbers, and anchored document headers, not arbitrary colloquial paraphrases. (4) Side-Channel Timing: runtime BigInt modular arithmetic in high-level VMs is not hardware constant-time against co-resident L1 cache attackers, though random per-session keys and local-only stdio framing prevent remote network timing oracles.</t>
    </section>
    <section anchor="abnf">
      <name>ABNF Token and Envelope Grammar</name>
      <t>Wire tokens and signed envelopes conform to Augmented Backus-Naur Form (ABNF) <xref target="RFC5234"/>:</t>
      <sourcecode><![CDATA[
; SIP-1 / ISEP v3.1 Wire & Token Grammar (RFC 5234)
b64u-char = ALPHA / DIGIT / "-" / "_"
b64u-43   = 43b64u-char        ; 32B SHA-256 / Ed25519
b64u-86   = 86b64u-char        ; 64B Ed25519 signature
dom-byte  = %x00-0D            ; Domain prefix byte
sign-env  = 1*VCHAR %x00 *OCTET ; Label || NUL || body
sip3-lic  = "SIP3." tier "." 1*b64u-char "." b64u-86
tier      = "PRO_SECOPS" / "COMPLIANCE" / "ENTERPRISE"
warrant   = "sipw3." 1*b64u-char "." b64u-86
twin-mail = "u-" 16HEXDIG "@twin.sip.invalid"
]]></sourcecode>
    </section>
    <section anchor="telemetry">
      <name>Reference Implementation Telemetry</name>
      <t>Table 2 reports single-core latencies measured on an aarch64 Linux kernel running Node.js v22.23.3 (@shuliak-corp/sip1-mcp v3.1.0, pure ECMAScript modules, 0 external runtime dependencies, 0 outbound network sockets, 9/9 official NIST CAVP FF1 vectors, 251/251 automated verification checks passing):</t>
      <table anchor="tbl-bench">
        <name>Empirical Latencies (aarch64, Node.js v22.23.3)</name>
        <thead><tr><th>Pipeline Operation</th><th>p50</th><th>p95</th></tr></thead>
        <tbody>
          <tr><td>RFC 8785 JCS + 0x06 SHA-256</td><td>0.021 ms</td><td>0.073 ms</td></tr>
          <tr><td>Stage 2 SQL/Shell AST Guard</td><td>0.078 ms</td><td>0.192 ms</td></tr>
          <tr><td>NIST FF1-AES256 Luhn PAN Twin</td><td>0.136 ms</td><td>1.795 ms</td></tr>
          <tr><td>Ed25519 Sign + Verify (0x07)</td><td>0.226 ms</td><td>0.312 ms</td></tr>
          <tr><td>ISEP v3.0 Event + Sidecar Commit</td><td>1.468 ms</td><td>5.278 ms</td></tr>
        </tbody>
      </table>
    </section>
    <section anchor="iana">
      <name>IANA Considerations</name>
      <t>This document has no IANA actions.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author initials="S." surname="Bradner" fullname="S. Bradner">
              <organization>Harvard University</organization>
            </author>
            <date year="1997" month="March"/>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
        </reference>
        <reference anchor="RFC4648" target="https://www.rfc-editor.org/info/rfc4648">
          <front>
            <title>The Base16, Base32, and Base64 Data Encodings</title>
            <author initials="S." surname="Josefsson" fullname="S. Josefsson">
              <organization>SJD</organization>
            </author>
            <date year="2006" month="October"/>
          </front>
          <seriesInfo name="RFC" value="4648"/>
        </reference>
        <reference anchor="RFC5234" target="https://www.rfc-editor.org/info/rfc5234">
          <front>
            <title>Augmented BNF for Syntax Specifications: ABNF</title>
            <author initials="D." surname="Crocker" fullname="D. Crocker">
              <organization>Brandenburg</organization>
            </author>
            <date year="2008" month="January"/>
          </front>
          <seriesInfo name="STD" value="68"/>
          <seriesInfo name="RFC" value="5234"/>
        </reference>
        <reference anchor="RFC8032" target="https://www.rfc-editor.org/info/rfc8032">
          <front>
            <title>Edwards-Curve Digital Signature Algorithm (EdDSA)</title>
            <author initials="S." surname="Josefsson" fullname="S. Josefsson">
              <organization>SJD</organization>
            </author>
            <date year="2017" month="January"/>
          </front>
          <seriesInfo name="RFC" value="8032"/>
        </reference>
        <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author initials="B." surname="Leiba" fullname="B. Leiba">
              <organization>Huawei Technologies</organization>
            </author>
            <date year="2017" month="May"/>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
        </reference>
        <reference anchor="RFC8785" target="https://www.rfc-editor.org/info/rfc8785">
          <front>
            <title>JSON Canonicalization Scheme (JCS)</title>
            <author initials="A." surname="Rundgren" fullname="A. Rundgren">
              <organization>Independent</organization>
            </author>
            <date year="2020" month="June"/>
          </front>
          <seriesInfo name="RFC" value="8785"/>
        </reference>
        <reference anchor="RFC9162" target="https://www.rfc-editor.org/info/rfc9162">
          <front>
            <title>Certificate Transparency Version 2.0</title>
            <author initials="B." surname="Laurie" fullname="B. Laurie">
              <organization>Google</organization>
            </author>
            <date year="2021" month="December"/>
          </front>
          <seriesInfo name="RFC" value="9162"/>
        </reference>
        <reference anchor="NIST-FF1" target="https://csrc.nist.gov/pubs/sp/800/38/g/r1/2pd">
          <front>
            <title>Recommendation for Block Cipher Modes of Operation: Methods for Format-Preserving Encryption</title>
            <author initials="M." surname="Dworkin" fullname="M. Dworkin">
              <organization>NIST</organization>
            </author>
            <date year="2025" month="February"/>
          </front>
          <seriesInfo name="NIST" value="SP 800-38G Rev. 1 (2nd Draft)"/>
        </reference>
      </references>
      <references>
        <name>Informative References</name>
        <reference anchor="BEYNE21" target="https://eprint.iacr.org/2021/815">
          <front>
            <title>Cryptanalysis of the FF3-1 Format-Preserving Encryption Standard</title>
            <author initials="T." surname="Beyne" fullname="T. Beyne">
              <organization>KU Leuven</organization>
            </author>
            <date year="2021" month="July"/>
          </front>
          <seriesInfo name="IACR" value="ePrint 2021/815"/>
        </reference>
        <reference anchor="FIDES25" target="https://arxiv.org/abs/2505.23643">
          <front>
            <title>Securing AI Agents with Information-Flow Control</title>
            <author initials="M." surname="Costa" fullname="M. Costa">
              <organization>Microsoft Research</organization>
            </author>
            <date year="2025" month="May"/>
          </front>
          <seriesInfo name="arXiv" value="2505.23643"/>
        </reference>
        <reference anchor="NSA-MCP" target="https://www.nsa.gov/Press-Room/Cybersecurity-Information-Sheets/">
          <front>
            <title>Model Context Protocol Security</title>
            <author>
              <organization>National Security Agency</organization>
            </author>
            <date year="2026" month="May"/>
          </front>
          <seriesInfo name="CSI" value="PP-26-1834"/>
        </reference>
        <reference anchor="CYCLONEDX" target="https://cyclonedx.org/specification/overview/">
          <front>
            <title>OWASP CycloneDX Specification v1.6</title>
            <author>
              <organization>OWASP Foundation</organization>
            </author>
            <date year="2024" month="April"/>
          </front>
          <seriesInfo name="ECMA" value="424"/>
        </reference>
        <reference anchor="ZENODO-SIP1" target="https://doi.org/10.5281/zenodo.24159380">
          <front>
            <title>Shuliak Isolation Protocol (SIP-1): Stateless Checksum-Invariant Format-Preserving Pseudonymization</title>
            <author initials="D." surname="Shuliak" fullname="D. Shuliak">
              <organization>SHULIAK CORP</organization>
            </author>
            <date year="2026" month="November"/>
          </front>
          <seriesInfo name="DOI" value="10.5281/zenodo.24159380"/>
        </reference>
      </references>
    </references>
    <section anchor="changes" numbered="false">
      <name>Changes Since draft-shuliak-sip-zero-egress-00</name>
      <ol>
        <li><t>Aligned protocol architecture with the pure Node.js ESM reference engine v3.1.0 (zero external runtime dependencies, zero outbound sockets, 251 automated verification checks).</t></li>
        <li><t>Expanded domain-separation registry from basic tokens to prefixes 0x00 through 0x0D covering RFC 8785 JCS locks, 0x07 Ed25519 warrants, 0x08 CycloneDX 1.6 AIBOMs, and 0x0B RFC 9162 Merkle proofs.</t></li>
        <li><t>Added Section 5 specifying duplicate-key JSON-RPC wire armor, CVE-class path/elicitation/NAT64 guards, and the two-phase inter-process IFC taint lattice.</t></li>
        <li><t>Refined PAN bijection to preserve only the 1-digit MII and encrypt the issuer BIN body, and documented explicit security limitations and threat boundaries.</t></li>
      </ol>
    </section>
  </back>
</rfc>
