<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude"
     category="std"
     docName="draft-condrey-rats-witnessd-enrollment-00"
     ipr="trust200902"
     obsoletes=""
     updates=""
     submissionType="IETF"
     xml:lang="en"
     version="3">

  <front>
    <title abbrev="witnessd Enrollment">Trust Anchor Bootstrap Protocol for Proof of Process</title>

    <seriesInfo name="Internet-Draft" value="draft-condrey-rats-witnessd-enrollment-00"/>

    <author fullname="David Condrey" initials="D." surname="Condrey">
      <organization>Writerslogic Inc</organization>
      <address>
        <postal>
          <country>United States</country>
        </postal>
        <email>david@writerslogic.com</email>
      </address>
    </author>

    <date year="2026" month="February" day="7"/>

    <area>Security</area>
    <workgroup>Remote ATtestation procedureS</workgroup>

    <keyword>attestation</keyword>
    <keyword>enrollment</keyword>
    <keyword>trust anchor</keyword>
    <keyword>device registration</keyword>
    <keyword>RATS</keyword>

    <abstract>
      <t>
        This document specifies a trust anchor bootstrap protocol for the
        witnessd Proof of Process framework. The protocol defines how new
        devices enter the witnessd ecosystem, how device keys are provisioned
        and verified, and how Verifiers discover and validate device trust
        anchors.
      </t>
      <t>
        Three enrollment modes are defined: self-sovereign mode for individual
        users, organizational mode for enterprise deployments, and public
        registry mode for federated trust ecosystems.
      </t>
    </abstract>

    <note removeInRFC="true">
      <name>About This Document</name>
      <t>
        This is a companion document to draft-condrey-rats-pop, which defines
        the core Proof of Process evidence framework. This document addresses
        the bootstrapping problem: how do Verifiers know which device keys
        to trust?
      </t>
    </note>

  </front>

  <middle>

    <section anchor="introduction">
      <name>Introduction</name>

      <t>
        The Proof of Process (PoP) specification <xref target="I-D.condrey-rats-pop"/>
        defines how Attesters generate Evidence during document authorship.
        Evidence packets are signed with device keys, but the core specification
        does not define how these keys are provisioned or how Verifiers
        establish trust in them.
      </t>

      <t>
        This document addresses the trust anchor bootstrap problem by defining:
      </t>

      <ul>
        <li>
          Device enrollment protocols for provisioning signing keys
        </li>
        <li>
          Trust anchor discovery mechanisms for Verifiers
        </li>
        <li>
          Multiple enrollment modes for different deployment scenarios
        </li>
        <li>
          Key lifecycle management including rotation and migration
        </li>
      </ul>

      <section anchor="requirements-notation">
        <name>Requirements Notation</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>

    <section anchor="enrollment-modes">
      <name>Enrollment Modes</name>

      <section anchor="self-sovereign-mode">
        <name>Self-Sovereign Mode</name>

        <t>
          In self-sovereign mode, users generate their own device keys and
          manually provide trust anchors to Verifiers they wish to work with.
          This mode provides maximum privacy but requires out-of-band trust
          establishment.
        </t>

        <t>
          Workflow:
        </t>

        <ol>
          <li>
            Device generates key pair in secure hardware (if available)
          </li>
          <li>
            Device exports public key and self-signed certificate
          </li>
          <li>
            User manually provides public key to Verifier (via secure channel)
          </li>
          <li>
            Verifier stores trust anchor associated with user identity
          </li>
        </ol>

        <t>
          Use cases: Individual authors, privacy-conscious users, testing
          environments.
        </t>
      </section>

      <section anchor="organizational-mode">
        <name>Organizational Mode</name>

        <t>
          In organizational mode, device keys are signed by an organization's
          Certificate Authority (CA). The organization publishes its CA
          certificate, and Verifiers trust devices whose keys chain to the
          organization's CA.
        </t>

        <t>
          Workflow:
        </t>

        <ol>
          <li>
            Organization establishes CA infrastructure
          </li>
          <li>
            Organization publishes CA certificate at well-known location
          </li>
          <li>
            Device generates key pair and creates certificate signing request
          </li>
          <li>
            Organization signs device certificate (may require proof of device identity)
          </li>
          <li>
            Device stores signed certificate
          </li>
          <li>
            Verifiers validate device certificates against organization CA
          </li>
        </ol>

        <t>
          Use cases: Enterprises, academic institutions, publishing houses.
        </t>

        <section anchor="well-known-uri">
          <name>Well-Known URI for Device Discovery</name>

          <t>
            Organizations SHOULD publish device trust information at:
          </t>

          <artwork><![CDATA[
/.well-known/witnessd-devices
]]></artwork>

          <t>
            This endpoint returns a signed JSON document listing:
          </t>

          <ul>
            <li>Organization CA certificate chain</li>
            <li>Supported enrollment methods</li>
            <li>Device certificate validation policy</li>
            <li>Contact information for enrollment requests</li>
          </ul>
        </section>
      </section>

      <section anchor="public-registry-mode">
        <name>Public Registry Mode</name>

        <t>
          In public registry mode, devices register with a public discovery
          service, similar to ACME for TLS certificates. This enables federated
          trust without requiring prior relationship establishment.
        </t>

        <t>
          Workflow:
        </t>

        <ol>
          <li>
            Device generates key pair
          </li>
          <li>
            Device proves control of user identifier (email, domain, etc.)
          </li>
          <li>
            Registry issues device certificate bound to user identifier
          </li>
          <li>
            Registry publishes certificate in transparency log
          </li>
          <li>
            Verifiers query registry to validate device certificates
          </li>
        </ol>

        <t>
          Use cases: Open ecosystems, cross-organization verification,
          consumer applications.
        </t>
      </section>
    </section>

    <section anchor="device-enrollment-protocol">
      <name>Device Enrollment Protocol</name>

      <t>
        The device enrollment protocol establishes trust between a new device
        and the enrollment authority. The protocol uses a challenge-response
        flow to verify device identity and key possession.
      </t>

      <section anchor="enrollment-request">
        <name>Enrollment Request</name>

        <t>
          Devices initiate enrollment by submitting a request containing:
        </t>

        <artwork type="cddl"><![CDATA[
enrollment-request = {
  device-public-key: bstr,      ; Device's public key (COSE_Key)
  user-identifier: tstr,        ; Email, domain, or opaque ID
  enrollment-mode: mode-type,
  ? device-attestation: bstr,   ; TPM/Secure Enclave attestation
  ? proof-of-possession: bstr,  ; Signature over challenge
  nonce: bstr,                  ; Freshness nonce
  timestamp: time
}

mode-type = &(
  self-sovereign: 0,
  organizational: 1,
  public-registry: 2
)
]]></artwork>
      </section>

      <section anchor="enrollment-challenge">
        <name>Challenge-Response Flow</name>

        <t>
          For organizational and public registry modes, the enrollment
          authority issues a challenge:
        </t>

        <ol>
          <li>
            Device submits initial enrollment request
          </li>
          <li>
            Authority returns challenge (random nonce + user verification
            requirement)
          </li>
          <li>
            Device signs challenge with private key (proof of possession)
          </li>
          <li>
            User completes verification (email link, domain TXT record, etc.)
          </li>
          <li>
            Device submits signed challenge and verification proof
          </li>
          <li>
            Authority validates and issues device certificate
          </li>
        </ol>

        <artwork type="cddl"><![CDATA[
enrollment-challenge = {
  challenge-nonce: bstr,
  verification-method: verification-type,
  ? verification-uri: tstr,    ; For email/web verification
  expires: time
}

verification-type = &(
  email-link: 0,
  domain-txt: 1,
  organizational-approval: 2,
  device-attestation-only: 3
)

enrollment-response = {
  challenge-nonce: bstr,
  challenge-signature: bstr,   ; Signed by device private key
  verification-token: tstr,    ; From email/domain verification
  timestamp: time
}
]]></artwork>
      </section>

      <section anchor="certificate-issuance">
        <name>Certificate Issuance</name>

        <t>
          Upon successful verification, the authority issues a device
          certificate:
        </t>

        <artwork type="cddl"><![CDATA[
device-certificate = {
  device-id: bstr,             ; Unique device identifier
  public-key: bstr,            ; COSE_Key
  user-identifier: tstr,
  issuer: tstr,                ; Authority identifier
  issued-at: time,
  expires-at: time,
  ? constraints: [* constraint],
  signature: bstr              ; Authority signature
}

constraint = &(
  max-evidence-per-day: uint,
  allowed-document-types: [* tstr],
  geographic-restriction: tstr
)
]]></artwork>

        <t>
          Certificates MUST be valid for no more than 1 year. Devices
          MUST re-enroll before certificate expiration.
        </t>
      </section>
    </section>

    <section anchor="trust-anchor-discovery">
      <name>Trust Anchor Discovery</name>

      <t>
        Verifiers must discover and maintain trust anchors for device
        certificate validation. This section defines discovery mechanisms
        and caching policies.
      </t>

      <section anchor="discovery-mechanisms">
        <name>Discovery Mechanisms</name>

        <t>
          Verifiers discover trust anchors through:
        </t>

        <dl>
          <dt>Well-known URI:</dt>
          <dd>
            Query /.well-known/witnessd-devices at the organization's domain
            to retrieve CA certificates and enrollment policies.
          </dd>

          <dt>Public Registry:</dt>
          <dd>
            Query the public registry service for device certificates bound
            to user identifiers. The registry provides certificate chains
            and revocation status.
          </dd>

          <dt>Out-of-band provisioning:</dt>
          <dd>
            For self-sovereign mode, trust anchors are manually configured
            by the Verifier operator.
          </dd>
        </dl>
      </section>

      <section anchor="caching-policy">
        <name>Caching Policy</name>

        <t>
          Verifiers SHOULD cache trust anchors to reduce latency and
          network load. Caching policies:
        </t>

        <ul>
          <li>
            CA certificates: Cache for up to 24 hours or until the
            next-update field indicates refresh is needed
          </li>
          <li>
            Device certificates: Cache for the certificate validity period
            minus a safety margin (RECOMMENDED: 1 hour)
          </li>
          <li>
            Revocation status: Cache according to revocation list TTL
            (see draft-condrey-rats-witnessd-revocation)
          </li>
        </ul>

        <t>
          Verifiers MUST refresh cached trust anchors before expiration.
          Stale cache entries MUST NOT be used for verification.
        </t>
      </section>

      <section anchor="revocation-integration">
        <name>Revocation Checking Integration</name>

        <t>
          Trust anchor discovery integrates with revocation checking:
        </t>

        <ol>
          <li>Verifier receives Evidence packet</li>
          <li>Verifier extracts device certificate from Evidence</li>
          <li>Verifier validates certificate chain to trusted CA</li>
          <li>Verifier checks certificate revocation status</li>
          <li>Verifier checks Evidence revocation status</li>
          <li>If all checks pass, Verifier proceeds with appraisal</li>
        </ol>

        <t>
          Certificate revocation and Evidence revocation are independent.
          A revoked certificate invalidates all Evidence signed by that
          device. Evidence may be revoked even if the certificate remains
          valid.
        </t>
      </section>
    </section>

    <section anchor="key-lifecycle">
      <name>Key Lifecycle Management</name>

      <t>
        Device keys have a lifecycle from generation through retirement.
        This section defines key management operations.
      </t>

      <section anchor="key-rotation">
        <name>Key Rotation</name>

        <t>
          Devices SHOULD rotate signing keys periodically to limit exposure
          from potential compromise. Key rotation workflow:
        </t>

        <ol>
          <li>Device generates new key pair</li>
          <li>Device requests certificate for new key (standard enrollment)</li>
          <li>Device publishes key rotation notice signed by old key</li>
          <li>Rotation notice links old key to new key</li>
          <li>Old key enters grace period (RECOMMENDED: 30 days)</li>
          <li>After grace period, old key is retired</li>
        </ol>

        <artwork type="cddl"><![CDATA[
key-rotation-notice = {
  old-device-id: bstr,
  new-device-id: bstr,
  old-public-key: bstr,
  new-public-key: bstr,
  rotation-time: time,
  grace-period-end: time,
  old-key-signature: bstr,    ; Proves control of old key
  new-key-signature: bstr     ; Proves control of new key
}
]]></artwork>

        <t>
          Evidence signed during the grace period MAY use either key.
          After the grace period, only the new key is valid.
        </t>
      </section>

      <section anchor="device-migration">
        <name>Device Migration</name>

        <t>
          When users migrate to a new device, Evidence continuity must be
          maintained. Migration is treated as key rotation with additional
          verification:
        </t>

        <ul>
          <li>
            User initiates migration from old device (if available)
          </li>
          <li>
            Old device signs migration authorization for new device
          </li>
          <li>
            New device completes enrollment with migration authorization
          </li>
          <li>
            If old device is unavailable, user completes out-of-band
            verification (email, organizational approval, etc.)
          </li>
        </ul>

        <t>
          Migration without old device access requires stronger verification
          to prevent unauthorized device takeover.
        </t>
      </section>

      <section anchor="key-compromise-lifecycle">
        <name>Key Compromise Response</name>

        <t>
          When a device key is compromised:
        </t>

        <ol>
          <li>
            User reports compromise to enrollment authority
          </li>
          <li>
            Authority revokes device certificate immediately
          </li>
          <li>
            User enrolls new device with fresh key
          </li>
          <li>
            User may re-endorse historical Evidence with new key
            (see draft-condrey-rats-witnessd-revocation)
          </li>
        </ol>

        <t>
          Hardware-backed keys (TPM, Secure Enclave) reduce compromise
          risk and are RECOMMENDED for high-security deployments.
        </t>
      </section>

      <section anchor="certificate-renewal">
        <name>Certificate Renewal</name>

        <t>
          Devices MUST renew certificates before expiration. Renewal may
          use the existing key (if not compromised) or coincide with
          key rotation. Renewal workflow:
        </t>

        <ol>
          <li>
            Device submits renewal request with current certificate
          </li>
          <li>
            Authority validates current certificate is still valid
          </li>
          <li>
            Authority issues new certificate (same or new key)
          </li>
          <li>
            New certificate validity period begins from issuance
          </li>
        </ol>

        <t>
          Devices SHOULD initiate renewal at least 7 days before
          certificate expiration to allow for processing delays.
        </t>
      </section>
    </section>

    <section anchor="security-considerations">
      <name>Security Considerations</name>

      <section anchor="threat-model">
        <name>Threat Model</name>

        <t>
          The enrollment protocol considers the following threats:
        </t>

        <dl>
          <dt>Unauthorized enrollment:</dt>
          <dd>
            Attacker attempts to enroll a device under another user's
            identity. Mitigated by user identifier verification (email,
            domain, organizational approval).
          </dd>

          <dt>Key extraction:</dt>
          <dd>
            Attacker attempts to extract device private key. Mitigated
            by hardware-backed key storage (TPM, Secure Enclave) where
            available.
          </dd>

          <dt>Enrollment authority compromise:</dt>
          <dd>
            Attacker compromises the enrollment authority and issues
            fraudulent certificates. Mitigated by certificate transparency
            logs and short certificate validity periods.
          </dd>

          <dt>Man-in-the-middle:</dt>
          <dd>
            Attacker intercepts enrollment messages. Mitigated by TLS
            for all enrollment communications and challenge-response
            binding.
          </dd>

          <dt>Replay attacks:</dt>
          <dd>
            Attacker replays old enrollment requests. Mitigated by
            nonces and timestamps in all protocol messages.
          </dd>
        </dl>
      </section>

      <section anchor="compromise-impact">
        <name>Compromise Impact Analysis</name>

        <t>
          The impact of various compromises:
        </t>

        <ul>
          <li>
            Single device key compromise: Only Evidence from that device
            is affected. Other devices and users are unaffected.
          </li>
          <li>
            Organizational CA compromise: All devices enrolled under that
            CA are potentially affected. Requires CA re-keying and mass
            device re-enrollment.
          </li>
          <li>
            Public registry compromise: All devices using that registry
            are potentially affected. Requires registry recovery and
            certificate reissuance.
          </li>
        </ul>

        <t>
          Organizational deployments SHOULD use Hardware Security Modules
          (HSMs) for CA key protection. Public registries MUST implement
          multi-party controls for certificate issuance.
        </t>
      </section>

      <section anchor="mitigation-requirements">
        <name>Mitigation Requirements</name>

        <t>
          Implementations MUST:
        </t>

        <ul>
          <li>Use TLS 1.3 or later for all enrollment communications</li>
          <li>Validate certificate chains completely before trusting</li>
          <li>Check certificate revocation status before accepting Evidence</li>
          <li>Implement rate limiting to prevent enrollment abuse</li>
          <li>Log enrollment events for audit purposes</li>
        </ul>

        <t>
          Implementations SHOULD:
        </t>

        <ul>
          <li>Use hardware-backed key storage where available</li>
          <li>Implement certificate transparency monitoring</li>
          <li>Support multiple enrollment authorities for redundancy</li>
          <li>Provide key compromise notification mechanisms</li>
        </ul>
      </section>
    </section>

    <section anchor="privacy-considerations">
      <name>Privacy Considerations</name>

      <section anchor="device-tracking">
        <name>Device Identifier Privacy</name>

        <t>
          Device identifiers enable tracking across Evidence packets.
          To protect user privacy:
        </t>

        <ul>
          <li>
            Device identifiers SHOULD be opaque random values, not
            derived from hardware identifiers or user information
          </li>
          <li>
            Users MAY request new device identifiers during key rotation
            to break tracking linkage
          </li>
          <li>
            Verifiers MUST NOT share device verification patterns with
            third parties
          </li>
        </ul>

        <t>
          Self-sovereign mode provides the strongest privacy as no
          central authority learns about device enrollment. Public
          registry mode has the weakest privacy as the registry sees
          all enrolled devices.
        </t>
      </section>

      <section anchor="enrollment-metadata">
        <name>Enrollment Metadata Minimization</name>

        <t>
          Enrollment authorities collect metadata during device
          registration. To minimize privacy impact:
        </t>

        <ul>
          <li>
            Collect only the minimum information necessary for enrollment
          </li>
          <li>
            Do not retain IP addresses or location data beyond enrollment
            completion
          </li>
          <li>
            Do not share enrollment metadata with third parties
          </li>
          <li>
            Provide data deletion upon user request (subject to legal
            retention requirements)
          </li>
        </ul>

        <t>
          Enrollment authorities MUST publish a privacy policy describing
          data collection, retention, and sharing practices.
        </t>
      </section>

      <section anchor="registry-privacy">
        <name>Registry Privacy Modes</name>

        <t>
          Public registries MAY offer privacy modes:
        </t>

        <dl>
          <dt>Public mode:</dt>
          <dd>
            Device certificates are publicly discoverable. Anyone can
            verify Evidence from the device. Suitable for public authors.
          </dd>

          <dt>Unlisted mode:</dt>
          <dd>
            Device certificates are not publicly listed but can be
            retrieved by packet-id lookup. Provides some obscurity.
          </dd>

          <dt>Private mode:</dt>
          <dd>
            Device certificates are only returned to authenticated
            Verifiers with a legitimate need. Suitable for sensitive
            contexts.
          </dd>
        </dl>

        <t>
          Users SHOULD select the privacy mode appropriate for their
          use case. The default mode is deployment-specific.
        </t>
      </section>
    </section>

    <section anchor="iana-considerations">
      <name>IANA Considerations</name>

      <t>
        This document requests registration of the following well-known URI:
      </t>

      <ul>
        <li>
          URI suffix: witnessd-devices
        </li>
        <li>
          Change controller: IETF
        </li>
        <li>
          Specification document: [this document]
        </li>
      </ul>
    </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="S. Bradner" initials="S." surname="Bradner"/>
            <date month="March" year="1997"/>
          </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="B. Leiba" initials="B." surname="Leiba"/>
            <date month="May" year="2017"/>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
        </reference>

      </references>

      <references>
        <name>Informative References</name>

        <reference anchor="I-D.condrey-rats-pop">
          <front>
            <title>Proof of Process: An Evidence Framework for Digital Authorship Attestation</title>
            <author fullname="D. Condrey" initials="D." surname="Condrey"/>
            <date/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-condrey-rats-pop"/>
        </reference>

      </references>

    </references>

  </back>

</rfc>
