<?xml version="1.0" encoding="utf-8"?>
<?xml-model href="rfc7991bis.rnc"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude"
     docName="draft-davis-pool-00"
     category="exp"
     ipr="trust200902"
     submissionType="IETF"
     tocInclude="true"
     sortRefs="true"
     symRefs="true"
     version="3">

  <front>
    <title abbrev="POOL">Protected Orchestrated Overlay Link (POOL): A Secure Self-Healing Transport Protocol</title>
    <seriesInfo name="Internet-Draft" value="draft-davis-pool-00"/>
    <author fullname="Drake Davis" initials="D." surname="Davis">
      <address>
        <email>adavi068@gmail.com</email>
      </address>
    </author>
    <date year="2026" month="July" day="4"/>
    <area>Transport</area>
    <keyword>overlay</keyword>
    <keyword>encryption</keyword>
    <keyword>mutual authentication</keyword>
    <keyword>stateless handshake</keyword>

    <abstract>
      <t>This document describes the Protected Orchestrated Overlay Link
      (POOL), an experimental secure transport protocol. POOL provides
      mandatory mutual authentication, always-on authenticated encryption
      with no plaintext mode, a stateless handshake resistant to resource
      exhaustion attacks, cryptographically unpredictable sequence numbers,
      self-describing 256-bit addresses, active path MTU discovery,
      per-flow telemetry, atomic configuration changes with automatic
      rollback, and an append-only hash-chained change journal. POOL
      operates either as an overlay above TCP or directly over IP using
      experimental protocol number 253.</t>
    </abstract>

    <note removeInRFC="true">
      <name>About This Document</name>
      <t>Source for this draft and an implementation are maintained at
      <eref target="https://github.com/amosdavis/POOL"/>.</t>
    </note>
  </front>

  <middle>
    <section anchor="intro">
      <name>Introduction</name>
      <t>TCP/IP was designed for a cooperative network and acquired its
      security, observability, and operational-safety mechanisms as
      afterthoughts. The consequences are well documented: trust-by-default
      transport, spoofable sources, resource-exhausting handshakes,
      predictable sequence numbers, unauthenticated control packets,
      plaintext defaults, silent path MTU failures, and configuration
      changes with no protocol-level audit trail or rollback.</t>
      <t>POOL (Protected Orchestrated Overlay Link) is an experimental
      transport protocol that makes the opposite defaults mandatory:</t>
      <ul>
        <li>Mutual authentication on every connection; there is no
        unauthenticated mode.</li>
        <li>Authenticated encryption on every data packet; there is no
        plaintext mode.</li>
        <li>A stateless challenge-response handshake in which the server
        commits no resources until the client has proven reachability and
        expended computation.</li>
        <li>Sequence numbers that are unpredictable to off-path and on-path
        observers.</li>
        <li>Self-describing 256-bit addresses bound to node identity
        keys.</li>
        <li>Active, authenticated path MTU discovery.</li>
        <li>Telemetry (RTT, jitter, loss, throughput) embedded in the
        protocol itself.</li>
        <li>Versioned, atomically applied configuration with
        deadline-based automatic rollback.</li>
        <li>An append-only, hash-chained journal of protocol state
        transitions.</li>
      </ul>
      <t>This document specifies the POOL version 1 wire protocol and the
      normative hardening requirements labeled P01 through P13 and N02.
      It is published as an Experimental document to solicit review of the
      design and operational experience from independent
      implementations.</t>
    </section>

    <section anchor="conventions">
      <name>Conventions and Terminology</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>
      <dl>
        <dt>Session:</dt>
        <dd>A mutually authenticated, encrypted association between two
        POOL nodes, identified by a 128-bit Session ID.</dd>
        <dt>Channel:</dt>
        <dd>One of 256 multiplexed logical streams within a session.</dd>
        <dt>Node identity key:</dt>
        <dd>A long-lived X25519 key pair from which a node's address Node
        ID is derived.</dd>
        <dt>Ephemeral key:</dt>
        <dd>A per-session X25519 key pair used for key agreement and
        discarded when the session ends.</dd>
      </dl>
    </section>

    <section anchor="packet">
      <name>Packet Format</name>
      <t>All POOL packets share a common 80-byte header. Multi-byte fields
      are big-endian (network byte order).</t>
      <figure anchor="header-fig">
        <name>POOL Common Header</name>
        <artwork type="ascii-art"><![CDATA[
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Version (4)  |  Type (4)     |          Flags (16)           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                      Sequence Number (64)                     |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                      Acknowledgment (64)                      |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                      Session ID (128)                         |
|                                                               |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                      Timestamp (64)                           |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|        Payload Length (16)    |    Channel (8)  | Reserved (8)|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                      HMAC (256)                               |
|                         ...                                   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                      Payload (variable)                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
]]></artwork>
      </figure>
      <dl>
        <dt>Version (4 bits):</dt>
        <dd>Protocol version. This document defines version 1.</dd>
        <dt>Type (4 bits):</dt>
        <dd>Packet type; see <xref target="pkt-types"/>.</dd>
        <dt>Flags (16 bits):</dt>
        <dd>Bit field; see <xref target="flags"/>.</dd>
        <dt>Sequence Number (64 bits):</dt>
        <dd>Cryptographic sequence number; see
        <xref target="crypto-seq"/>.</dd>
        <dt>Acknowledgment (64 bits):</dt>
        <dd>Acknowledges the peer's highest received sequence number.</dd>
        <dt>Session ID (128 bits):</dt>
        <dd>Unique session identifier generated during connection
        establishment.</dd>
        <dt>Timestamp (64 bits):</dt>
        <dd>Nanosecond-precision clock sample used for RTT and jitter
        measurement and for INIT replay protection
        (<xref target="p10"/>).</dd>
        <dt>Payload Length (16 bits):</dt>
        <dd>Length of the (encrypted) payload in bytes.</dd>
        <dt>Channel (8 bits):</dt>
        <dd>Multiplexed channel number within the session (0-255).</dd>
        <dt>Reserved (8 bits):</dt>
        <dd>MUST be zero on transmission and ignored on receipt.</dd>
        <dt>HMAC (256 bits):</dt>
        <dd>HMAC-SHA256 over the header and the plaintext payload; see
        <xref target="crypto-hmac"/>.</dd>
      </dl>

      <section anchor="pkt-types">
        <name>Packet Types</name>
        <table anchor="pkt-type-table">
          <name>POOL Packet Types</name>
          <thead>
            <tr><th>Value</th><th>Name</th><th>Description</th></tr>
          </thead>
          <tbody>
            <tr><td>0x0</td><td>INIT</td><td>Connection initiation (carries client ephemeral public key)</td></tr>
            <tr><td>0x1</td><td>CHALLENGE</td><td>Server challenge (carries puzzle and server ephemeral key)</td></tr>
            <tr><td>0x2</td><td>RESPONSE</td><td>Client puzzle solution and key-agreement completion</td></tr>
            <tr><td>0x3</td><td>DATA</td><td>Encrypted application data</td></tr>
            <tr><td>0x4</td><td>ACK</td><td>Pure acknowledgment</td></tr>
            <tr><td>0x5</td><td>HEARTBEAT</td><td>Keepalive with embedded telemetry</td></tr>
            <tr><td>0x6</td><td>REKEY</td><td>Session key rotation</td></tr>
            <tr><td>0x7</td><td>CLOSE</td><td>Graceful authenticated close</td></tr>
            <tr><td>0x8</td><td>CONFIG</td><td>Configuration change announcement</td></tr>
            <tr><td>0x9</td><td>ROLLBACK</td><td>Atomic rollback to previous configuration</td></tr>
            <tr><td>0xA</td><td>DISCOVER</td><td>Network/MTU/peer discovery</td></tr>
            <tr><td>0xB</td><td>JOURNAL</td><td>Change journal synchronization</td></tr>
            <tr><td>0xC</td><td>INTEGRITY</td><td>Peer cryptographic challenge-response (runtime behavioral verification)</td></tr>
            <tr><td>0xD-0xF</td><td>RESERVED</td><td>Reserved for future use</td></tr>
          </tbody>
        </table>
      </section>

      <section anchor="flags">
        <name>Flags</name>
        <table anchor="flags-table">
          <name>POOL Header Flags</name>
          <thead>
            <tr><th>Bit</th><th>Name</th><th>Description</th></tr>
          </thead>
          <tbody>
            <tr><td>0</td><td>ENCRYPTED</td><td>Payload is encrypted (always set after the handshake)</td></tr>
            <tr><td>1</td><td>COMPRESSED</td><td>Payload was compressed before encryption (see <xref target="p08"/>)</td></tr>
            <tr><td>2</td><td>PRIORITY</td><td>High-priority packet</td></tr>
            <tr><td>3</td><td>FRAGMENT</td><td>Packet is a fragment of a larger message</td></tr>
            <tr><td>4</td><td>LAST_FRAG</td><td>Packet is the last fragment</td></tr>
            <tr><td>5</td><td>REQUIRE_ACK</td><td>Sender requires explicit acknowledgment</td></tr>
            <tr><td>6</td><td>TELEMETRY</td><td>Heartbeat carries telemetry data</td></tr>
            <tr><td>7</td><td>ROLLBACK_READY</td><td>Node supports atomic rollback</td></tr>
            <tr><td>8</td><td>CONFIG_LOCKED</td><td>Configuration changes are frozen</td></tr>
            <tr><td>9</td><td>JOURNAL_SYNC</td><td>Journal synchronization in progress</td></tr>
            <tr><td>10-15</td><td>RESERVED</td><td>MUST be zero on transmission and ignored on receipt</td></tr>
          </tbody>
        </table>
      </section>
    </section>

    <section anchor="handshake">
      <name>Connection Establishment (Stateless Handshake)</name>
      <t>Unlike TCP's three-way handshake, which allocates server resources
      upon SYN receipt, POOL uses a stateless challenge-response in which
      the server allocates no per-connection state until the client has
      proven that it can receive replies at its claimed address and has
      solved a computational puzzle.</t>
      <figure anchor="handshake-fig">
        <name>Stateless Handshake</name>
        <artwork type="ascii-art"><![CDATA[
Client                                Server
  |                                     |
  |--- INIT (client ephemeral pubkey) ->|  Server allocates NOTHING
  |                                     |  Challenge derived from
  |                                     |  hash(client_addr, time,
  |                                     |       server_secret)
  |<-- CHALLENGE (puzzle, server key) --|  Still ZERO server state
  |                                     |
  |  Client solves puzzle               |
  |  Client derives shared secret       |
  |                                     |
  |--- RESPONSE (solution, proof) ----->|  Server verifies solution
  |                                     |  Server derives shared secret
  |                                     |  NOW session state is created
  |<-- DATA (first payload) ------------|
  |                                     |
]]></artwork>
      </figure>
      <t>The server derives the challenge from a keyed hash over the
      client's address, a timestamp, and a rotating server secret
      (<xref target="p02"/>); it can therefore regenerate and verify the
      challenge statelessly. The puzzle is a hash-preimage search whose
      difficulty is adjustable under load
      (<xref target="p10"/>).</t>
      <t>This construction resists SYN-flood-style resource exhaustion
      because unanswered INITs consume no server memory, and it resists
      source-address spoofing because a client that cannot receive the
      CHALLENGE cannot proceed.</t>
      <t>The proof-of-work puzzle input binds the full 16-byte client
      address (IPv4 addresses are represented as IPv4-mapped IPv6,
      <xref target="ipv6"/>), an 8-byte server secret, and a 4-byte
      timestamp.</t>
    </section>

    <section anchor="crypto">
      <name>Cryptography</name>
      <section anchor="crypto-kx">
        <name>Key Exchange</name>
        <t>Key agreement uses X25519 <xref target="RFC7748"/> with
        ephemeral key pairs generated per session by both sides. The
        shared secret is processed with HKDF-SHA256
        <xref target="RFC5869"/> to derive the session encryption key,
        the HMAC key, and the sequence key, using distinct info labels
        for each.</t>
      </section>
      <section anchor="crypto-aead">
        <name>Symmetric Encryption</name>
        <t>All payload encryption uses the ChaCha20-Poly1305 AEAD
        <xref target="RFC8439"/> with a 256-bit session key. The 96-bit
        nonce is constructed from session-unique material and the packet
        sequence number as specified normatively in
        <xref target="p01"/>; a nonce value is never reused under the
        same key.</t>
      </section>
      <section anchor="crypto-hmac">
        <name>Packet Authentication</name>
        <t>Every packet carries an HMAC-SHA256 <xref target="RFC2104"/>
        computed over the header and the plaintext payload using the
        session HMAC key, which is derived separately from the encryption
        key. This prevents header manipulation, reset injection, and
        sequence corruption. Verification timing requirements are given
        in <xref target="p03"/>.</t>
      </section>
      <section anchor="crypto-rekey">
        <name>Key Rotation</name>
        <t>Sessions rekey automatically after 2^28 packets or one hour,
        whichever comes first, via a new ephemeral X25519 exchange carried
        inside the encrypted session. Old key material MUST be zeroed
        immediately after rotation. Simultaneous-initiation tie-breaking
        is specified in <xref target="p06"/>.</t>
      </section>
      <section anchor="crypto-seq">
        <name>Sequence Numbers</name>
        <t>The initial sequence number is drawn from a cryptographically
        secure random number generator. Sequence numbers are unpredictable
        to external observers, which prevents the prediction and injection
        attacks that plague cleartext transports. The 64-bit space removes
        wraparound concerns in practice; rekeying is required well before
        exhaustion (<xref target="p01"/>). Anti-replay requirements are
        given in <xref target="n02"/>.</t>
      </section>
    </section>

    <section anchor="addressing">
      <name>Addressing</name>
      <t>POOL uses 256-bit self-describing addresses:</t>
      <artwork type="ascii-art"><![CDATA[
[32-bit : address type + version]
[64-bit : organization/network ID]
[64-bit : subnet/segment ID]
[64-bit : node ID (derived from the node's public key hash)]
[32-bit : checksum]
]]></artwork>
      <t>Properties:</t>
      <ul>
        <li>No exhaustion: 2^256 address space.</li>
        <li>No conflicts: the Node ID is derived from a cryptographic
        identity key and is therefore globally unique with overwhelming
        probability.</li>
        <li>Self-authenticating: an address is bound to its node's
        identity key.</li>
        <li>Hierarchical: organization and segment fields provide
        subnetting structure.</li>
        <li>The checksum catches transcription errors in manual entry;
        its collision bound and required upgrade path are discussed in
        <xref target="p09"/>.</li>
      </ul>
    </section>

    <section anchor="mtu">
      <name>MTU Discovery and Fragmentation</name>
      <ul>
        <li>DISCOVER packets probe the path MTU using binary search;
        probe rate limits and authentication requirements are given in
        <xref target="p05"/>.</li>
        <li>There are no silent drops: every fragment requires HMAC
        verification, and reassembly uses cryptographic ordering.</li>
        <li>The minimum MTU is 512 bytes.</li>
        <li>The path MTU is re-probed every 60 seconds and upon loss
        detection, and is cached per session.</li>
        <li>Fragment reassembly resource limits are normative; see
        <xref target="p04"/>.</li>
      </ul>
    </section>

    <section anchor="telemetry">
      <name>Built-in Telemetry</name>
      <t>Every HEARTBEAT packet (default interval: 5 seconds) carries a
      telemetry block:</t>
      <sourcecode type="c"><![CDATA[
struct pool_telemetry {
    uint64_t rtt_ns;         /* round-trip time, nanoseconds     */
    uint64_t jitter_ns;      /* RTT variance                     */
    uint32_t loss_rate_ppm;  /* packet loss, parts per million   */
    uint32_t throughput_bps; /* current throughput estimate      */
    uint16_t mtu_current;    /* current path MTU                 */
    uint16_t queue_depth;    /* local send queue depth           */
    uint64_t uptime_ns;      /* session uptime                   */
    uint32_t rekey_count;    /* completed key rotations          */
    uint32_t config_version; /* current configuration version    */
    uint32_t state_digest;   /* CRC32 of session state, for
                                cross-peer consistency checks    */
    uint64_t journal_head;   /* truncated journal chain head
                                commitment (see Section 10)      */
};
]]></sourcecode>
      <t>Both peers timestamp heartbeats and independently compute RTT,
      jitter, and loss, giving each side a view it can cross-check
      against the other's reported values. The state_digest and
      journal_head fields support the cross-peer integrity mechanisms
      described in <xref target="security"/>.</t>
    </section>

    <section anchor="config">
      <name>Atomic Configuration and Rollback</name>
      <t>POOL nodes maintain a versioned configuration state consisting of
      a monotonically increasing version, the previous version, SHA-256
      hashes of the serialized current and previous configurations, an
      application timestamp, and a rollback deadline.</t>
      <ol>
        <li>A CONFIG packet proposes a new configuration together with a
        rollback deadline.</li>
        <li>The peer applies the new configuration tentatively.</li>
        <li>If confirmation is not received before the deadline, the node
        automatically rolls back; semantics that prevent an attacker from
        forcing rollback by suppressing a single packet are specified in
        <xref target="p07"/>.</li>
        <li>Rollback restores the exact previous state, verified against
        the stored previous-configuration hash.</li>
        <li>Every configuration change is recorded in the change
        journal.</li>
      </ol>
    </section>

    <section anchor="journal">
      <name>Change Journal</name>
      <t>Every POOL node maintains an append-only journal of protocol
      state changes. Each entry records a timestamp, the configuration
      versions before and after, a change type, serialized change detail,
      and a SHA-256 entry hash. Entry hashes are chained: each entry's
      hash includes the previous entry's hash, so modification of any
      past entry invalidates all subsequent hashes.</t>
      <t>The chain head is a commitment to the entire journal history.
      Implementations SHOULD publish the chain head outside the node
      (for example, to remote logging infrastructure) and carry a
      truncated chain head in heartbeat telemetry so that each peer
      retains an independent replica; divergence between a node's journal
      and externally held commitments indicates tampering.</t>
      <t>Journals synchronize between peers via JOURNAL packets and
      provide a complete audit trail with before/after hashes for every
      change.</t>
    </section>

    <section anchor="errors">
      <name>Error Handling</name>
      <t>POOL never silently drops packets. Every error condition
      produces a journal entry and a telemetry counter increment, and MAY
      produce an encrypted error notification to the peer.</t>
      <table anchor="err-table">
        <name>Error Codes</name>
        <thead>
          <tr><th>Code</th><th>Category</th><th>Description</th></tr>
        </thead>
        <tbody>
          <tr><td>0x01</td><td>AUTH_FAIL</td><td>Authentication or HMAC verification failed</td></tr>
          <tr><td>0x02</td><td>DECRYPT_FAIL</td><td>Decryption failed</td></tr>
          <tr><td>0x03</td><td>SEQ_INVALID</td><td>Sequence number outside the valid window</td></tr>
          <tr><td>0x04</td><td>FRAG_TIMEOUT</td><td>Fragment reassembly timed out</td></tr>
          <tr><td>0x05</td><td>MTU_EXCEEDED</td><td>Packet exceeds the negotiated MTU</td></tr>
          <tr><td>0x06</td><td>CONFIG_REJECT</td><td>Configuration change rejected by policy</td></tr>
          <tr><td>0x07</td><td>REKEY_FAIL</td><td>Key rotation failed</td></tr>
          <tr><td>0x08</td><td>JOURNAL_FULL</td><td>Journal storage exhausted</td></tr>
          <tr><td>0x09</td><td>OVERLOAD</td><td>Node is overloaded (backpressure signal)</td></tr>
          <tr><td>0x0A</td><td>VERSION_MISMATCH</td><td>Protocol version incompatible</td></tr>
        </tbody>
      </table>
    </section>

    <section anchor="ipv6">
      <name>Transports and IP Version Support</name>
      <t>POOL runs over two transports:</t>
      <ul>
        <li>A TCP overlay (the default), which traverses existing
        networks and middleboxes unchanged; and</li>
        <li>Raw IP using experimental protocol number 253
        <xref target="RFC3692"/>, for networks that permit it.</li>
      </ul>
      <t>IP addresses are not carried in POOL packet headers; the
      underlying transport handles network addressing, so the wire
      protocol is identical over IPv4 and IPv6. Internally,
      implementations represent all addresses as 128-bit values, storing
      IPv4 addresses in IPv4-mapped IPv6 form (::ffff:a.b.c.d). A single
      dual-stack listener accepts both families. The handshake puzzle
      binds the full 16-byte client address for both families
      (<xref target="handshake"/>). The raw IP transport is currently
      specified for IPv4 only.</t>
    </section>

    <section anchor="hardening">
      <name>Normative Hardening Requirements</name>
      <t>The following requirements address protocol-level failure modes
      identified during security analysis of POOL version 1. All are
      normative for compliant implementations.</t>

      <section anchor="p01">
        <name>Nonce Construction (P01)</name>
        <t>The 96-bit nonce for ChaCha20-Poly1305 MUST be constructed
        as:</t>
        <artwork type="ascii-art"><![CDATA[
nonce[0:3]  = hmac_key[0:4]    (session-unique prefix)
nonce[4:11] = big-endian(seq)  (64-bit sequence number)
]]></artwork>
        <t>Implementations MUST trigger rekeying before the sequence
        counter reaches 2^63 to prevent nonce reuse. After rekeying, the
        new HMAC key provides a fresh prefix, guaranteeing nonce
        uniqueness across key epochs.</t>
        <t>Rationale: using zero bytes for nonce[0:3] would reduce the
        effective nonce space by 32 bits, increasing collision
        probability across concurrent sessions.</t>
      </section>

      <section anchor="p02">
        <name>Challenge Secret Rotation (P02)</name>
        <t>The server MUST rotate its challenge secret at least every
        300 seconds. During rotation, the server MUST accept challenges
        generated with the previous secret for a grace period of twice
        the rotation interval, to avoid rejecting in-flight
        handshakes.</t>
        <t>Rationale: without rotation, captured challenge parameters
        could be solved offline and replayed indefinitely.</t>
      </section>

      <section anchor="p03">
        <name>HMAC Verification Timing (P03)</name>
        <t>All HMAC verification MUST use constant-time comparison.
        Variable-time memory comparison MUST NOT be used for any
        authentication tag or HMAC comparison.</t>
        <t>Rationale: variable-time comparison leaks tag bytes through
        timing side channels, enabling byte-by-byte forgery.</t>
      </section>

      <section anchor="p04">
        <name>Fragment Resource Limits (P04)</name>
        <t>Implementations MUST enforce all of the following:</t>
        <ul>
          <li>a maximum of 16 concurrent fragment reassembly slots per
          peer;</li>
          <li>a maximum 5-second timeout per incomplete fragment
          sequence;</li>
          <li>least-recently-used eviction when all fragment slots are
          occupied; and</li>
          <li>total fragment buffer memory capped at 16 times the MTU
          per peer.</li>
        </ul>
        <t>Rationale: without limits, an attacker can exhaust reassembly
        memory with many small fragment sequences that are never
        completed.</t>
      </section>

      <section anchor="p05">
        <name>MTU Probe Rate Limiting (P05)</name>
        <t>DISCOVER packets used for MTU probing MUST be rate-limited to
        at most one probe per second per peer. Probe responses MUST only
        be accepted from peers with established sessions, authenticated
        by the session HMAC.</t>
        <t>Rationale: unauthenticated probes can be amplified by
        spoofing, causing probe storms between peers.</t>
      </section>

      <section anchor="p06">
        <name>Rekey Tie-Breaking (P06)</name>
        <t>When both peers initiate REKEY simultaneously, the peer with
        the lexicographically lower Session ID MUST proceed as the rekey
        initiator; the other peer MUST abort its own attempt and process
        the received REKEY as a responder. Each rekey MUST include a
        monotonically increasing epoch number to disambiguate key
        material.</t>
      </section>

      <section anchor="p07">
        <name>Configuration Rollback Semantics (P07)</name>
        <t>If no configuration confirmation is received within the
        rollback deadline, implementations MUST treat silence as
        confirmation, not as failure. The CONFIG sender MUST retry the
        confirmation request at least three times with exponential
        backoff (1, 2, and 4 seconds) before the deadline expires.</t>
        <t>Rationale: an attacker who can suppress a single packet must
        not be able to force a rollback to a less secure
        configuration.</t>
      </section>

      <section anchor="p10">
        <name>INIT Replay Protection and Minimum Puzzle Difficulty (P10, P11)</name>
        <t>INIT packets MUST include a 64-bit nanosecond timestamp. The
        server MUST reject INIT packets whose timestamps deviate more
        than 30 seconds from the server's current time. The puzzle
        difficulty MUST be at least 16, requiring 2^16 hash operations
        on average.</t>
        <t>Rationale: without timestamps, captured INIT packets can be
        replayed indefinitely; without a difficulty floor, INIT-to-
        CHALLENGE reflection has zero computational cost for the
        sender.</t>
      </section>

      <section anchor="p13">
        <name>Version Downgrade Prevention (P13)</name>
        <t>After a successful version 2 (hybrid post-quantum) handshake
        with a peer, implementations MUST record that peer's maximum
        supported version. Subsequent connection attempts from that peer
        at a lower version MUST be rejected with a CLOSE packet carrying
        a version-downgrade error.</t>
        <t>Rationale: an active attacker could otherwise strip version
        negotiation and force peers into the X25519-only mode, which
        lacks post-quantum protection.</t>
      </section>

      <section anchor="p08">
        <name>Compression Oracle Mitigation (P08)</name>
        <t>When the COMPRESSED flag is set, compression occurs before
        encryption, and ciphertext length therefore leaks plaintext
        information (a CRIME/BREACH-style oracle). Applications handling
        secrets SHOULD either disable compression for sensitive channels
        or pad compressed output to fixed block sizes (for example,
        256-byte blocks).</t>
      </section>

      <section anchor="p09">
        <name>Address Checksum Collision Bound (P09)</name>
        <t>The CRC32 checksum used in POOL address derivation
        (<xref target="addressing"/>) has a birthday bound of
        approximately 2^16 addresses before a 50% collision probability.
        Deployments exceeding 10,000 nodes SHOULD upgrade to SHA-256
        truncated to its first 4 bytes for address derivation in
        protocol version 2 and later.</t>
      </section>

      <section anchor="n02">
        <name>Anti-Replay Window (N02)</name>
        <t>Implementations MUST maintain a sliding window of at least 64
        sequence numbers. Packets with sequence numbers older than the
        highest seen minus 64 MUST be silently discarded, as MUST
        duplicate sequence numbers within the window.</t>
      </section>
    </section>

    <section anchor="iana">
      <name>IANA Considerations</name>
      <t>This document has no IANA actions.</t>
      <t>POOL's raw IP transport uses IP protocol number 253, which is
      reserved for experimentation and testing by
      <xref target="RFC3692"/>; this document requests no permanent
      assignment. The TCP overlay transport uses port 9253 by local
      convention; no port assignment is requested at Experimental
      status. Should the protocol advance, a dedicated protocol number
      and a registered port would be requested, and registries for POOL
      packet types, flags, and error codes would be established.</t>
    </section>

    <section anchor="security">
      <name>Security Considerations</name>
      <t>This entire document concerns security; this section summarizes
      the threat model, residual risks, and the runtime-integrity design
      that accompanies the protocol.</t>
      <section>
        <name>Design Goals Met by Construction</name>
        <t>Source-address spoofing is countered by the reachability proof
        inherent in the challenge-response handshake
        (<xref target="handshake"/>). Resource-exhaustion attacks on the
        handshake are countered by statelessness and proof-of-work.
        Sequence prediction, reset injection, and header manipulation are
        countered by CSPRNG-seeded sequence numbers and per-packet HMAC.
        Passive interception is countered by mandatory AEAD encryption.
        On-path key compromise exposure is bounded by ephemeral keys and
        automatic rekeying.</t>
      </section>
      <section>
        <name>Residual Risks</name>
        <ul>
          <li>The compression oracle (<xref target="p08"/>) is mitigated
          by guidance, not eliminated; implementations cannot detect
          which application data is secret.</li>
          <li>The CRC32 address checksum is an error-detection code, not
          a security mechanism (<xref target="p09"/>).</li>
          <li>Traffic analysis (packet timing and sizes) is not
          addressed by this version of the protocol.</li>
          <li>Denial of service by a resourceful attacker willing to
          solve puzzles at scale is made expensive, not impossible.</li>
        </ul>
      </section>
      <section>
        <name>Runtime Integrity</name>
        <t>The POOL design includes a companion runtime-integrity threat
        model that assumes running code can be modified after load
        (live binary patching, hardware overlay). Protocol-visible
        mechanisms supporting it include the INTEGRITY packet type
        (a peer sends a random challenge; the other peer must return it
        encrypted under the session key, proving its cryptographic
        behavior end to end), the state_digest and journal_head fields in
        heartbeat telemetry (<xref target="telemetry"/>), and the
        hash-chained journal with external chain-head commitments
        (<xref target="journal"/>). A node that fails these checks
        marks itself compromised and refuses new sessions. The full
        threat model and its design tenets are maintained with the
        implementation.</t>
      </section>
      <section>
        <name>Cryptographic Agility</name>
        <t>POOL version 1 deliberately ships a single fixed cipher suite
        (X25519, HKDF-SHA256, ChaCha20-Poly1305, HMAC-SHA256) and no
        runtime negotiation, eliminating downgrade surface within a
        version. Algorithm migration happens only through whole protocol
        versions (a version 2 with hybrid X25519 + ML-KEM-768 key
        agreement is defined by the implementation), with downgrade
        prevention as specified in <xref target="p13"/>.</t>
      </section>
    </section>
  </middle>

  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2104.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5869.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7748.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8439.xml"/>
      </references>
      <references>
        <name>Informative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3692.xml"/>
      </references>
    </references>
    <section anchor="ack" numbered="false">
      <name>Acknowledgments</name>
      <t>The failure-mode-driven design method used throughout POOL —
      documenting the ways a system can fail and treating that list as
      binding design tenets — shaped every normative requirement in
      <xref target="hardening"/>.</t>
    </section>
  </back>
</rfc>
