<?xml version='1.0' encoding='UTF-8'?>
<?xml-model href="rfc7991bis.rnc"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="info" consensus="false" docName="draft-liu-iotops-pqc-wireguard-03" ipr="trust200902" sortRefs="true" submissionType="IETF" symRefs="true" tocInclude="true" version="3" xml:lang="en">
  <front>
    <title abbrev="IoT PQ Key Provisioning">Post-Quantum Key Provisioning and Lifecycle Operations for IoT Deployments Using WireGuard</title>
    <seriesInfo name="Internet-Draft" value="draft-liu-iotops-pqc-wireguard-03"/>
    <author fullname="Penghui Liu" initials="P." role="editor" surname="Liu">
      <organization>Pengcheng Laboratory</organization>
      <address>
        <postal>
          <street>No.2 Xingke 1 Street</street>
          <city>Shenzhen</city>
          <code>518055</code>
          <country>China</country>
        </postal>
        <email>liuph@pcl.ac.cn</email>
      </address>
    </author>
    <author fullname="Rongwei Yang" initials="R." role="editor" surname="Yang">
      <organization>Pengcheng Laboratory</organization>
      <address>
        <postal>
          <street>No.2 Xingke 1 Street</street>
          <city>Shenzhen</city>
          <code>518055</code>
          <country>China</country>
        </postal>
        <email>yangrw@pcl.ac.cn</email>
      </address>
    </author>
    <author fullname="Yu Zhang" initials="Y." role="editor" surname="Zhang">
      <organization>Pengcheng Laboratory</organization>
      <address>
        <postal>
          <street>No.2 Xingke 1 Street</street>
          <city>Shenzhen</city>
          <code>518055</code>
          <country>China</country>
        </postal>
        <email>zhangy08@pcl.ac.cn</email>
      </address>
    </author>
    <author fullname="Xiaoxiong Zhong" initials="X." role="editor" surname="Zhong">
      <organization>Pengcheng Laboratory</organization>
      <address>
        <postal>
          <street>No.2 Xingke 1 Street</street>
          <city>Shenzhen</city>
          <code>518055</code>
          <country>China</country>
        </postal>
        <email>zhongxx@pcl.ac.cn</email>
      </address>
    </author>
    <author fullname="Yanjie Gong" initials="Y." role="editor" surname="Gong">
      <organization>Schneider Electric</organization>
      <address>
        <postal>
          <street>Building A, No. 6 Wangjing East Road, Chaoyang District</street>
          <city>Beijing</city>
          <code>100102</code>
          <country>China</country>
        </postal>
        <email>garrett.gong@se.com</email>
      </address>
    </author>
    <date year="2026" month="November" day="23"/>
    <area>Operations and Management</area>
    <workgroup>IOTOPS</workgroup>
    <keyword>WireGuard</keyword>
    <keyword>Noise</keyword>
    <keyword>post-quantum cryptography</keyword>
    <keyword>ML-KEM</keyword>
    <keyword>ML-DSA</keyword>
    <keyword>Internet of Things</keyword>
    <keyword>device onboarding</keyword>
    <keyword>key lifecycle management</keyword>
    <keyword>operational security</keyword>
    <abstract>
      <t>This document discusses post-quantum key provisioning and lifecycle operations for Internet of Things (IoT) deployments that already use WireGuard, such as fleets of industrial gateways and capable managed devices with little or no local user interface. It addresses authorized tunnel onboarding, identity-to-key binding, preshared-key rotation, installation-state reconciliation, failure remediation, quarantine, and decommissioning at a scale that makes manual maintenance impractical.</t>
      <t>The operational model assumes independently provisioned trust and authorized management that remains reachable when the target tunnel fails. It relates provisioning to inventory, separate access policy, observable readiness, and device lifecycle decisions. It uses the existing WireGuard PresharedKey configuration interface and leaves the native handshake and transport format unchanged. WireGuard remains an externally maintained dependency.</t>
      <t>An appendix retains a candidate ML-KEM-768 and ML-DSA bootstrap exchange for technical discussion and further security and interoperability review. This individual contribution seeks Informational publication of the operational discussion and feedback on the appropriate venue for any new protocol work.</t>
    </abstract>
    <note removeInRFC="true">
      <name>Discussion Status</name>
      <t>This is an individual contribution for IOTOPS discussion. The intended status has changed from Standards Track to Informational to focus on operational guidance. The authors seek feedback on the operational scope and on whether the candidate exchange in <xref target="candidate-bootstrap"/> should be developed separately. Neither working-group adoption nor WireGuard maintainer endorsement is asserted.</t>
    </note>
  </front>
  <middle>
    <section anchor="introduction">
      <name>Introduction</name>
      <t>Internet of Things (IoT) deployments can include large fleets of industrial gateways and managed controllers that have little or no local user interface and are operated within a limited administrative domain. Where an operator has already selected WireGuard for remote maintenance or site connectivity, manually distributing and replacing a separate preshared key (PSK) for every authorized peer relationship becomes an operational problem. A long device service life also motivates planning for migration of the provisioning mechanism as cryptographic threats change.</t>
      <t>The problem addressed here is how an operator authorizes a device or gateway to join a tunnel service, binds its operational identity to the correct tunnel keys, observes whether provisioning actually succeeded, and manages rotation, revocation, and retirement at fleet scale. The device-lifecycle security concerns discussed in <xref target="RFC8576"/> provide relevant background. The scenarios in this document are illustrative deployment models, not reports of measured field deployments.</t>
      <t>For example, an unattended site's gateway can lose connectivity after only one endpoint installs a replacement PSK. The operator needs to identify the affected authorized relationship, collect current observations outside the failed tunnel, reconcile or reprovision it, and verify readiness before restoring policy-dependent access. The same inventory and control mechanisms need to prevent a retired or transferred device from being reauthorized by an old configuration. These operational outcomes, rather than selection of a new tunnel protocol, motivate this document.</t>
      <t>The IOTOPS charter includes device onboarding, lifecycle management, access control, isolation, remediation, and operational security guidance <xref target="IOTOPS-CHARTER"/>. This document addresses those operational aspects for deployments that already use WireGuard. The review boundaries for new protocol work are discussed in <xref target="ietf-relationship"/>.</t>
      <t>WireGuard is specified and maintained outside the IETF <xref target="WIREGUARD"/>. It uses the NoiseIKpsk2_25519_ChaChaPoly_BLAKE2s handshake, including an optional 32-octet preshared-key input <xref target="NOISE"/>. The operational model uses that existing configuration input without changing the native WireGuard protocol.</t>
      <t><xref target="candidate-bootstrap"/> preserves a candidate external bootstrap exchange from the preceding revision for further review. ML-KEM supplies a secret contribution and ML-DSA authenticates the exchange; ordinary TLS 1.3 is only its carrier. This is not a claim that every part of the deployment, including initial enrollment, certificates, management, and the native tunnel, has a demonstrated end-to-end post-quantum security property.</t>
    </section>
    <section anchor="conventions">
      <name>Conventions and Operational Roles</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"/> and <xref target="RFC8174"/> when, and only when, they appear in all capitals.</t>
      <t>In this document, the WireGuard endpoint that initiates provisioning is the <tt>Client</tt> and the other endpoint is the <tt>Server</tt>. The octet-string operator <tt>||</tt> denotes concatenation. The native WireGuard protocol terms and fields retain the meanings defined by the WireGuard protocol and configuration format.</t>
      <t>An <tt>Operator</tt> controls deployment inventory, authorization policy, and lifecycle actions. A <tt>Managed Endpoint</tt> is a capable IoT device or a site gateway acting as one WireGuard peer. The other <tt>Authorized Peer</tt> can be an operations gateway or another managed endpoint. A local provisioning agent installs configuration through an authorized local interface. These are operational roles, not additional protocol message fields.</t>
      <t>The Client and Server roles in the candidate exchange are determined by who initiates that exchange; they do not imply that an endpoint is a manufacturer, enrollment authority, or fleet controller. Operational guidance applies to a deployment that chooses this model. Requirements within <xref target="candidate-bootstrap"/> describe only the candidate profile and do not make that profile an IETF standard or a mandatory IoT mechanism.</t>
    </section>
    <section anchor="scope">
      <name>Scope and External Protocol Boundary</name>
      <t>The scope is the operation of authorized peer relationships in an IoT administrative domain that already uses WireGuard. It includes readiness to provision a PSK, identity-to-key authorization, installation status, rotation, failed-update recovery, isolation, and end-of-life actions. It does not select WireGuard over other secure-channel technologies or prescribe its use for all IoT devices.</t>
      <t>Initial trust establishment is a prerequisite, not an outcome of the candidate PSK exchange. The operator must already authorize the peer identity, its WireGuard public key, the TLS control service, and any ML-DSA credential. A successful TLS handshake or bootstrap record cannot establish device ownership or create an authorization binding. The model is therefore a step within device onboarding after initial trust provisioning, not a complete zero-touch enrollment protocol.</t>
      <t>The boundary with WireGuard is its existing per-peer <tt>PresharedKey</tt> configuration input and observation of the resulting native handshake. Neither endpoint requires a new native WireGuard message, field, algorithm identifier, or configuration API extension. Local installation interfaces remain platform specific; no common management API is specified here.</t>
      <t>Implementers need to identify the external WireGuard specification and implementations against which they validate compatibility. If an assumption about the PSK input, rekey behavior, or installation semantics cannot be confirmed without an upstream change, that dependency needs to be resolved with the external maintainers or the design reconsidered.</t>
    </section>
    <section anchor="deployment">
      <name>IoT Deployment Models and Applicability</name>
      <section anchor="deployment-gateways">
        <name>Industrial Gateway Fleet</name>
        <t>An operator manages gateways at many industrial sites. Each gateway has an authorized relationship with an operations gateway for remote diagnostics or maintenance. Local devices can continue to use their existing application protocols. The operational task is to enroll each site gateway into the authorized tunnel service, rotate its PSK without manual key copying, and remove access when the gateway is replaced or the site is retired.</t>
        <t>In this model the site gateway, rather than every downstream sensor, performs the candidate exchange. A tunnel terminating at the gateway does not provide application-layer end-to-end protection, identity, or authorization for the devices behind it. The operator still needs site-side access controls and application security appropriate to those devices.</t>
      </section>
      <section anchor="deployment-devices">
        <name>Capable Devices in a Managed Domain</name>
        <t>A managed controller with sufficient resources can itself be the WireGuard peer. The operator binds its inventory identity and tunnel public key to an authorized maintenance peer before provisioning. Limited or absent local user interfaces make automated provisioning, status collection, recovery, and revocation relevant even when the controller is not a highly constrained sensor.</t>
        <t>A tunnel permits network communication only as allowed by separate policy. Successful PSK establishment does not authorize every service behind a peer, confer administrator privileges on a remote application, or replace device-level access control.</t>
      </section>
      <section anchor="deployment-resources">
        <name>Resource and Connectivity Preconditions</name>
        <t>The candidate requires TCP, mutually authenticated TLS 1.3, ML-KEM-768, ML-DSA, protected credential storage, and privileged local configuration access. These requirements are not assumed to fit every constrained-node class described in <xref target="RFC7228"/>. An operator needs to evaluate memory, cryptographic execution time, entropy, message sizes, and energy use on the selected endpoint. No measurements or suitability claim for highly constrained devices are made here.</t>
        <t>The control service must be reachable before the target tunnel is established and during recovery from its failure. DNS, certificate validation, time or credential-validity information, and any remote signing service must also have a usable path. Using only the target tunnel to reach services needed to repair that tunnel creates a circular dependency. A restricted onboarding network or an independent authorized management path can address this dependency; this document does not define either one.</t>
        <t>The candidate carries multi-kilobyte records and limits each exchange to 30 seconds. Operators need to validate that their endpoint and network meet those limits, and bound the number of concurrent exchanges. Fleet-level scheduling and retry policy cannot extend an individual transaction deadline.</t>
      </section>
    </section>
    <section anchor="operational-requirements">
      <name>Operational Requirements</name>
      <t>The following requirements identify the intended operational contribution. They are independent of whether the candidate exchange is ultimately developed in this or another venue.</t>
      <ul>
        <li>
          <t><tt>Authorized inventory:</tt> Operators SHOULD maintain an authoritative mapping of inventory identity, expected peer, WireGuard public keys, credential validity, approved suite, and lifecycle state. The bootstrap transcript does not replace that inventory or authorize its own contents.</t>
        </li>
        <li>
          <t><tt>Separation of trust and key establishment:</tt> A provisioning agent MUST obtain identity and key bindings through an authorized channel. Cryptographic verification alone MUST NOT promote an unapproved endpoint into an authorized peer.</t>
        </li>
        <li>
          <t><tt>Per-peer installation control:</tt> Configuration changes MUST target the authorized peer and be serialized against changes to its identity, ownership, or lifecycle authorization. An in-flight bootstrap MUST NOT override a subsequent revocation or install against a superseded binding.</t>
        </li>
        <li>
          <t><tt>Observable completion:</tt> Operators SHOULD distinguish bootstrap completion, local installation, and verified tunnel readiness for the intended installation generation. A local success indication MUST NOT be presented as proof of an atomic configuration change at both endpoints. The observation and reconciliation procedure is described in <xref target="recovery"/>.</t>
        </li>
        <li>
          <t><tt>Recovery and isolation:</tt> Operators SHOULD define who can retry, reconcile, disable, and reprovision a peer, including when its tunnel is unavailable. Recovery MUST NOT silently remove the PSK requirement or reinstate revoked authorization.</t>
        </li>
        <li>
          <t><tt>Fleet operation:</tt> Operators SHOULD bound connection and cryptographic workloads, stagger rotations, and collect non-secret status sufficient to identify failed or stale peer relationships. Operational success thresholds require deployment-specific validation.</t>
        </li>
      </ul>
    </section>
    <section anchor="onboarding">
      <name>Device Onboarding and Tunnel Activation</name>
      <t>For deployments using the candidate in <xref target="candidate-bootstrap"/>, the following sequence places PSK establishment within the broader onboarding workflow. Inventory operations and management-channel messages in this sequence are local deployment functions, not additions to the candidate wire protocol.</t>
      <ol>
        <li>
          <t>The operator admits the device or gateway into inventory and establishes initial trust through an authorized enrollment or configuration process. Before the PSK transaction, both endpoints hold the exact expected peer identities, WireGuard public keys, credential bindings, suite policy, and authorized TLS control-service configuration.</t>
        </li>
        <li>
          <t>The operator makes the control service reachable using a restricted onboarding or management path. The endpoint validates its control-service credentials and the prerequisites for random-number generation, credential validation, and protected local installation. User traffic need not be authorized merely because this restricted path is available.</t>
        </li>
        <li>
          <t>The endpoints perform a fresh bootstrap transaction. They validate the expected identities, roles, key bindings, freshness, and key-confirmation values. The candidate does not transfer a raw PSK or allow a record to replace the provisioned trust binding.</t>
        </li>
        <li>
          <t>Before committing configuration, each agent checks that its locally authorized binding and lifecycle state still match the transaction and the installation generation assigned through authorized management. It records the installation intent, installs the PSK only for that peer through an authorized local interface, and verifies the resulting local configuration as described in <xref target="installation-local"/>. Updates are atomic within each endpoint; the five-message exchange does not make the two installations atomic.</t>
        </li>
        <li>
          <t>After collecting fresh installation reports from both endpoints, the operator verifies a new native WireGuard handshake and a fresh bidirectional, non-actuating tunnel probe as described in <xref target="installation-readiness"/>. An old handshake timestamp or data passing over a previously established transport session is not evidence that the replacement PSK is in use. If this check fails or its attribution is uncertain, the relationship is not ready and enters the recovery process in <xref target="recovery"/>.</t>
        </li>
        <li>
          <t>The operator applies or confirms the separately authorized network-access policy and records the observed lifecycle state. Tunnel readiness is one input to admission; it is not a grant of unrestricted access or proof that all applications are healthy.</t>
        </li>
      </ol>
    </section>
    <section anchor="lifecycle">
      <name>Lifecycle Management and Recovery</name>
      <section anchor="rotation-operations">
        <name>Credential Change and PSK Rotation</name>
        <t>Operators SHOULD define rotation triggers, maintenance windows, credential-validity checks, and the response to suspected compromise. An ML-DSA identity change, WireGuard public-key replacement, or ownership change first requires an authorized update of the associated inventory binding. A fresh PSK exchange cannot authorize that change by itself.</t>
        <t>Before changing the active PSK, the operator needs an available recovery path and a policy for the affected application traffic. Native WireGuard has one configured PSK per peer; the candidate does not provide dual-PSK negotiation, coordinated activation, or a guarantee of uninterrupted service. Neither receipt of ClientAck nor a successful bootstrap proves that the other peer has installed the PSK.</t>
        <t>For scheduled rotation, policy can permit an existing, still-authorized tunnel to remain active while a replacement is being prepared. Such permission is not suitable evidence of recovery after installation and does not override a compromise response or a revocation. A deployment MUST NOT silently roll back to a revoked key or a configuration without the required PSK. Superseded secret material is removed as described in <xref target="replay"/>.</t>
      </section>
      <section anchor="iot-configuration-recovery">
        <name>Configuration Restoration and Staged Device Updates</name>
        <t>Operators SHOULD retain protected, authorized configuration information sufficient to reconstruct the intended peer relationship and management access. Restoring a backup MUST recheck current identity, ownership, revocation, and installation-generation authority. It MUST NOT reopen a completed bootstrap, restore a superseded PSK as an automatic recovery action, or treat a saved readiness observation as current. When retained installation evidence cannot be reconciled, restoration proceeds through fresh provisioning as described in <xref target="recovery"/>.</t>
        <t>Software or firmware needed for the selected cryptographic functions is installed through the deployment's separately authorized update mechanism. Operators SHOULD stage compatibility and resource checks, update cohorts, and credential preparation before activating the profile. This document defines neither a firmware discovery or distribution protocol nor a common configuration-backup format. Device updates and backup restoration are lifecycle dependencies; they do not provide authority for a new cryptographic exchange under the IOTOPS charter.</t>
      </section>
      <section anchor="recovery">
        <name>Installation-State Reconciliation and Failure Recovery</name>
        <t>The candidate can fail after one endpoint has obtained or installed the new PSK. TLS delivery, key confirmation, and local atomic writes do not provide distributed commit or an authenticated installation acknowledgement. Operators need to treat this case as an uncertain provisioning result rather than declare both endpoints ready.</t>
        <t>The following procedure uses an independent authorized management path to reconcile the operator's intended configuration with observations from each endpoint. A local transition or receipt of ClientAck MUST NOT be treated as evidence of remote installation. These are deployment management observations, not additional candidate records or native WireGuard states.</t>
        <section anchor="installation-generation">
          <name>Installation Generations and Observed States</name>
          <t>For each authorized peer relationship, the management service SHOULD retain an authoritative installation record containing the inventory identities, both WireGuard public keys, the current identity and authorization binding revision, an ordered installation generation, and the candidate SID once established. A generation identifies one intended installation and is associated with exactly one successful bootstrap result. The random SID correlates that exchange; it is not an ordering value or proof of installation.</t>
          <t>Generation allocation and recovery of the authoritative record MUST prevent reuse of a cancelled or superseded generation. Concurrent controllers and local agents MUST serialize changes to the same relationship. Installation requests MUST be conditional on the expected generation and current authorization revision; stale or conflicting requests MUST be rejected. A duplicate management request for an already verified installation can return its current status, but MUST NOT reopen a cancelled operation, repeat a completed bootstrap record, or authorize a different result under the same generation.</t>
          <t>Each endpoint SHOULD distinguish transaction pending, peer key confirmation verified, local installation verified, readiness pending, and failure or unknown. The management service records relationship readiness only after the checks in <xref target="installation-readiness"/>. It MUST retain desired state separately from reported state and MUST NOT promote a remote observation solely from the other endpoint's report. A configuration or authorization change, restart, or loss of relevant evidence invalidates the affected readiness observation until revalidated.</t>
        </section>
        <section anchor="installation-status">
          <name>Authenticated and Fresh Status Collection</name>
          <t>Status queries and reports MUST use an authenticated, authorized management mechanism reachable independently of the target tunnel. Each endpoint reports its own observed state, peer binding, authorization revision, installation generation, associated SID, startup instance identifier, observation sequence within that instance, and any installation or readiness failure category. An installed-state report MUST identify the locally verified generation, rather than merely echo the requested generation. Status information MUST NOT contain the PSK, KEM shared secret, private keys, or a complete secret-bearing configuration.</t>
          <t>The management mechanism MUST bind a report to a fresh outstanding query, for example by authenticating an unpredictable query challenge with the report, and reject replayed or superseded responses. The startup instance identifier MUST change when the endpoint or provisioning agent restarts. Sequence values are compared only within that instance; a new instance requires fresh local inspection and readiness verification. These checks do not depend on equal clocks at the two endpoints. Deployment policy SHOULD bound the age of observations used for a readiness decision and obtain new reports after a disconnect or uncertain management operation.</t>
          <t>Matching generation, SID, and binding reports provides correlation, not proof that the two running WireGuard peers hold the same PSK. Local configuration verification and the subsequent native-handshake check are both required. This procedure introduces no PSK fingerprint exchange or additional key-confirmation message.</t>
        </section>
        <section anchor="installation-local">
          <name>Local Verification and Crash Recovery</name>
          <t>A privileged local provisioning agent MUST associate the intended generation and SID with its own successfully confirmed bootstrap result under the current authorized binding. Before applying the update, it SHOULD durably record the installation intent. It MUST verify the resulting running peer configuration against that protected local result before reporting local installation verified, and SHOULD durably record the verified outcome. Where startup configuration is retained, the agent MUST also verify that it selects the same authorized generation; otherwise, startup MUST leave the relationship unavailable until a fresh provisioning procedure succeeds. Secret inspection and comparison remain local to the trusted installation component.</t>
          <t>Recording intent before application and recording success after verification does not eliminate a crash window. On restart or incomplete persistence, an old success record alone MUST NOT establish the current installation state. The agent reinspects running and startup configuration, reports the new startup instance, and repeats readiness verification. If it cannot securely associate the actual configuration with the protected authorized result, it MUST report unknown and follow <xref target="installation-reconcile"/>. Protected storage integrity, access control, and detection of stale records are prerequisites for relying on retained installation evidence.</t>
        </section>
        <section anchor="installation-readiness">
          <name>Native Handshake and Tunnel Readiness</name>
          <t>After fresh reports establish that both endpoints have verified the same currently authorized generation and SID, the management service SHOULD initiate a bounded readiness check. The check MUST establish a new native handshake whose initiation occurs after both installations are verified, and obtain local evidence from both endpoints that this handshake belongs to the intended installation. A nonzero or recently changed handshake timestamp alone is insufficient: a handshake initiated before the update, or traffic protected by an earlier transport session, MUST NOT satisfy the check.</t>
          <t>The operator MUST validate the platform procedure used to discard or exclude earlier pending handshake and transport state. Updating PresharedKey MUST NOT be assumed to discard that state or force a new handshake. A tested procedure can require quiescing affected traffic and removing and recreating the peer relationship, while restoring its exact authorized configuration, routing, and access controls. This document specifies no portable force-handshake API and promises no uninterrupted transition. If the platform cannot attribute the handshake and subsequent probe to the new installation, readiness remains unverified.</t>
          <t>Following that handshake, the endpoints MUST complete a fresh bidirectional tunnel probe using an unpredictable challenge and a correlated response with a bounded timeout. Probe traffic MUST use the newly established transport state and MUST NOT trigger a production control action. Restricted probe access can be permitted before normal application access. Each endpoint reports the local verification outcome for the generation, SID, startup instance, and current check. The management service records readiness only when both reports agree with the intended authorized installation and the probe succeeds. This is evidence of tunnel operation at the time of the check, not continuing application health or an atomic distributed commit.</t>
        </section>
        <section anchor="installation-reconcile">
          <name>Reconciliation Decisions and Bounded Recovery</name>
          <t>Reconciliation first checks current identity bindings and authorization, then gathers fresh reports from both endpoints. The management service MUST NOT infer a missing endpoint's state from the available report. The following decisions apply after an interruption; normal progress of an authorized, unexpired operation can continue without treating it as a recovery retry.</t>
          <table>
            <name>Installation Reconciliation Decisions</name>
            <thead>
              <tr><th>Observed condition</th><th>Recovery action</th></tr>
            </thead>
            <tbody>
              <tr><td>Both endpoints verify the same intended, authorized generation and SID, but readiness is unverified.</td><td>Perform the bounded new-handshake and bidirectional-probe check. A previous readiness report is insufficient.</td></tr>
              <tr><td>Only one installation can be verified, generations or SIDs differ, or relevant local records cannot be trusted or recovered.</td><td>Cancel obsolete incomplete work. Reprovision both endpoints using a new authorized generation and a fresh bootstrap, then repeat installation and readiness verification.</td></tr>
              <tr><td>A handshake or probe fails or cannot be attributed to the intended installation.</td><td>Keep the relationship failed or unknown, inspect binding, installation, and network conditions, and apply bounded recovery retries.</td></tr>
              <tr><td>A peer identity, ownership binding, or authorization is revoked or superseded.</td><td>Reject stale installation work and enforce the current revocation or isolation policy, including existing transport sessions.</td></tr>
              <tr><td>An endpoint or independent management path is unreachable.</td><td>Retain failure or unknown status, withhold readiness-dependent access, and retry through the authorized recovery path or await authorized intervention.</td></tr>
            </tbody>
          </table>
          <t>A fresh recovery bootstrap MUST use new randomness, SID, and KEM state under current authorization. Retries MUST NOT reuse completed records, reopen cancelled transactions, or extend the candidate's 30-second deadline or pending-secret lifetime. A separate bounded management deadline can govern installation reconciliation and readiness checking; it does not change the bootstrap timeout. Retry policy SHOULD bound attempts and elapsed recovery time and use backoff with scheduling jitter across the fleet.</t>
          <t>The default recovery action for an uncertain replacement is fresh reprovisioning. A recovery agent MUST NOT automatically restore a superseded PSK or clear the PSK requirement to regain connectivity. Revocation takes precedence over retained configuration and status records. An unavailable management path does not authorize rollback. Existing traffic during a planned rotation remains subject to <xref target="rotation-operations"/>; it does not satisfy replacement readiness or prevent enforcement of isolation policy.</t>
        </section>
        <section anchor="installation-management-scope">
          <name>Deployment Management Boundary</name>
          <t>This procedure identifies the information, local checks, and recovery decisions needed by an authorized deployment management system. The system supplies the status representation, authenticated query and report encoding, generation coordination, protected persistence, and platform-specific installation and handshake controls. None is added to the five-record candidate exchange or to native WireGuard. Deployments using different management systems need an agreed mapping of these functions before claiming cross-vendor automated recovery interoperability.</t>
          <t>The operational procedure does not require distributed atomic commit or a universal management API. It permits a service interruption and leaves readiness unverified when the required evidence cannot be obtained. Defining a common interoperable management protocol would be separate work with its own specification and review requirements.</t>
        </section>
      </section>
      <section anchor="revocation-operations">
        <name>Revocation and Quarantine</name>
        <t>Revoking a bootstrap credential prevents future authorized provisioning only to the extent that current authorization is checked. It does not by itself terminate an existing WireGuard session. Clearing a PresharedKey is also not peer revocation and can select operation without that additional secret.</t>
        <t>For an isolated or revoked endpoint, the operator MUST prevent pending and future provisioning from reauthorizing it, and disable or remove the affected peer relationship or enforce equivalent network isolation. The enforcement action must cover existing transport sessions as well as future handshakes. The operator SHOULD invalidate relevant credential and key bindings and remove secret material according to the incident policy.</t>
        <t>An offline endpoint may be unable to receive an immediate revocation action. The reachable peer and network enforcement points must then deny its access, and inventory must retain its revoked state until the device is recovered or retired. This document does not guarantee delivery of lifecycle commands to an unreachable device.</t>
      </section>
      <section anchor="retirement">
        <name>Replacement, Ownership Transfer, and End of Life</name>
        <t>When replacing or retiring a device, the operator SHOULD remove its peer configuration and access authorization, cancel pending transactions, and delete PSKs, private keys, tokens, and cached secret-bearing configuration from stores under its control. Inventory should retain only the non-secret information needed for audit and prevention of accidental re-enrollment.</t>
        <t>An ownership transfer requires a new authorized trust and enrollment decision. Reusing a tunnel name or hardware label does not authorize reuse of the previous owner's identity binding or secrets. Device reset, secure erasure, and transfer of ownership are functions of the device lifecycle system, not of the bootstrap exchange.</t>
      </section>
      <section anchor="fleet-observability">
        <name>Fleet Scheduling and Observability</name>
        <t>Operators SHOULD stage updates, limit simultaneous TLS connections and expensive signature or KEM operations, and test behavior under network loss, restart, and credential-service failure. Large-fleet scheduling is separate from the per-transaction protocol timeout. The draft makes no performance or availability claim for a particular deployment scale.</t>
        <t>Useful status includes an appropriately scoped inventory identifier, the selected peer relationship, authorization revision, intended and locally verified installation generations, associated SID, startup instance, observed lifecycle stage, failure category, and freshness of the readiness check. <xref target="installation-status"/> describes collection of current observations. Such metadata is managed outside the candidate exchange and is not a new protocol field. Operators SHOULD minimize identity and topology disclosure in logs. Private keys, KEM shared secrets, PSKs, and complete secret-bearing configurations MUST NOT be logged.</t>
      </section>
    </section>
    <section anchor="ietf-relationship">
      <name>Relationship to IETF Work and Review Boundaries</name>
      <t>The requested IOTOPS discussion concerns operational requirements, device onboarding into an already selected tunnel service, administrative control, access control, isolation, recovery, and end-of-life management. These correspond to topics identified in the Informational and BCP portion of the IOTOPS charter <xref target="IOTOPS-CHARTER"/>. Correspondence with those topics is a reason to request feedback, not evidence of working-group adoption.</t>
      <t>The current charter's Standards Track and BCP scope identifies MUD, configuration backup and recovery, and software or firmware upgrade solutions. A newly defined cryptographic exchange does not become an in-scope Standards Track item merely because IoT equipment can use it. This revision therefore seeks Informational publication of the operational discussion. Working-group chairs and the responsible Area Directors would need to determine the venue and review path for any further protocol development.</t>
      <table>
        <name>IoT Operational Concerns Addressed by This Document</name>
        <thead><tr><th>Charter topic</th><th>Operational contribution</th></tr></thead>
        <tbody>
          <tr><td>Factory provisioning and onboarding</td><td>Independently authorized identity-to-key bindings and readiness checks before tunnel admission.</td></tr>
          <tr><td>Administrative and access control</td><td>Serialized per-peer changes, current authorization, and access policy separate from key establishment.</td></tr>
          <tr><td>Remediation and configuration recovery</td><td>Independent management, current installation reports, restart reconciliation, and fresh reprovisioning.</td></tr>
          <tr><td>Isolation and end of life</td><td>Enforcement on existing sessions, removal of peer access, and authorized replacement or ownership transfer.</td></tr>
          <tr><td>Operational security guidance</td><td>Staged fleet rotation, bounded retry, resource assessment, and non-secret failure evidence.</td></tr>
        </tbody>
      </table>
      <t>Existing enrollment mechanisms, for example BRSKI <xref target="RFC8995"/>, can address initial trust provisioning in deployments that select them. This document does not extend BRSKI, require it, or specify an integration with it. Such enrollment does not automatically establish the exact ML-DSA-to-WireGuard-key authorization binding required by the candidate profile. Likewise, a deployment using MUD <xref target="RFC8520"/> can use its existing network-access policy mechanisms; this document adds no MUD behavior, and MUD policy is not a substitute for peer credential authorization.</t>
      <t>The external WireGuard specification and implementation behavior remain under their existing maintenance arrangements. The proposed operational model uses the available PSK input instead of requesting changes to WireGuard. Compatibility assumptions and interoperability results need to be documented, and feedback from WireGuard maintainers would be valuable. No agreement, participation, or endorsement by those maintainers is assumed.</t>
      <t>The candidate exchange in <xref target="candidate-bootstrap"/> is new protocol work, even though it runs outside native WireGuard. It needs appropriate security review of authentication, key derivation, key confirmation, and its composition with the native PSK input, as well as independent interoperability testing. Keeping it in an appendix does not remove that need or establish IOTOPS authority to standardize it. It can be separated into a document for an appropriate venue if the chairs and relevant security experts consider that preferable. The authors seek the chairs' guidance on the operational document's fit with IOTOPS and the review venue for any separate candidate exchange. These are coordination questions rather than technical failure conditions of the exchange. Validation coverage is discussed in <xref target="implementation-validation"/>.</t>
    </section>
    <section anchor="security">
      <name>Security Considerations</name>
      <t>The post-quantum contribution depends on ML-KEM-768, ML-DSA, fresh randomness, key confidentiality, and authorized identity bindings. Ordinary TLS certificates or TLS key exchange MUST NOT be described as post-quantum merely because this carrier uses them. The signed inner exchange and confirmation keys authenticate and confirm the post-quantum provisioning material.</t>
      <t>All record headers and lengths are checked before expensive processing. The signed ClientInit hash prevents substitution of endpoint identities, WireGuard keys, suite, tunnel, or Client nonce. Fresh SID and KEM state, one-use transitions, finite deadlines, and confirmation MACs prevent stale records or a different KEM secret from producing an accepted PSK. Credential failures and post-quantum failures MUST NOT trigger a silent classical fallback.</t>
      <t>The native WireGuard handshake combines its existing Curve25519 state with the PSK according to NoiseIKpsk2. This draft does not provide a new hybrid security proof or alter the native anti-replay, cookie, rekey, and transport mechanisms. Endpoint compromise, leakage of secret-bearing configurations, traffic analysis, and denial of service remain outside the cryptographic guarantees of the bootstrap.</t>
      <t>A correctly authenticated exchange does not establish device ownership or authorize an inventory change. An attacker with access to the management channel or local configuration interface can bypass the intended identity-to-key policy even if the candidate's cryptography is sound. Authorization must therefore be checked again at installation, with revocation and replacement taking precedence over stale pending transactions.</t>
      <t>Replayed status, stale durable records, concurrent installation requests, and pending handshakes from an earlier configuration can produce a false readiness indication. <xref target="recovery"/> requires fresh authenticated observations, current authorization, local configuration verification, and a new native handshake and probe. These checks rely on trusted management and local agents; they do not attest the integrity of a compromised endpoint or make matching metadata proof of secret equality.</t>
      <t>IoT lifecycle failures include orphaned peer configurations, offline devices retaining secrets, clock or credential-status failures, and successful local installation without a matching remote update. The operational procedures in <xref target="lifecycle"/> address handling of these conditions but do not provide a distributed transaction protocol, secure erasure guarantee, or proof of availability. A compromised endpoint remains outside the candidate's cryptographic guarantees even when operational isolation is attempted.</t>
      <t>The management and bootstrap paths expose services before the tunnel is ready and need restricted reachability and resource controls. Gateway termination limits protection to the tunnel endpoints; downstream application security is a separate requirement. Credentials, logs, and inventory also reveal device identities and topology and require appropriate access and retention controls.</t>
    </section>
    <section anchor="iana">
      <name>IANA Considerations</name>
      <t>This revision makes no IANA registration request. The candidate ALPN string retained in <xref target="candidate-identifiers"/> is an unassigned discussion value, not an allocation asserted by this document. If development of that candidate proceeds, its proponents need to confirm an appropriate registration and review path before representing any identifier as assigned. No service port or native WireGuard identifier is requested.</t>
    </section>
    <section anchor="implementation-validation">
      <name>Operational Validation and Interoperability Considerations</name>
      <t>Validation of this operational model needs to distinguish the candidate key-establishment exchange, authorized installation, native WireGuard readiness, and lifecycle recovery. The following guidance applies to deployments evaluating the candidate in <xref target="candidate-bootstrap"/>.</t>
      <section anchor="implementation-material">
        <name>Candidate Exchange Test Vectors</name>
        <t>A set of test vectors should cover the required ML-KEM-768 and ML-DSA-65 suite and any optional signature parameter sets being evaluated. Useful values include the five encoded bootstrap records, exact signature inputs, transcript hashes, derived PSK, both confirmation keys, and confirmation MACs.</t>
        <t>Positive and negative cases should exercise the authenticated TLS 1.3 carrier, record framing, signatures, key derivation, identity and WireGuard-key bindings, malformed records, replay rejection, and transaction deadlines. Published vectors should identify the draft revision, parameter sets, and expected results. Included test secrets must be clearly designated as public test material and must not be used in operational deployments.</t>
        <t>Successful confirmation establishes possession of key material; it does not demonstrate local installation or a usable native tunnel. Validation should report bootstrap completion, authorized and locally verified installation at both endpoints, a new native handshake attributable to that installation, and fresh bidirectional probe delivery separately, following <xref target="installation-readiness"/>. An exchange transcript or a simulated payload transfer is insufficient evidence of native tunnel readiness.</t>
      </section>
      <section anchor="validation-coverage">
        <name>Security, Recovery, and Interoperability Coverage</name>
        <t>Security review should examine the authenticated transcript, identity and WireGuard-key bindings, role separation, key derivation, confirmation, common suite, and the derived PSK's contribution to native NoiseIKpsk2. Review should also account for initial trust provisioning and the TLS and management paths.</t>
        <t>Integration tests should distinguish successful key confirmation, verified local installation, and readiness for the intended generation. Useful failure cases include a disconnect around ClientAck, a failed or one-sided update, crashes before and after configuration application or durable recording, replayed status, agent restart, generation or SID mismatch, concurrent controller requests, an authorization change, and revocation during a pending exchange. Tests should also cover an earlier pending handshake, old transport traffic that continues after a PSK change, probe timeout, an unavailable independent management path, and bounded retry behavior. The management-based recovery decisions and interoperability boundary are described in <xref target="recovery"/> and <xref target="installation-management-scope"/>.</t>
        <t>An independent interoperability report should identify the bootstrap implementations, external WireGuard specification and implementations, draft revision, suite, installation interface, and failure cases. A round trip between instances of one implementation or agreement on test vectors alone does not establish independent interoperability.</t>
      </section>
      <section anchor="operational-validation">
        <name>Deployment Evaluation</name>
        <t>Deployment evaluation should cover the gateway and managed-device scenarios in <xref target="deployment"/>, including independent management reachability, access policy, credential handling, and ownership changes. An operator should identify the fleet cohort, expected lifecycle transition, evidence required to restore access, failure threshold, and escalation path. Relevant cases include first admission, scheduled rotation, one-sided installation, offline revocation, restored configuration, quarantine, replacement, and retirement.</t>
        <t>Measurements for a particular endpoint, network, or fleet should cover CPU, memory, control traffic, energy where relevant, transaction deadlines, recovery time, and rotation impact. The results should identify the equipment, workload, and failure conditions evaluated. This document does not establish suitability for every constrained device or deployment scale.</t>
        <t>Operational reports should distinguish completed bootstrap exchanges, verified installations at both peers, newly verified tunnel readiness, and admission under current policy. Useful outcomes include the number of failed or unknown relationships, time to remediation, maintenance traffic and service interruption, rejection of stale provisioning, and enforcement against a revoked peer. A laboratory exchange or successful tunnel probe alone is not evidence of fleet-wide lifecycle management.</t>
      </section>
    </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 fullname="Scott Bradner" initials="S." surname="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 fullname="Barry Leiba" initials="B." surname="Leiba"/>
            <date year="2017" month="May"/>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
        </reference>
        <reference anchor="RFC5869" target="https://www.rfc-editor.org/info/rfc5869">
          <front>
            <title>HMAC-based Extract-and-Expand Key Derivation Function (HKDF)</title>
            <author fullname="Hugo Krawczyk" initials="H." surname="Krawczyk"/>
            <author fullname="Pasi Eronen" initials="P." surname="Eronen"/>
            <date year="2010" month="May"/>
          </front>
          <seriesInfo name="RFC" value="5869"/>
        </reference>
        <reference anchor="FIPS203" target="https://csrc.nist.gov/pubs/fips/203/final">
          <front>
            <title>Module-Lattice-Based Key-Encapsulation Mechanism Standard</title>
            <author fullname="National Institute of Standards and Technology" initials="N." surname="NIST"/>
            <date year="2024" month="August"/>
          </front>
          <seriesInfo name="FIPS" value="203"/>
        </reference>
        <reference anchor="FIPS204" target="https://csrc.nist.gov/pubs/fips/204/final">
          <front>
            <title>Module-Lattice-Based Digital Signature Standard</title>
            <author fullname="National Institute of Standards and Technology" initials="N." surname="NIST"/>
            <date year="2024" month="August"/>
          </front>
          <seriesInfo name="FIPS" value="204"/>
        </reference>
        <reference anchor="RFC8446" target="https://www.rfc-editor.org/info/rfc8446">
          <front>
            <title>The Transport Layer Security (TLS) Protocol Version 1.3</title>
            <author fullname="Eric Rescorla" initials="E." surname="Rescorla"/>
            <date year="2018" month="August"/>
          </front>
          <seriesInfo name="RFC" value="8446"/>
        </reference>
        <reference anchor="RFC9293" target="https://www.rfc-editor.org/info/rfc9293">
          <front>
            <title>Transmission Control Protocol (TCP)</title>
            <author fullname="Wesley Eddy" initials="W." surname="Eddy"/>
            <date year="2022" month="August"/>
          </front>
          <seriesInfo name="RFC" value="9293"/>
        </reference>
        <reference anchor="RFC7301" target="https://www.rfc-editor.org/info/rfc7301">
          <front>
            <title>Transport Layer Security (TLS) Application-Layer Protocol Negotiation Extension</title>
            <author fullname="Stephan Friedl" initials="S." surname="Friedl"/>
            <author fullname="Andrei Popov" initials="A." surname="Popov"/>
            <author fullname="Adam Langley" initials="A." surname="Langley"/>
            <author fullname="Emile Stephan" initials="E." surname="Stephan"/>
            <date year="2014" month="July"/>
          </front>
          <seriesInfo name="RFC" value="7301"/>
        </reference>
        <reference anchor="WIREGUARD" target="https://www.wireguard.com/protocol/">
          <front>
            <title>The WireGuard Protocol</title>
            <author fullname="Jason A. Donenfeld" initials="J." surname="Donenfeld"/>
            <date year="2020"/>
          </front>
        </reference>
        <reference anchor="NOISE" target="https://noiseprotocol.org/noise.html">
          <front>
            <title>The Noise Protocol Framework</title>
            <author fullname="Trevor Perrin" initials="T." surname="Perrin"/>
            <date year="2018"/>
          </front>
        </reference>
      </references>
      <references>
        <name>Informative References</name>
        <reference anchor="IOTOPS-CHARTER" target="https://datatracker.ietf.org/doc/charter-ietf-iotops/02/">
          <front>
            <title>IOT Operations Working Group Charter</title>
            <author>
              <organization>Internet Engineering Task Force</organization>
            </author>
            <date year="2025" month="April" day="18"/>
          </front>
          <seriesInfo name="Charter" value="charter-ietf-iotops-02"/>
        </reference>
        <reference anchor="RFC7228" target="https://www.rfc-editor.org/info/rfc7228">
          <front>
            <title>Terminology for Constrained-Node Networks</title>
            <author fullname="C. Bormann" initials="C." surname="Bormann"/>
            <author fullname="M. Ersue" initials="M." surname="Ersue"/>
            <author fullname="A. Keranen" initials="A." surname="Keranen"/>
            <date year="2014" month="May"/>
          </front>
          <seriesInfo name="RFC" value="7228"/>
          <seriesInfo name="DOI" value="10.17487/RFC7228"/>
        </reference>
        <reference anchor="RFC8576" target="https://www.rfc-editor.org/info/rfc8576">
          <front>
            <title>Internet of Things (IoT) Security: State of the Art and Challenges</title>
            <author fullname="O. Garcia-Morchon" initials="O." surname="Garcia-Morchon"/>
            <author fullname="S. Kumar" initials="S." surname="Kumar"/>
            <author fullname="M. Sethi" initials="M." surname="Sethi"/>
            <date year="2019" month="April"/>
          </front>
          <seriesInfo name="RFC" value="8576"/>
          <seriesInfo name="DOI" value="10.17487/RFC8576"/>
        </reference>
        <reference anchor="RFC8995" target="https://www.rfc-editor.org/info/rfc8995">
          <front>
            <title>Bootstrapping Remote Secure Key Infrastructure (BRSKI)</title>
            <author fullname="M. Pritikin" initials="M." surname="Pritikin"/>
            <author fullname="M. Richardson" initials="M." surname="Richardson"/>
            <author fullname="T. Eckert" initials="T." surname="Eckert"/>
            <author fullname="M. Behringer" initials="M." surname="Behringer"/>
            <author fullname="K. Watsen" initials="K." surname="Watsen"/>
            <date year="2021" month="May"/>
          </front>
          <seriesInfo name="RFC" value="8995"/>
          <seriesInfo name="DOI" value="10.17487/RFC8995"/>
        </reference>
        <reference anchor="RFC8520" target="https://www.rfc-editor.org/info/rfc8520">
          <front>
            <title>Manufacturer Usage Description Specification</title>
            <author fullname="E. Lear" initials="E." surname="Lear"/>
            <author fullname="R. Droms" initials="R." surname="Droms"/>
            <author fullname="D. Romascanu" initials="D." surname="Romascanu"/>
            <date year="2019" month="March"/>
          </front>
          <seriesInfo name="RFC" value="8520"/>
          <seriesInfo name="DOI" value="10.17487/RFC8520"/>
        </reference>
      </references>
    </references>
    <section anchor="candidate-bootstrap">
      <name>Candidate Bootstrap Exchange for Further Review</name>
      <t>This appendix preserves the candidate external PSK exchange so reviewers can examine how the operational model relates to a concrete design. It is not an IETF-approved protocol and is not presented as an IoT baseline. Its requirements apply only to an implementation choosing this candidate profile. Operational validation and interoperability considerations are described in <xref target="implementation-validation"/>. Installation reconciliation uses the deployment management procedure in <xref target="recovery"/>, subject to the interoperability boundary in <xref target="installation-management-scope"/>. Protocol-venue coordination is discussed in <xref target="ietf-relationship"/>.</t>
      <t>The candidate uses ML-KEM-768 and ML-DSA to establish and authenticate a 32-octet PSK before the native WireGuard handshake. TLS 1.3 provides a transport security layer, while the candidate's post-quantum contribution comes from the inner KEM and signatures. Ordinary TLS certificates and key exchange are not assumed to be post-quantum.</t>
      <t>The wire version remains <tt>wireguard-pq-bootstrap-v2</tt>. This editorial and operational revision does not change the five record types, binary encodings, transcript inputs, algorithm baseline, signature context, or key-derivation formulas. The unassigned identifier discussion is in <xref target="candidate-identifiers"/>.</t>
      <section anchor="bootstrap-scope">
        <name>Candidate Profile Scope</name>
        <t>The external control plane establishes a PSK bound to a configured pair of WireGuard static public keys, two expected ML-DSA identities, a tunnel name, a suite, and a fresh transaction. Both endpoints MUST obtain the WireGuard public keys from their authorized interface configuration and check peer-key bindings before installing the PSK.</t>
        <t>Signature verification MUST check the configured peer identity, role, current credential validity, and authorization independently of the choice of PKI or signing API. A record does not introduce a new trust anchor or authorize a different identity. The carrier is separate from the native WireGuard UDP endpoint.</t>
      </section>
      <section anchor="security-goals">
        <name>Threat Model and Goals</name>
        <t>An adversary may observe, inject, modify, delay, reorder, and replay bootstrap traffic and may submit malformed keys, signatures, lengths, or confirmation values. The profile aims to provide authenticated post-quantum PSK establishment bound to authorized endpoint identities and WireGuard keys, with fresh sessions and explicit key confirmation.</t>
        <t>A compromised endpoint, signing key, KEM key, trust anchor, PKI service, or WireGuard private key remains outside the threat model. The profile relies on local authorization and secure configuration installation and does not guarantee availability or prevent traffic analysis.</t>
      </section>
      <section anchor="suite">
        <name>Algorithm Suite and Parameters</name>
        <t>The local profile identifier is <tt>wireguard-pq-bootstrap-v2</tt>. It identifies the encoded exchange below and is not a native WireGuard or IANA allocation. The earlier logical-only v1 transcript is not accepted by this version.</t>
        <table>
          <thead>
            <tr>
              <th>Function</th>
              <th>Algorithm or value</th>
              <th>Length</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>Endpoint signature</td>
              <td>ML-DSA-44, ML-DSA-65, or ML-DSA-87</td>
              <td>Parameter-set dependent</td>
            </tr>
            <tr>
              <td>Key encapsulation</td>
              <td>ML-KEM-768</td>
              <td>Public key 1184; ciphertext 1088; secret 32</td>
            </tr>
            <tr>
              <td>Key derivation</td>
              <td>HKDF-SHA-256</td>
              <td>32-octet output</td>
            </tr>
            <tr>
              <td>Native tunnel PSK</td>
              <td>WireGuard PresharedKey</td>
              <td>32 octets, Base64 in configuration</td>
            </tr>
            <tr>
              <td>Native tunnel</td>
              <td>NoiseIKpsk2_25519_ChaChaPoly_BLAKE2s</td>
              <td>WireGuard-defined</td>
            </tr>
          </tbody>
        </table>
        <t>Implementations MUST implement ML-KEM-768, ML-DSA-65, HKDF-SHA-256, and HMAC-SHA-256 as the common bootstrap interoperability baseline. ML-DSA-44 and ML-DSA-87 MAY additionally be supported. ML-KEM and ML-DSA MUST use the algorithm definitions in FIPS 203 and FIPS 204 <xref target="FIPS203"/><xref target="FIPS204"/>. This requirement does not assert cryptographic-module validation.</t>
        <t>Both endpoints MUST use the same ML-DSA parameter set selected by authenticated local configuration and MUST reject a mismatch. Suite support alone does not authorize use of that suite for a peer. The profile does not negotiate the parameter set in either the bootstrap exchange or the native WireGuard handshake.</t>
      </section>
      <section anchor="identity">
        <name>Identity and Key Binding</name>
        <t>Each endpoint MUST have an active ML-DSA identity and a trust path or equivalent authenticated binding. The verifier MUST bind the identity to the expected role and to the WireGuard static public key carried in the bootstrap transcript. A valid signature under an unexpected identity or for a different WireGuard key MUST be rejected.</t>
        <t>Implementations MUST support an authenticated local binding containing the exact identity octets, Client or Server role, selected ML-DSA parameter set, exact FIPS 204 public-key octets, and authorized WireGuard public key. The binding MUST be provisioned and updated through an authorized configuration channel; neither a bootstrap record nor successful TLS certificate validation alone may create or replace it. A separately specified certificate mechanism MAY additionally supply that binding.</t>
        <t>Signatures use ML-DSA, rather than HashML-DSA, with the exact ASCII context string <tt>wireguard-pq-bootstrap-v2</tt>. The context has no trailing zero octet, and the protocol message MUST NOT be prehashed through an implementation-specific signing API. The PKI provider MAY be local or remote, but private signing keys and authorization tokens MUST be protected. A remote signing or status failure MUST cause provisioning to fail closed.</t>
      </section>
      <section anchor="exchange">
        <name>Bootstrap Exchange</name>
        <t>Each transaction uses a new TLS connection and the ordered records ClientInit, ServerHello, ClientProof, ServerFinished, and ClientAck. Each endpoint checks the configured suite, peer identity, role, WireGuard public keys, and tunnel name. The Client generates a fresh 32-octet nonce CN. The Server generates a fresh 32-octet SID and ML-KEM-768 pair (PK_S, SK_S).</t>
        <ol>
          <li>ClientInit contains CN, the tunnel name, W_C, W_S, client identity, and server identity. The Server compares the complete binding to authorized local configuration.</li>
          <li>ServerHello contains SHA-256(I), SID, PK_S, and the Server's ML-DSA signature on H. Here I is the complete encoded ClientInit, including its 12-octet header. The Client MUST check SHA-256(I), validate the expected Server identity and signature, and reject a stale or substituted reply before encapsulation.</li>
          <li>The Client computes (CT, SS_C) = Encaps(PK_S) and signs P. ClientProof contains SID, CT, and that signature. The Server checks SID, verifies the expected Client identity and signature, then computes SS_S = Decaps(SK_S, CT).</li>
          <li>Both endpoints derive PSK and separate confirmation keys. ServerFinished contains SID and a 32-octet Server confirmation MAC. The Client validates it before returning a result or enabling PSK installation.</li>
          <li>ClientAck contains SID and a 32-octet Client confirmation MAC. The Server validates it before returning a result or enabling PSK installation. No transaction record is accepted twice.</li>
        </ol>
        <sourcecode type="pseudocode">D = ASCII("WireGuard-PQ-PSK-v2") || 0x00
H = D || ASCII("SERVER") || 0x00 || SHA-256(I) || SID || PK_S
P = D || ASCII("CLIENT") || 0x00 || SHA-256(H) || CT
X = SHA-256(I || encoded-ServerHello || encoded-ClientProof)
server-MAC = HMAC-SHA-256(K_SF, D || ASCII("SERVER") || X)
client-MAC = HMAC-SHA-256(K_CF, D || ASCII("CLIENT") || X)</sourcecode>
        <t>ML-DSA uses context <tt>wireguard-pq-bootstrap-v2</tt>. All concatenations and ASCII labels are exact; the zero octets above are part of the inputs. The ClientInit hash binds both identities, both WireGuard keys, the suite in its header, tunnel name, and fresh Client nonce into both signatures and the key schedule.</t>
      </section>
      <section anchor="carrier">
        <name>Canonical Records over TLS 1.3 and TCP</name>
        <t>The control connection MUST use TCP <xref target="RFC9293"/> with TLS 1.3 <xref target="RFC8446"/>. Both endpoints MUST validate the peer TLS certificate and its authorization for the configured control service. The Client MUST verify the expected server name. The inner ML-DSA identity checks are additionally required. TLS 1.2 and earlier, plaintext, TLS early data (0-RTT), and application records before handshake completion MUST be rejected. No PSK, shared secret, signing key, or KEM private key is transmitted in an application record.</t>
        <t>The candidate ALPN value is the six-octet ASCII string <tt>wgpq/2</tt>, selected using <xref target="RFC7301"/>. Failure to select this exact value MUST abort the connection. This is an unassigned discussion value as explained in <xref target="candidate-identifiers"/>; no registration is requested by this revision. Until an allocation is confirmed, its use is restricted to explicitly configured development deployments and it MUST NOT be represented as an assigned identifier. The TCP port is explicitly configured independently of the WireGuard UDP port; no default or service-port allocation is specified.</t>
        <sourcecode type="pseudocode">Record = ASCII("WGPQ") || version(1) || type(1) || suite(1) ||
         flags(1) || BE32(body_length) || Body
version = 2
flags = 0
suite = 44 / 65 / 87  (decimal)</sourcecode>
        <t>The fixed header is 12 octets. Body length is between 1 and 8192 inclusive and excludes the header. All multi-octet integers in this carrier are unsigned big-endian. Suite values identify ML-DSA-44, -65, or -87 with signature lengths Lsig of 2420, 3309, or 4627 octets. The suite MUST match configured trust policy; there is no algorithm negotiation. Unknown versions, message types, suite values, or flags terminate the exchange.</t>
        <table>
          <thead>
            <tr>
              <th>Type</th>
              <th>Body fields, in order</th>
              <th>Body length</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>1 ClientInit</td>
              <td>CN(32); name-length(1); tunnel; W_C(32); W_S(32); client-id-length(2); client-id; server-id-length(2); server-id</td>
              <td>101 + name length + identity lengths</td>
            </tr>
            <tr>
              <td>2 ServerHello</td>
              <td>SHA-256(I)(32); SID(32); PK_S(1184); signature</td>
              <td>1248 + Lsig</td>
            </tr>
            <tr>
              <td>3 ClientProof</td>
              <td>SID(32); CT(1088); signature</td>
              <td>1120 + Lsig</td>
            </tr>
            <tr>
              <td>4 ServerFinished</td>
              <td>SID(32); server-MAC(32)</td>
              <td>64</td>
            </tr>
            <tr>
              <td>5 ClientAck</td>
              <td>SID(32); client-MAC(32)</td>
              <td>64</td>
            </tr>
          </tbody>
        </table>
        <t>Tunnel names contain 1 to 32 ASCII characters from A-Z, a-z, 0-9, dot, underscore, and hyphen. Each identity contains 1 to 255 UTF-8 octets, has no ASCII control characters or DEL, and is compared byte-for-byte to configured identity text without Unicode normalization. The two identities MUST differ. Each WireGuard public key is exactly 32 octets and MUST match the authorized configured key; an all-zero key is rejected. The ClientInit fields have no separators or terminators beyond the specified lengths.</t>
        <t>TLS records and TCP reads need not align to bootstrap records. A receiver first reads exactly 12 header octets, validates the type, suite, flags, and length before allocating the body, then reads exactly body_length octets and rejects any internal length mismatch or surplus field. It processes exactly the five ordered messages of one transaction and closes the connection after completion or failure. TLS resumption MUST NOT reuse a bootstrap SID, KEM key pair, or pending state.</t>
        <t>The complete bootstrap transaction and any pending key material MUST expire within 30 seconds, measured locally from sending or receiving ClientInit. A receiver MUST enforce this deadline even if no further bytes arrive; a blocking read MUST NOT extend it. Resource policy MUST bound concurrent connections. On timeout or cryptographic failure, the endpoint MUST discard pending state and close the connection. Detailed credential or KEM failure causes MUST NOT be exposed to an unauthenticated application peer.</t>
      </section>
      <section anchor="psk">
        <name>PSK Derivation and Provisioning</name>
        <t>After the authenticated KEM exchange, derive three independent 32-octet values using HKDF-SHA-256 <xref target="RFC5869"/>. SS is the local KEM shared secret. H is the exact Server signature input above.</t>
        <sourcecode type="pseudocode">salt = SHA-256(D || SID || CT)
T = SHA-256(H || CT)
PRK = HKDF-Extract(salt, SS)
PSK = HKDF-Expand(PRK, D || T, 32)
K_SF = HKDF-Expand(PRK,
    D || ASCII("SERVER-FINISHED") || 0x00 || T, 32)
K_CF = HKDF-Expand(PRK,
    D || ASCII("CLIENT-FINISHED") || 0x00 || T, 32)</sourcecode>
        <t>D includes its terminating zero octet in every formula, including the PSK info. Confirmation keys are not used as WireGuard keys. The PSK is returned only after the corresponding peer confirmation succeeds. Invalid KEM ciphertexts can cause implicit rejection and an unrelated secret; a confirmation-MAC mismatch MUST abort provisioning.</t>
        <t>Install the resulting 32-octet PSK in the configured peer's PresharedKey field using standard Base64. Interface private keys remain local. Both WireGuard public keys MUST match those in the signed ClientInit binding. Configuration updates MUST be authorized and atomic within each endpoint. The carrier does not provide a distributed atomic configuration commit. After an interruption, <xref target="installation-reconcile"/> determines whether the verified installations can proceed to readiness checking or a fresh bootstrap is required.</t>
        <t>An endpoint MUST NOT declare the tunnel ready solely because bootstrap completed. Readiness requires fresh reports of both local installations, a new native WireGuard handshake attributable to the intended PSK installation, and a fresh bidirectional probe as described in <xref target="installation-readiness"/>. A failed or uncertain update MUST be reported as failure or unknown until the endpoints are reconciled. These checks do not make the two configuration writes an atomic distributed operation or introduce an installation acknowledgement into the candidate carrier.</t>
        <t>Provisioned PSKs and authenticated bindings MUST be stored and installed through authorized local interfaces. An implementation MUST NOT log the raw PSK or return it from an unauthenticated diagnostic API. Secret-bearing configuration files require the same access restrictions.</t>
      </section>
      <section anchor="native">
        <name>Native WireGuard Handshake and Data Plane</name>
        <t>Once the PSK is provisioned, the endpoints run the native WireGuard handshake. The profile does not add an ML-KEM field to the initiation or response packets and does not change the Noise construction. The native protocol combines its usual Curve25519 handshake state with the configured PSK according to NoiseIKpsk2 and then protects transport packets with WireGuard's standard ChaCha20-Poly1305 construction.</t>
        <t>The PSK MUST be installed before the first handshake that is intended to use this profile. A configuration that omits the PSK, uses a different PSK, or associates it with the wrong peer MUST be treated as a provisioning failure. Native WireGuard rekey and cookie behavior remain applicable.</t>
      </section>
      <section anchor="replay">
        <name>Freshness, Replay, and Rotation</name>
        <t>Each transaction requires a fresh CN, SID, and ML-KEM pair. The Client accepts only a ServerHello tied to its current encoded ClientInit. The Server accepts only one ClientProof and ClientAck for its current SID. The one-use state machine, signed Client nonce, two confirmation MACs, and 30-second lifetime prevent reuse of completed records as a new provisioning result. A retry creates a new transaction; a record MUST NOT reset or reopen completed state.</t>
        <t>PSK rotation SHOULD occur before operational limits, after a credential change, or after suspected compromise. Installation is atomic per endpoint; a coordinated recovery procedure is required if the other endpoint has not completed installation. Superseded PSKs and KEM private keys MUST be removed from protected stores. Implementations SHOULD minimize secret lifetime and avoid retaining complete secret-bearing configurations.</t>
      </section>
      <section anchor="failure">
        <name>Failure Handling and Downgrade Protection</name>
        <t>Invalid signatures, identity bindings, ML-KEM lengths, ciphertexts, transcript hashes, parameter sets, or configuration key relationships MUST abort provisioning. An implementation supporting a classical provisioning path MUST NOT silently choose that path after a post-quantum failure. Any fallback MUST be an explicit, authenticated local policy decision.</t>
        <t>Detailed error diagnostics MAY be logged locally, but unauthenticated control-plane responses SHOULD NOT distinguish signature, KEM, authorization, and transcript failures. Logs MUST NOT contain private keys, ML-KEM secret keys, shared secrets, PSKs, bearer tokens, or complete secret-bearing configurations.</t>
      </section>
      <section anchor="conformance">
        <name>Candidate Profile Conformance</name>
        <t>Implementations MUST implement the common suite, exact encodings and signature contexts, peer and WireGuard key bindings, five-message state machine, key confirmation, transaction deadlines, and provisioning failure rules in this document. Conformance requires authenticated TLS transport, authorized PSK installation, and the native-handshake readiness check; completing the bootstrap exchange alone is insufficient.</t>
        <t>These requirements describe consistency with the candidate exchange, not IETF certification, working-group approval, or conformance to a general IoT standard.</t>
      </section>
      <section anchor="candidate-identifiers">
        <name>Candidate ALPN and Version Identification</name>
        <t>The following table records the candidate ALPN value for discussion in relation to the registry established by <xref target="RFC7301"/>. It is not an assignment or a registration request made by this revision.</t>
        <table>
          <thead>
            <tr>
              <th>Field</th>
              <th>Candidate value</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>Protocol</td>
              <td>Post-Quantum Bootstrap for WireGuard, version 2</td>
            </tr>
            <tr>
              <td>Identification Sequence</td>
              <td>0x77 0x67 0x70 0x71 0x2f 0x32 ("wgpq/2")</td>
            </tr>
            <tr>
              <td>Reference</td>
              <td>This appendix (discussion only)</td>
            </tr>
          </tbody>
        </table>
        <t>Any future registration would be subject to the registry's Expert Review procedure. Its value, reference, version mapping, and appropriate document venue need to be confirmed before it is represented as assigned. No TCP service port, native WireGuard identifier, or separate registry for the local profile name is requested. Record types and suite values remain scoped to version 2 of the candidate bootstrap protocol. An incompatible record, transcript, or key-schedule change requires a distinct protocol version and an explicit compatibility rule.</t>
      </section>
    </section>
  </back>
</rfc>
