<?xml version="1.0" encoding="UTF-8"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude"
     category="exp"
     docName="draft-x1co-ussh-00"
     ipr="trust200902"
     submissionType="independent"
     xml:lang="en"
     version="3">
  <front>
    <title abbrev="USSH">UDP Speedy Secure Shell (USSH)</title>
    <seriesInfo name="Internet-Draft" value="draft-x1co-ussh-00"/>
    <author fullname="x1co" initials="X." surname="x1co">
      <organization>x1colegal</organization>
      <address>
        <email>x1colegal@outlook.com.br</email>
      </address>
    </author>
    <date year="2026" month="June" day="7"/>
    <area>General</area>
    <workgroup>Independent Submission</workgroup>
    <keyword>shell</keyword>
    <keyword>remote access</keyword>
    <keyword>UDP</keyword>
    <keyword>secure transport</keyword>
    <abstract>
      <t>This document describes UDP Speedy Secure Shell (USSH), an experimental remote shell protocol built on top of USTPS. USSH provides an interactive shell session over a secure UDP-based transport while preserving USTPS transport semantics. USSH reconstructs application-level terminal streams where necessary, while relying on USTPS for secure unreliable-underneath, selective-recovery transport behavior.</t>
    </abstract>
  </front>
  <middle>
    <section numbered="true" toc="default">
      <name>Introduction</name>
      <t>USSH is an experimental secure shell protocol built directly on top of USTPS rather than on TCP. Its goal is to provide interactive remote shell access while preserving the properties of the underlying USTPS transport, including packet-level authenticated encryption, per-client session keys, selective retransmission, and lack of transport-level Head-of-Line blocking.</t>
      <t>USSH is not intended to be wire-compatible with SSH. It is a distinct protocol with its own packetization and control semantics.</t>
    </section>

    <section numbered="true" toc="default">
      <name>Terminology</name>
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" 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 numbered="true" toc="default">
      <name>Relationship to USTPS</name>
      <t>USSH uses USTPS as its secure transport substrate. The outer secure envelope and inner transport packet format are provided by USTPS. USSH then defines its own application messages for shell authentication, PTY setup, standard input delivery, standard output delivery, resize events, and session termination.</t>
      <t>USTPS remains unordered at the transport layer. USSH therefore performs additional application-layer handling where terminal behavior requires ordered reconstruction of logical streams such as standard output.</t>
    </section>

    <section numbered="true" toc="default">
      <name>Message Identification</name>
      <t>USSH application messages begin with the magic value <tt>USS1</tt>, meaning "UDP Speedy Secure Shell, version 1" in the USSH application context.</t>
      <t>In deployed implementations, the USTPS secure envelope also uses the identifier <tt>USS1</tt> at the encrypted outer framing layer. The inner USTPS transport packet uses <tt>UST1</tt>. Implementers should therefore distinguish between the secure envelope, the USTPS transport packet, and the USSH application payload when analyzing packet captures or decrypted data.</t>
    </section>

    <section numbered="true" toc="default">
      <name>Protocol Model</name>
      <t>A USSH client first establishes a USTPS session with the server. Once that secure transport session exists, the client performs USSH authentication and requests an interactive shell or PTY-backed session. Current implementations support password-based entry and derive per-client session state over the already-established USTPS channel.</t>
      <t>USSH messages currently cover at least the following categories:</t>
      <ul spacing="normal">
        <li>Authentication and session setup</li>
        <li>Standard input delivery</li>
        <li>Standard output delivery</li>
        <li>Terminal resize events</li>
        <li>Keepalive and liveness signaling</li>
        <li>Session close and exit signaling</li>
      </ul>
    </section>

    <section numbered="true" toc="default">
      <name>Interactive Stream Handling</name>
      <t>Interactive shells are highly sensitive to stream corruption and terminal redraw behavior. Although USTPS is unordered at the transport layer, a shell's logical input and output streams often require application-level ordering. USSH therefore reconstructs ordered logical output where needed before presenting terminal bytes to the local client terminal.</t>
      <t>This reconstruction is an application-layer behavior of USSH. It does not convert USTPS itself into an ordered transport.</t>
    </section>

    <section numbered="true" toc="default">
      <name>Head-of-Line Considerations</name>
      <t>USSH inherits the lack of transport-level Head-of-Line blocking from USTPS. However, because terminal streams and PTY behavior often require coherent ordered interpretation, USSH may temporarily delay terminal-visible output while reconstructing the correct logical order of shell output fragments.</t>
      <t>That delay occurs at the application layer and is distinct from transport-level Head-of-Line blocking.</t>
    </section>

    <section numbered="true" toc="default">
      <name>Security Model</name>
      <t>USSH relies on USTPS for mandatory AEAD and per-client key establishment. Current public implementations additionally support persistent server host keys, TOFU-based server identity continuity, and application-level authentication before granting shell access.</t>
      <t>Implementations SHOULD carefully protect shell spawn logic, PTY handling, session teardown, and terminal state restoration. Clients SHOULD restore local terminal settings even when the session closes unexpectedly.</t>
    </section>

    <section numbered="true" toc="default">
      <name>Operational Status</name>
      <t>USSH has been implemented and exercised as a Beta-grade experimental protocol. Public development has focused on stability over the USTPS substrate, interactive shell usability, session liveness, and terminal negotiation.</t>
    </section>

    <section numbered="true" toc="default">
      <name>IANA Considerations</name>
      <t>This document has no IANA actions.</t>
    </section>

    <section numbered="true" toc="default">
      <name>Security Considerations</name>
      <t>Remote shell protocols expose high-impact capabilities. In addition to the security requirements inherited from USTPS, USSH implementations MUST authenticate clients before granting shell access, MUST avoid leaking shell access to unauthenticated peers, and SHOULD defend against terminal-state corruption, stale-session reuse, and unauthorized session migration.</t>
      <t>Applications and operators should understand that USSH is experimental and not interchangeable with SSH security review, ecosystem hardening, or deployment maturity.</t>
    </section>
  </middle>
  <back>
    <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="Scott Bradner"/>
          <date year="1997" month="March"/>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="2119"/>
      </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="Barry Leiba"/>
          <date year="2017" month="May"/>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="8174"/>
      </reference>
    </references>
    <references>
      <name>Informative References</name>
      <reference anchor="USTPS-DRAFT" target="https://example.invalid/draft-x1co-ustps-00">
        <front>
          <title>UDP Speedy Transmission Protocol Secure (USTPS)</title>
          <author initials="X." surname="x1co" fullname="x1co"/>
          <date year="2026" month="June"/>
        </front>
        <seriesInfo name="Internet-Draft" value="draft-x1co-ustps-00"/>
      </reference>
    </references>
  </back>
</rfc>
