<?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="info"
     docName="draft-ayerbe-trip-protocol-02"
     ipr="trust200902"
     submissionType="independent"
     version="3">

  <front>
    <title abbrev="TRIP">
      TRIP: Trajectory-based Recognition of Identity Proof
    </title>

    <seriesInfo name="Internet-Draft" value="draft-ayerbe-trip-protocol-02"/>

    <author fullname="Camilo Ayerbe Posada" initials="C." surname="Ayerbe Posada">
      <organization>ULISSY s.r.l.</organization>
      <address>
        <postal>
          <street>Via Gaetano Sacchi 16</street>
          <city>Roma</city>
          <region>RM</region>
          <code>00153</code>
          <country>IT</country>
        </postal>
        <email>cayerbe@gmail.com</email>
      </address>
    </author>

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

    <area>Security</area>
    <workgroup>Independent Submission</workgroup>

    <keyword>identity</keyword>
    <keyword>trajectory</keyword>
    <keyword>proof-of-trajectory</keyword>
    <keyword>geospatial</keyword>
    <keyword>criticality</keyword>
    <keyword>attestation</keyword>
    <keyword>remote-attestation</keyword>
    <keyword>RATS</keyword>

    <abstract>
      <t>
        This document specifies the Trajectory-based Recognition of
        Identity Proof (TRIP) protocol, a decentralized mechanism for
        establishing claims of physical-world presence through
        cryptographically signed, spatially quantized location
        attestations called "breadcrumbs."  Breadcrumbs are chained
        into an append-only log, bundled into verifiable epochs, and
        distilled into a Trajectory Identity Token (TIT) that serves
        as a persistent pseudonymous identifier.
      </t>
      <t>
        The protocol employs a Criticality Engine grounded in
        statistical physics to distinguish biological movement from
        synthetic trajectories.  Power Spectral Density analysis
        detects the 1/f signature of Self-Organized Criticality in
        human mobility.  A six-component Hamiltonian energy function
        scores each breadcrumb against the identity's learned
        behavioral profile in real time.
      </t>
      <t>
        This revision formalizes the mapping to the RATS Architecture
        (RFC 9334), clarifies the Verifier trust model including
        support for multiple independent Verifiers, introduces an
        active challenge-response verification protocol that binds
        Attestation Results to specific Relying Party requests with
        cryptographic freshness, and corrects the privacy model to
        accurately describe the flow of Evidence between Attester
        and Verifier.
      </t>
      <t>
        TRIP is designed to be transport-agnostic and operates
        independently of any particular naming system, blockchain,
        or application layer.
      </t>
    </abstract>
  </front>

  <middle>

    <!-- ============================================================ -->
    <section anchor="introduction" numbered="true" toc="include">
      <name>Introduction</name>
      <t>
        Conventional approaches to proving that an online actor
        corresponds to a physical human being rely on biometric
        capture, government-issued documents, or knowledge-based
        challenges.  Each technique introduces a centralized trust
        anchor, creates honeypots of personally identifiable
        information (PII), and is susceptible to replay or deepfake
        attacks.
      </t>
      <t>
        TRIP takes a fundamentally different approach: it treats
        sustained physical movement through the real world as evidence
        of embodied existence.  A TRIP-enabled device periodically
        records its position as a "breadcrumb" -- a compact, privacy-
        preserving, cryptographically signed attestation that the
        holder of a specific Ed25519 key pair was present in a
        particular spatial cell at a particular time.  An adversary
        who controls only digital infrastructure cannot fabricate a
        plausible trajectory because doing so requires controlling
        radio-frequency environments (GPS, Wi-Fi, cellular, IMU) at
        many geographic locations over extended periods.
      </t>
      <t>
        Version -01 introduced a Criticality Engine grounded in
        Giorgio Parisi's Nobel Prize-winning work on scale-free
        correlations <xref target="PARISI-NOBEL"/> and
        Albert-Laszlo Barabasi's research on the fundamental limits
        of human mobility <xref target="BARABASI-MOBILITY"/>.
      </t>
      <t>
        This revision (-02) addresses three areas identified through
        expert review: it formalizes the mapping between TRIP
        components and the RATS Architecture
        <xref target="RFC9334"/>, explicitly stating the Verifier
        trust model and multi-Verifier deployment assumptions; it
        introduces an active challenge-response verification protocol
        that provides cryptographic freshness guarantees for
        Attestation Results; and it corrects the privacy model to
        accurately describe that H3-quantized Evidence is transmitted
        to the Verifier, with privacy deriving from the lossy
        quantization transform rather than data locality.
      </t>
      <t>
        This document specifies the data structures, algorithms, and
        verification procedures that constitute the TRIP protocol.
        It intentionally omits transport bindings, naming-system
        integration, and blockchain anchoring, all of which are
        expected to be addressed in companion specifications.
      </t>

      <section anchor="requirements-language" numbered="true" toc="include">
        <name>Requirements Language</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 anchor="terminology" numbered="true" toc="include">
        <name>Terminology</name>
        <t>
          Terms defined in the RATS Architecture
          <xref target="RFC9334"/> (Attester, Evidence, Verifier,
          Attestation Result, Relying Party) are used throughout
          this document with their RFC 9334 meanings.  Additional
          terms specific to TRIP:
        </t>
        <dl>
          <dt>Breadcrumb</dt>
          <dd>
            A single, signed attestation of spatiotemporal presence.
            The atomic unit of TRIP Evidence.
          </dd>
          <dt>Trajectory</dt>
          <dd>
            An ordered, append-only chain of breadcrumbs produced by
            a single identity key pair.
          </dd>
          <dt>Epoch</dt>
          <dd>
            A bundle of breadcrumbs (default 100) sealed with a
            Merkle root, forming a verifiable checkpoint.
          </dd>
          <dt>Trajectory Identity Token (TIT)</dt>
          <dd>
            A pseudonymous identifier derived from an Ed25519 public
            key paired with trajectory metadata.
          </dd>
          <dt>Criticality Engine</dt>
          <dd>
            The analytical subsystem that evaluates trajectory
            statistics for signs of biological Self-Organized
            Criticality (SOC).  In RATS terms, the Criticality
            Engine is a component of the Verifier.
          </dd>
          <dt>Hamiltonian (H)</dt>
          <dd>
            A weighted energy function that quantifies how much a
            new breadcrumb deviates from the identity's learned
            behavioral profile.
          </dd>
          <dt>Anchor Cell</dt>
          <dd>
            An H3 cell where an identity has historically spent
            significant time (e.g., home, workplace).
          </dd>
          <dt>Flock</dt>
          <dd>
            The set of co-located TRIP entities whose aggregate
            movement provides a reference signal for alignment
            verification.
          </dd>
          <dt>Proof-of-Humanity (PoH) Certificate</dt>
          <dd>
            A compact Attestation Result containing only statistical
            exponents derived from the trajectory, with no raw
            location data.
          </dd>
        </dl>
      </section>

      <section anchor="changes-from-01" numbered="true" toc="include">
        <name>Changes from -01</name>
        <t>
          This section summarizes the substantive changes from
          draft-ayerbe-trip-protocol-01:
        </t>
        <ul>
          <li>
            Expanded the RATS Architecture mapping
            (<xref target="rats-mapping"/>) with explicit Verifier
            trust model, multi-Verifier deployment language, and
            Evidence flow description.
          </li>
          <li>
            Replaced the two-sentence replay protection text with
            a full section (<xref target="replay-protection"/>)
            covering chain-level replay, attestation-result replay,
            and the Active Verification Protocol with CDDL schemas.
          </li>
          <li>
            Corrected the privacy model
            (<xref target="privacy-model"/>) to state that
            H3-quantized Evidence is transmitted to the Verifier;
            privacy derives from the quantization transform, not
            data locality.
          </li>
          <li>
            Added Deployment Considerations
            (<xref target="deployment"/>) addressing multi-Verifier
            operation, trust delegation, and federation.
          </li>
          <li>
            Moved RFC 9334 from informative to normative references.
          </li>
        </ul>
      </section>
    </section>

    <!-- ============================================================ -->
    <section anchor="breadcrumb-format" numbered="true" toc="include">
      <name>Breadcrumb Data Structure</name>
      <t>
        A breadcrumb is encoded as a CBOR map
        <xref target="RFC8949"/> with the following fields:
      </t>

      <table anchor="breadcrumb-fields">
        <name>Breadcrumb CBOR Fields</name>
        <thead>
          <tr><th>Key</th><th>CBOR Type</th><th>Description</th></tr>
        </thead>
        <tbody>
          <tr><td>0</td><td>uint</td><td>Index (sequence number)</td></tr>
          <tr><td>1</td><td>bstr (32)</td><td>Identity public key (Ed25519)</td></tr>
          <tr><td>2</td><td>uint</td><td>Timestamp (Unix seconds)</td></tr>
          <tr><td>3</td><td>uint</td><td>H3 cell index</td></tr>
          <tr><td>4</td><td>uint</td><td>H3 resolution (7-10)</td></tr>
          <tr><td>5</td><td>bstr (32)</td><td>Context digest (SHA-256)</td></tr>
          <tr><td>6</td><td>bstr (32) / null</td><td>Previous block hash</td></tr>
          <tr><td>7</td><td>map</td><td>Meta flags</td></tr>
          <tr><td>8</td><td>bstr (64)</td><td>Ed25519 signature</td></tr>
        </tbody>
      </table>

      <section anchor="spatial-quantization" numbered="true" toc="include">
        <name>Spatial Quantization</name>
        <t>
          The H3 geospatial indexing system <xref target="H3"/>
          partitions the Earth's surface into hexagonal cells at
          multiple resolutions.  TRIP employs resolutions 7 through 10:
        </t>
        <table anchor="h3-resolutions">
          <name>H3 Resolution Parameters</name>
          <thead>
            <tr><th>Resolution</th><th>Avg. Area</th><th>Edge Length</th><th>Use Case</th></tr>
          </thead>
          <tbody>
            <tr><td>7</td><td>~5.16 km^2</td><td>~1.22 km</td><td>Rural / low-density</td></tr>
            <tr><td>8</td><td>~0.74 km^2</td><td>~0.46 km</td><td>Suburban / general</td></tr>
            <tr><td>9</td><td>~0.11 km^2</td><td>~0.17 km</td><td>Urban / high-density</td></tr>
            <tr><td>10</td><td>~0.015 km^2</td><td>~0.07 km</td><td>Default / standard verification</td></tr>
          </tbody>
        </table>
        <t>
          A conforming implementation MUST quantize raw GPS
          coordinates to an H3 cell before any signing or storage
          operation.  Raw coordinates MUST NOT appear in breadcrumbs
          or in any protocol message transmitted between TRIP
          entities.
        </t>
        <t>
          H3 resolution is a configurable protocol parameter.
          Implementations SHOULD default to resolution 10.
          Deployments MAY select alternative resolutions based on
          jurisdictional requirements, population density, and
          use-case sensitivity.  Lower resolutions (larger cells)
          provide stronger location privacy at the cost of reduced
          spatial discrimination for trust computation.
        </t>
      </section>

      <section anchor="context-digest" numbered="true" toc="include">
        <name>Context Digest Computation</name>
        <t>
          The context digest binds ambient environmental signals to
          the breadcrumb without revealing them.  The digest is
          computed as follows:
        </t>
        <ol>
          <li>
            <t>
              Construct a pipe-delimited string of tagged components
              in the following order:
            </t>
            <ul>
              <li>"h3:" followed by the H3 cell hex string</li>
              <li>"ts:" followed by the timestamp bucketed to
                5-minute intervals (floor(Unix_minutes / 5) * 5)</li>
              <li>"wifi:" followed by the first 16 hex characters
                of SHA-256(sorted comma-joined BSSIDs),
                if Wi-Fi scan data is available</li>
              <li>"cell:" followed by the first 16 hex characters
                of SHA-256(sorted comma-joined tower IDs),
                if cellular data is available</li>
              <li>"imu:" followed by the first 16 hex characters
                of SHA-256(IMU vector string),
                if inertial sensor data is available</li>
            </ul>
          </li>
          <li>Compute SHA-256 over the UTF-8 encoding of
            the resulting string.</li>
        </ol>
        <t>
          Absent components MUST be omitted entirely, not
          represented as empty strings.
        </t>
      </section>

      <section anchor="signature" numbered="true" toc="include">
        <name>Signature Production</name>
        <t>
          The signable payload is the deterministic CBOR encoding
          (per Section 4.2 of <xref target="RFC8949"/>) of a CBOR
          map containing fields 0 through 7, with map keys sorted
          in ascending integer order.  The Ed25519 signature
          <xref target="RFC8032"/> is computed over the raw bytes
          of this CBOR encoding and stored at key 8.
        </t>
        <artwork type="ascii-art"><![CDATA[
   signable_payload = CBOR-Deterministic(fields[0..7])
   signature        = Ed25519-Sign(private_key, signable_payload)
]]></artwork>
        <t>
          Deterministic CBOR encoding ensures that any conforming
          implementation produces identical byte sequences for the
          same logical content, which is essential for reproducible
          signature verification across heterogeneous platforms.
        </t>
      </section>

      <section anchor="block-hash" numbered="true" toc="include">
        <name>Block Hash and Chaining</name>
        <t>
          The block hash is the SHA-256 digest of the complete
          deterministic CBOR encoding of the breadcrumb (fields 0
          through 8 inclusive, i.e., including the signature):
        </t>
        <artwork type="ascii-art"><![CDATA[
   BreadcrumbHash(B) = SHA-256(CBOR-Deterministic(B[0..8]))
   B[N+1].field[6]   = BreadcrumbHash(B[N])
   B[0].field[6]     = null
]]></artwork>
        <t>
          Each breadcrumb at index &gt; 0 MUST carry the block hash
          of its immediate predecessor in field 6, forming an
          append-only hash chain.  The genesis breadcrumb (index 0)
          MUST set field 6 to null (CBOR simple value 22).
        </t>
      </section>
    </section>

    <!-- ============================================================ -->
    <section anchor="chain-mgmt" numbered="true" toc="include">
      <name>Chain Management</name>

      <section anchor="location-dedup" numbered="true" toc="include">
        <name>Location Deduplication</name>
        <t>
          Proof-of-Trajectory requires demonstrated movement.  A
          conforming implementation MUST reject a breadcrumb if the
          H3 cell is identical to the immediately preceding
          breadcrumb.  Implementations SHOULD also enforce a cap
          (default 10) on the number of breadcrumbs recordable at
          any single H3 cell to prevent stationary farming.
        </t>
      </section>

      <section anchor="minimum-interval" numbered="true" toc="include">
        <name>Minimum Collection Interval</name>
        <t>
          Breadcrumbs SHOULD be collected at intervals of no less
          than 15 minutes.  An implementation MAY allow shorter
          intervals during explicit "exploration" sessions but
          MUST NOT accept intervals shorter than 5 minutes.
        </t>
      </section>

      <section anchor="chain-verification" numbered="true" toc="include">
        <name>Chain Verification</name>
        <t>
          A Verifier MUST check:
        </t>
        <ol>
          <li>Index values form a contiguous sequence starting at 0.</li>
          <li>Timestamps are monotonically non-decreasing.</li>
          <li>Each previousHash matches the block hash of the prior
            breadcrumb.</li>
          <li>Each Ed25519 signature verifies against the identity
            public key and the canonical signed data.</li>
        </ol>
      </section>
    </section>

    <!-- ============================================================ -->
    <section anchor="epochs" numbered="true" toc="include">
      <name>Epochs</name>
      <t>
        An epoch seals a batch of breadcrumbs (default 100) under
        a Merkle root.  The epoch record is a CBOR map containing:
      </t>
      <table anchor="epoch-fields">
        <name>Epoch CBOR Fields</name>
        <thead>
          <tr><th>Key</th><th>Type</th><th>Description</th></tr>
        </thead>
        <tbody>
          <tr><td>0</td><td>uint</td><td>Epoch number</td></tr>
          <tr><td>1</td><td>bstr (32)</td><td>Identity public key</td></tr>
          <tr><td>2</td><td>uint</td><td>First breadcrumb index</td></tr>
          <tr><td>3</td><td>uint</td><td>Last breadcrumb index</td></tr>
          <tr><td>4</td><td>uint</td><td>Timestamp of first breadcrumb</td></tr>
          <tr><td>5</td><td>uint</td><td>Timestamp of last breadcrumb</td></tr>
          <tr><td>6</td><td>bstr (32)</td><td>Merkle root of breadcrumb hashes</td></tr>
          <tr><td>7</td><td>uint</td><td>Count of unique H3 cells</td></tr>
          <tr><td>8</td><td>bstr (64)</td><td>Ed25519 signature over fields 0-7</td></tr>
        </tbody>
      </table>
      <t>
        The Merkle tree MUST use SHA-256 and a canonical left-right
        ordering of breadcrumb block hashes.  An epoch is sealed
        when the breadcrumb count reaches the epoch size threshold.
      </t>
    </section>

    <!-- ============================================================ -->
    <section anchor="tit" numbered="true" toc="include">
      <name>Trajectory Identity Token (TIT)</name>
      <t>
        A TIT is the externally presentable identity derived from a
        TRIP trajectory.  It consists of:
      </t>
      <ul>
        <li>The Ed25519 public key (32 bytes).</li>
        <li>The current epoch count.</li>
        <li>The total breadcrumb count.</li>
        <li>The count of unique H3 cells visited.</li>
        <li>A trust score (see <xref target="trust-scoring"/>).</li>
      </ul>
      <t>
        A TIT SHOULD be encoded as a CBOR map for machine
        consumption and MAY additionally be represented as a
        Base64url string for URI embedding.
      </t>
    </section>

    <!-- ============================================================ -->
    <!-- CRITICALITY ENGINE (from -01, unchanged) -->
    <!-- ============================================================ -->
    <section anchor="criticality" numbered="true" toc="include">
      <name>The Criticality Engine</name>
      <t>
        The Criticality Engine is the core analytical component of
        the TRIP Verifier.  It evaluates whether a trajectory
        exhibits the statistical signature of biological
        Self-Organized Criticality (SOC) -- the phenomenon where
        living systems operate at the boundary between order and
        chaos, producing scale-free correlations that are
        mathematically distinct from synthetic or automated movement.
      </t>
      <t>
        The theoretical foundation rests on three pillars:
      </t>
      <t>
        First, Parisi's demonstration
        <xref target="PARISI-NOBEL"/> that flocking organisms such
        as starling murmurations exhibit scale-free correlations
        <xref target="CAVAGNA-STARLINGS"/> where perturbations
        propagate across the entire group regardless of size.
        Crucially, Ballerini et al. showed that these interactions
        are topological (based on nearest k neighbors) rather than
        metric (based on distance)
        <xref target="BALLERINI-TOPOLOGICAL"/>.  TRIP exploits this
        through Power Spectral Density analysis
        (<xref target="psd-analysis"/>): human movement produces
        characteristic 1/f pink noise that synthetic trajectories
        cannot replicate.
      </t>
      <t>
        Second, Barabasi et al.'s discovery
        <xref target="BARABASI-MOBILITY"/> that human displacement
        follows truncated Levy flights with approximately 93%
        predictability <xref target="SONG-LIMITS"/>.  TRIP learns
        each identity's mobility profile -- displacement
        distribution, anchor transition patterns, and circadian
        rhythms -- and detects deviations from these learned
        baselines (<xref target="mobility"/>).
      </t>
      <t>
        Third, a six-component Hamiltonian energy function
        (<xref target="hamiltonian"/>) that combines spatial,
        temporal, kinetic, flock-alignment, contextual, and
        structural analysis into a single anomaly score for each
        incoming breadcrumb.  The Hamiltonian provides real-time
        detection while the PSD and mobility statistics provide
        aggregate trajectory assessment.
      </t>

      <section anchor="psd-analysis" numbered="true" toc="include">
        <name>Power Spectral Density Analysis</name>
        <t>
          The primary diagnostic is the Power Spectral Density (PSD)
          of the displacement time series.  Given a trajectory of N
          breadcrumbs with displacements d(i) between consecutive
          breadcrumbs, the PSD is computed via the Discrete Fourier
          Transform:
        </t>
        <artwork type="ascii-art"><![CDATA[
   S(f) = |DFT(d)|^2

   where d = [d(0), d(1), ..., d(N-1)]
   and d(i) = haversine_distance(cell(i), cell(i-1))
]]></artwork>
        <t>
          The PSD is then fitted to a power-law model:
        </t>
        <artwork type="ascii-art"><![CDATA[
   S(f) ~ 1 / f^alpha
]]></artwork>
        <t>
          The exponent alpha (the "Parisi Factor") is the critical
          diagnostic:
        </t>
        <table anchor="alpha-ranges">
          <name>PSD Alpha Exponent Classification</name>
          <thead>
            <tr><th>Alpha Range</th><th>Noise Type</th><th>Classification</th></tr>
          </thead>
          <tbody>
            <tr>
              <td>0.00 - 0.15</td>
              <td>White noise</td>
              <td>Synthetic / automated script</td>
            </tr>
            <tr>
              <td>0.15 - 0.30</td>
              <td>Near-white</td>
              <td>Suspicious (possible sophisticated bot)</td>
            </tr>
            <tr>
              <td>0.30 - 0.80</td>
              <td>Pink noise (1/f)</td>
              <td>Biological / human</td>
            </tr>
            <tr>
              <td>0.80 - 1.20</td>
              <td>Near-brown</td>
              <td>Suspicious (possible replay with drift)</td>
            </tr>
            <tr>
              <td>1.20+</td>
              <td>Brown noise</td>
              <td>Drift anomaly / sensor failure</td>
            </tr>
          </tbody>
        </table>
        <t>
          A conforming implementation MUST compute the PSD alpha
          exponent over a sliding window of the most recent 64
          breadcrumbs (minimum) to 256 breadcrumbs (recommended).
          The alpha value MUST fall within [0.30, 0.80] for the
          trajectory to be classified as biological.
        </t>
        <t>
          The key insight is that automated movement generators lack
          the long-range temporal correlations ("memory") inherent
          in a system operating at criticality.  A random walk
          produces white noise (alpha near 0).  A deterministic
          replay produces brown noise (alpha near 2).  Only a
          biological system operating at the critical point produces
          pink noise in the characteristic [0.30, 0.80] range.
        </t>
      </section>

      <section anchor="criticality-confidence" numbered="true" toc="include">
        <name>Criticality Confidence Score</name>
        <t>
          The Criticality Confidence is a value in [0, 1] computed
          from the alpha exponent and the goodness-of-fit (R-squared)
          of the power-law regression:
        </t>
        <artwork type="ascii-art"><![CDATA[
   alpha_score = 1.0 - |alpha - 0.55| / 0.25

   criticality_confidence = alpha_score * R_squared

   where:
     0.55 is the center of the biological range
     0.25 is the half-width of the biological range
     R_squared is the coefficient of determination of the
       log-log linear regression
]]></artwork>
        <t>
          A criticality_confidence below 0.5 SHOULD trigger
          elevated monitoring.  A value below 0.3 SHOULD flag the
          trajectory for manual review or additional verification
          challenges.
        </t>
      </section>
    </section>

    <!-- ============================================================ -->
    <!-- MOBILITY STATISTICS (from -01, unchanged) -->
    <!-- ============================================================ -->
    <section anchor="mobility" numbered="true" toc="include">
      <name>Mobility Statistics</name>
      <t>
        This section defines the mobility model that enforces
        known constraints of human movement, as established by
        Barabasi et al. <xref target="BARABASI-MOBILITY"/>.
      </t>

      <section anchor="levy-flights" numbered="true" toc="include">
        <name>Truncated Levy Flights</name>
        <t>
          Human displacement between consecutive recorded locations
          follows a truncated power-law distribution:
        </t>
        <artwork type="ascii-art"><![CDATA[
   P(delta_r) ~ delta_r^(-beta) * exp(-delta_r / kappa)

   where:
     delta_r = displacement distance (km)
     beta    = power-law exponent (typically 1.50 - 1.90)
     kappa   = exponential cutoff distance (km)
]]></artwork>
        <t>
          The exponent beta captures the heavy-tailed nature of
          human movement: most displacements are short (home to
          office) but occasional long jumps (travel) follow a
          predictable distribution.  The cutoff kappa is learned
          per identity and represents the characteristic maximum
          range.
        </t>
        <t>
          A conforming implementation MUST maintain a running
          estimate of beta and kappa for each identity by fitting
          the displacement histogram using maximum likelihood
          estimation over the most recent epoch (100 breadcrumbs).
        </t>
        <t>
          A new displacement that falls outside the 99.9th
          percentile of the fitted distribution MUST increment the
          spatial anomaly counter.
        </t>
      </section>

      <section anchor="predictability" numbered="true" toc="include">
        <name>Trajectory Predictability</name>
        <t>
          Research has demonstrated that approximately 93% of human
          movement is predictable based on historical patterns
          <xref target="SONG-LIMITS"/>.  TRIP exploits this by
          maintaining a Markov Transition Matrix over anchor cells:
        </t>
        <artwork type="ascii-art"><![CDATA[
   T[a_i][a_j] = count(transitions from a_i to a_j)
                  / count(all departures from a_i)

   where a_i, a_j are anchor cells.
]]></artwork>
        <t>
          An anchor cell is defined as any H3 cell where the
          identity has recorded 5 or more breadcrumbs.  The
          transition matrix is rebuilt at each epoch boundary.
        </t>
        <t>
          The predictability score Pi for an identity is the
          fraction of observed transitions that match the
          highest-probability successor in the Markov matrix.
          Human identities converge toward Pi values in the range
          [0.80, 0.95] after approximately 200 breadcrumbs.
          Deviations below 0.60 are anomalous.
        </t>
      </section>

      <section anchor="circadian" numbered="true" toc="include">
        <name>Circadian and Weekly Profiles</name>
        <t>
          The implementation SHOULD maintain two histogram profiles:
        </t>
        <ul>
          <li>A circadian profile C[hour] recording the probability
            of activity in each hour of the day (24 bins).</li>
          <li>A weekly profile W[day] recording the probability
            of activity on each day of the week (7 bins).</li>
        </ul>
        <t>
          These profiles provide the temporal baseline for the
          Hamiltonian temporal energy component
          (<xref target="h-temporal"/>).
        </t>
      </section>
    </section>

    <!-- ============================================================ -->
    <!-- THE HAMILTONIAN (from -01, unchanged) -->
    <!-- ============================================================ -->
    <section anchor="hamiltonian" numbered="true" toc="include">
      <name>The Six-Component Hamiltonian</name>
      <t>
        To assess each incoming breadcrumb, the Criticality Engine
        computes a weighted energy score H that quantifies how much
        the breadcrumb deviates from the identity's learned
        behavioral profile.  High energy indicates anomalous
        behavior; low energy indicates normalcy.
      </t>
      <artwork type="ascii-art"><![CDATA[
   H = w_1 * H_spatial
     + w_2 * H_temporal
     + w_3 * H_kinetic
     + w_4 * H_flock
     + w_5 * H_contextual
     + w_6 * H_structure
]]></artwork>
      <t>
        Default weights:
      </t>
      <table anchor="hamiltonian-weights">
        <name>Hamiltonian Component Weights</name>
        <thead>
          <tr><th>Component</th><th>Weight</th><th>Diagnostic Target</th></tr>
        </thead>
        <tbody>
          <tr><td>H_spatial</td><td>0.25</td><td>Displacement anomalies (teleportation)</td></tr>
          <tr><td>H_temporal</td><td>0.20</td><td>Circadian rhythm violations</td></tr>
          <tr><td>H_kinetic</td><td>0.20</td><td>Anchor transition improbability</td></tr>
          <tr><td>H_flock</td><td>0.15</td><td>Misalignment with local human flow</td></tr>
          <tr><td>H_contextual</td><td>0.10</td><td>Sensor cross-correlation failure</td></tr>
          <tr><td>H_structure</td><td>0.10</td><td>Chain integrity and timing regularity</td></tr>
        </tbody>
      </table>
      <t>
        Weights are modulated by the profile maturity m, defined as
        min(breadcrumb_count / 200, 1.0).  During the bootstrap
        phase (m &lt; 1.0), all weights are scaled by m, widening
        the acceptance threshold for new identities.
      </t>

      <section anchor="h-spatial" numbered="true" toc="include">
        <name>H_spatial: Displacement Anomaly</name>
        <t>
          Given the identity's fitted truncated Levy distribution
          P(delta_r), the spatial energy for a displacement delta_r
          is the negative log-likelihood (surprise):
        </t>
        <artwork type="ascii-art"><![CDATA[
   H_spatial = -log(P(delta_r))

   where P(delta_r) = C * delta_r^(-beta) * exp(-delta_r / kappa)
   and C is the normalization constant.
]]></artwork>
        <t>
          Typical displacements yield H_spatial near the identity's
          historical baseline.  A displacement that exceeds the
          identity's learned kappa cutoff by more than a factor of 3
          produces an H_spatial value in the CRITICAL range.
        </t>
      </section>

      <section anchor="h-temporal" numbered="true" toc="include">
        <name>H_temporal: Rhythm Anomaly</name>
        <t>
          Using the circadian profile C[hour] and weekly profile
          W[day]:
        </t>
        <artwork type="ascii-art"><![CDATA[
   H_temporal = -log(C[current_hour]) - log(W[current_day])
]]></artwork>
        <t>
          Activity at 3:00 AM for an identity with a 9-to-5
          circadian profile yields high H_temporal.  Activity at
          8:00 AM on a Tuesday for the same identity yields low
          H_temporal.
        </t>
      </section>

      <section anchor="h-kinetic" numbered="true" toc="include">
        <name>H_kinetic: Transition Anomaly</name>
        <t>
          Using the Markov Transition Matrix T:
        </t>
        <artwork type="ascii-art"><![CDATA[
   from_anchor = nearest anchor to previous breadcrumb
   to_anchor   = nearest anchor to current breadcrumb
   H_kinetic   = -log(max(T[from_anchor][to_anchor], epsilon))

   where epsilon = 0.001 (floor to prevent log(0))
]]></artwork>
        <t>
          A home-to-office transition at 8:00 AM yields low
          H_kinetic.  An office-to-unknown-city transition yields
          high H_kinetic.
        </t>
      </section>

      <section anchor="h-flock" numbered="true" toc="include">
        <name>H_flock: Topological Alignment</name>
        <t>
          Inspired by Parisi's finding that starlings track their
          k nearest topological neighbors (k approximately 6-7)
          rather than all birds within a metric radius
          <xref target="PARISI-NOBEL"/>, the flock energy measures
          alignment between the identity's velocity vector and the
          aggregate velocity of co-located TRIP entities.
        </t>
        <artwork type="ascii-art"><![CDATA[
   v_self  = displacement vector of current identity
   v_flock = mean displacement vector of k nearest
             co-located identities (k = 7)

   alignment = dot(v_self, v_flock)
               / (|v_self| * |v_flock|)

   H_flock = 1.0 - max(alignment, 0)
]]></artwork>
        <t>
          When flock data is unavailable (sparse network or
          privacy constraints), the implementation SHOULD fall back
          to comparing the current velocity against the identity's
          own historical velocity distribution at the same
          location and time-of-day.
        </t>
        <t>
          H_flock defeats GPS replay attacks: an adversary replaying
          a previously recorded trajectory will find that the
          ambient flock has changed since the recording, producing
          a misalignment signal.
        </t>
      </section>

      <section anchor="h-contextual" numbered="true" toc="include">
        <name>H_contextual: Sensor Cross-Correlation</name>
        <t>
          This component compares the IMU (accelerometer, gyroscope)
          signature against the claimed GPS displacement.  A genuine
          device in motion produces correlated IMU and GPS readings.
          GPS injection on a stationary device is detected by the
          absence of corresponding IMU activity:
        </t>
        <artwork type="ascii-art"><![CDATA[
   H_contextual = divergence(
     observed_imu_magnitude,
     expected_imu_magnitude_for(gps_displacement)
   )
]]></artwork>
        <t>
          Implementations that lack IMU access MUST set
          H_contextual = 0 and SHOULD increase the weights of
          other components proportionally.
        </t>
      </section>

      <section anchor="h-structure" numbered="true" toc="include">
        <name>H_structure: Chain Structural Integrity</name>
        <t>
          This component evaluates the structural properties of
          the breadcrumb chain itself:
        </t>
        <ul>
          <li>Inter-breadcrumb timing regularity: excessively
            uniform intervals suggest automation.</li>
          <li>Hash chain continuity: any break in the chain
            produces maximum H_structure.</li>
          <li>Phase-space smoothness: the velocity-acceleration
            phase portrait of a human trajectory traces smooth
            loops, while bots produce either chaotic blobs or
            tight limit cycles.</li>
        </ul>
      </section>

      <section anchor="alert-levels" numbered="true" toc="include">
        <name>Alert Classification</name>
        <t>
          The total Hamiltonian H maps to an alert level.  The
          baseline H_baseline is the rolling median of the
          identity's own recent energy values, making the threshold
          self-calibrating per identity:
        </t>
        <table anchor="alert-table">
          <name>Hamiltonian Alert Levels</name>
          <thead>
            <tr><th>H Range</th><th>Level</th><th>Action</th></tr>
          </thead>
          <tbody>
            <tr>
              <td>[0, H_baseline * 1.5)</td>
              <td>NOMINAL</td>
              <td>Normal operation</td>
            </tr>
            <tr>
              <td>[H_baseline * 1.5, 3.0)</td>
              <td>ELEVATED</td>
              <td>Increase sampling frequency, log</td>
            </tr>
            <tr>
              <td>[3.0, 5.0)</td>
              <td>SUSPICIOUS</td>
              <td>Flag for review, require reconfirmation</td>
            </tr>
            <tr>
              <td>[5.0, infinity)</td>
              <td>CRITICAL</td>
              <td>Freeze trust score, trigger challenge</td>
            </tr>
          </tbody>
        </table>
      </section>
    </section>

    <!-- ============================================================ -->
    <!-- POH CERTIFICATE (from -01, unchanged) -->
    <!-- ============================================================ -->
    <section anchor="poh-certificate" numbered="true" toc="include">
      <name>Proof-of-Humanity Certificate</name>
      <t>
        A PoH Certificate is a compact, privacy-preserving
        Attestation Result (in the RATS sense) asserting that an
        identity has demonstrated biological movement
        characteristics.  It contains ONLY statistical exponents
        derived from the trajectory -- no raw location data, no GPS
        coordinates, no cell identifiers.
      </t>
      <t>
        The certificate is encoded as a CBOR map:
      </t>
      <table anchor="poh-fields">
        <name>PoH Certificate CBOR Fields</name>
        <thead>
          <tr><th>Key</th><th>Type</th><th>Description</th></tr>
        </thead>
        <tbody>
          <tr><td>0</td><td>bstr (32)</td><td>Identity public key</td></tr>
          <tr><td>1</td><td>uint</td><td>Issuance timestamp</td></tr>
          <tr><td>2</td><td>uint</td><td>Epoch count at issuance</td></tr>
          <tr><td>3</td><td>float</td><td>PSD alpha exponent</td></tr>
          <tr><td>4</td><td>float</td><td>Levy beta exponent</td></tr>
          <tr><td>5</td><td>float</td><td>Levy kappa cutoff (km)</td></tr>
          <tr><td>6</td><td>float</td><td>Predictability score Pi</td></tr>
          <tr><td>7</td><td>float</td><td>Criticality confidence</td></tr>
          <tr><td>8</td><td>float</td><td>Trust score T</td></tr>
          <tr><td>9</td><td>uint</td><td>Unique cell count</td></tr>
          <tr><td>10</td><td>uint</td><td>Total breadcrumb count</td></tr>
          <tr><td>11</td><td>uint</td><td>Validity duration (seconds)</td></tr>
          <tr><td>12</td><td>bstr (16) / null</td><td>Relying Party nonce (if active verification)</td></tr>
          <tr><td>13</td><td>bstr (32) / null</td><td>Chain head hash at issuance</td></tr>
          <tr><td>14</td><td>bstr (64)</td><td>Verifier Ed25519 signature</td></tr>
        </tbody>
      </table>
      <t>
        Fields 12 and 13 are populated only when the certificate is
        issued in response to an Active Verification request
        (<xref target="active-verification"/>).  In Passive mode,
        these fields MUST be null.
      </t>
      <t>
        A Relying Party receiving a PoH Certificate can verify:
      </t>
      <ol>
        <li>The Verifier signature (field 14) is valid against a
          trusted Verifier public key.</li>
        <li>The alpha exponent (field 3) falls within [0.30, 0.80].</li>
        <li>The criticality confidence (field 7) exceeds the Relying
          Party's policy threshold.</li>
        <li>The trust score (field 8) meets application requirements.</li>
        <li>The certificate has not expired (field 1 + field 11 &gt;
          current time).</li>
        <li>If Active mode: the nonce (field 12) matches the Relying
          Party's original challenge, and the chain head hash
          (field 13) provides freshness binding.</li>
      </ol>
      <t>
        The certificate reveals NOTHING about where the identity
        has been -- only that it has moved through the world in a
        manner statistically consistent with a biological organism.
      </t>
    </section>

    <!-- ============================================================ -->
    <section anchor="trust-scoring" numbered="true" toc="include">
      <name>Trust Scoring</name>
      <t>
        The trust score T is computed as a weighted combination of
        four factors:
      </t>
      <artwork type="ascii-art"><![CDATA[
   T = 0.40 * min(breadcrumb_count / 200, 1.0)
     + 0.30 * min(unique_cells / 50, 1.0)
     + 0.20 * min(days_since_first / 365, 1.0)
     + 0.10 * chain_integrity

   chain_integrity = 1.0 if chain verification passes, else 0.0
   T is expressed as a percentage in [0, 100].
]]></artwork>
      <t>
        The threshold for claiming a handle (binding a human-readable
        name to a TIT) requires breadcrumb_count &gt;= 100 and
        T &gt;= 20.
      </t>
      <t>
        In the Parisi percolation model, the trust score also
        incorporates the criticality confidence from the PSD
        analysis.  A trajectory that fails the criticality test
        (alpha outside [0.30, 0.80]) MUST have its trust score
        capped at 50, regardless of other factors.
      </t>
    </section>

    <!-- ============================================================ -->
    <!-- NEW IN -02: EXPANDED RATS MAPPING -->
    <!-- ============================================================ -->
    <section anchor="rats-mapping" numbered="true" toc="include">
      <name>RATS Architecture Mapping</name>
      <t>
        TRIP implements the Remote ATtestation procedureS (RATS)
        architecture defined in <xref target="RFC9334"/>.  This
        section provides the normative mapping between TRIP
        components and RATS roles.
      </t>

      <section anchor="rats-roles" numbered="true" toc="include">
        <name>Role Mapping</name>
        <table anchor="rats-role-table">
          <name>TRIP-to-RATS Role Mapping</name>
          <thead>
            <tr><th>RATS Role</th><th>TRIP Component</th><th>Description</th></tr>
          </thead>
          <tbody>
            <tr>
              <td>Attester</td>
              <td>TRIP-enabled mobile device</td>
              <td>Collects breadcrumbs, signs them with the
                identity Ed25519 private key, chains them into
                the append-only trajectory log, and transmits
                H3-quantized Evidence to the Verifier.</td>
            </tr>
            <tr>
              <td>Evidence</td>
              <td>Breadcrumbs and epoch records</td>
              <td>H3-quantized spatiotemporal claims including
                cell identifiers, timestamps, context digests,
                chain hashes, and Ed25519 signatures.  Evidence
                is transmitted from Attester to Verifier.</td>
            </tr>
            <tr>
              <td>Verifier</td>
              <td>Criticality Engine</td>
              <td>Receives Evidence, performs chain verification,
                computes PSD alpha exponents, fits Levy flight
                parameters, evaluates the six-component
                Hamiltonian, and produces Attestation Results.</td>
            </tr>
            <tr>
              <td>Attestation Result</td>
              <td>PoH Certificate and trust score</td>
              <td>Contains only statistical exponents (alpha,
                beta, kappa) and aggregate scores.  No raw
                Evidence (cell IDs, timestamps, chain hashes)
                is included in the Attestation Result.</td>
            </tr>
            <tr>
              <td>Relying Party</td>
              <td>Any service consuming PoH Certificates</td>
              <td>Evaluates the Attestation Result against its
                own policy.  Does not receive or process raw
                Evidence.</td>
            </tr>
          </tbody>
        </table>
      </section>

      <section anchor="evidence-flow" numbered="true" toc="include">
        <name>Evidence Flow</name>
        <t>
          H3-quantized Evidence is transmitted from the Attester
          to the Verifier.  This is an explicit design choice: the
          Verifier requires access to the full breadcrumb chain to
          compute PSD exponents, fit Levy flight parameters, and
          evaluate the Hamiltonian.
        </t>
        <t>
          Privacy preservation derives from the H3 quantization
          transform applied by the Attester before any data leaves
          the device, NOT from data locality.  Raw GPS coordinates
          MUST NOT be transmitted.  The quantization transform is
          lossy and irreversible: given an H3 cell identifier, an
          observer can determine only that the Attester was within
          the cell's area, not the precise coordinates.
        </t>
        <t>
          The Verifier receives cell identifiers, timestamps,
          context digests, and chain hashes.  The Verifier MUST NOT
          forward raw Evidence to Relying Parties.  Only the
          Attestation Result (PoH Certificate) is disclosed to
          Relying Parties.
        </t>
      </section>

      <section anchor="verifier-trust" numbered="true" toc="include">
        <name>Verifier Trust Model</name>
        <t>
          The Relying Party MUST trust the Verifier that produced
          the Attestation Result.  This trust relationship is
          analogous to the trust a TLS client places in a
          Certificate Authority: the protocol defines the
          verification procedures, but the selection of trusted
          Verifiers is a deployment policy decision.
        </t>
        <t>
          The TRIP protocol supports multiple independent Verifiers.
          An Attester MAY submit Evidence to more than one Verifier.
          A Relying Party MAY accept Attestation Results from any
          Verifier it trusts.  The set of trusted Verifiers is
          configured by the Relying Party and is outside the scope
          of this specification.
        </t>
        <t>
          Each Verifier MUST have its own Ed25519 key pair.  The
          Verifier signs PoH Certificates with its private key
          (field 14 of the PoH Certificate).  Relying Parties
          verify this signature against the Verifier's published
          public key.
        </t>
      </section>
    </section>

    <!-- ============================================================ -->
    <!-- NEW IN -02: REPLAY PROTECTION (REWRITTEN) -->
    <!-- ============================================================ -->
    <section anchor="replay-protection" numbered="true" toc="include">
      <name>Replay Protection</name>
      <t>
        TRIP provides replay protection at two distinct layers:
        protection of the Evidence chain against tampering, and
        protection of Attestation Results against replay to
        Relying Parties.
      </t>

      <section anchor="chain-replay" numbered="true" toc="include">
        <name>Chain-Level Replay Protection</name>
        <t>
          The monotonically increasing index and the chaining via
          the previous block hash field provide replay protection
          within a single trajectory.  A replayed breadcrumb will
          fail the chain integrity check.  Cross-trajectory replay
          (injecting breadcrumbs signed by identity A into a chain
          belonging to identity B) will fail Ed25519 signature
          verification.
        </t>
        <t>
          An attacker who obtains a copy of Evidence previously
          submitted to a Verifier cannot inject it into a different
          identity's chain because every breadcrumb is signed by the
          identity's private key and chained to the preceding
          breadcrumb via hash linkage.
        </t>
      </section>

      <section anchor="result-replay" numbered="true" toc="include">
        <name>Attestation Result Replay Protection</name>
        <t>
          Chain-level protection ensures Evidence integrity but does
          not prevent an attacker from replaying a previously issued
          PoH Certificate to a Relying Party.  An attacker who
          intercepts a valid PoH Certificate could present it to a
          different Relying Party, or present it after the
          identity's trust state has changed.
        </t>
        <t>
          TRIP defines two verification modes to address this:
        </t>
        <dl>
          <dt>Passive Verification</dt>
          <dd>
            The Relying Party queries the Verifier for the current
            PoH Certificate associated with an identity.  The
            Verifier returns its most recently computed Attestation
            Result.  No freshness binding is provided.  The Relying
            Party accepts the staleness risk inherent in cached
            results.  This mode is suitable for low-stakes
            decisions where the cost of a replayed certificate is
            bounded (e.g., read access, rate limiting).
          </dd>
          <dt>Active Verification</dt>
          <dd>
            The Relying Party provides an unpredictable nonce to
            the Verifier as part of a challenge-response exchange.
            The resulting PoH Certificate is cryptographically
            bound to the specific request, the current trajectory
            state, and the current moment.  This mode is REQUIRED
            for high-stakes decisions (e.g., financial operations,
            handle claiming, publishing).  See
            <xref target="active-verification"/> for the full
            protocol.
          </dd>
        </dl>
      </section>

      <section anchor="active-verification" numbered="true" toc="include">
        <name>Active Verification Protocol</name>
        <t>
          The Active Verification Protocol provides cryptographic
          freshness guarantees by binding the Attestation Result to
          a Relying Party-supplied nonce, the current chain head,
          and the current time.  The protocol proceeds as follows:
        </t>
        <ol>
          <li>
            <t>The Relying Party generates an unpredictable nonce
            (RECOMMENDED: 16 bytes from a cryptographically secure
            random number generator) and sends a Verification
            Request to the Verifier:</t>
            <artwork type="ascii-art"><![CDATA[
   VerificationRequest = {
     0 => bstr .size 32,   ; identity public key
     1 => bstr .size 16,   ; nonce
     2 => uint,            ; request timestamp
     3 => uint,            ; requested freshness window (seconds)
   }
]]></artwork>
          </li>
          <li>
            <t>The Verifier delivers a Liveness Challenge to the
            Attester via a real-time channel (e.g., WebSocket push,
            push notification):</t>
            <artwork type="ascii-art"><![CDATA[
   LivenessChallenge = {
     0 => bstr .size 16,   ; nonce (from Relying Party)
     1 => bstr .size 32,   ; verifier identity (public key)
     2 => uint,            ; challenge timestamp
     3 => uint,            ; response deadline (seconds)
   }
]]></artwork>
          </li>
          <li>
            <t>The Attester constructs and signs a Liveness
            Response binding the nonce to the current chain
            state:</t>
            <artwork type="ascii-art"><![CDATA[
   LivenessResponse = {
     0 => bstr .size 16,   ; nonce echo
     1 => bstr .size 32,   ; chain_head_hash (hash of most
                           ;   recent breadcrumb)
     2 => uint,            ; response timestamp
     3 => uint,            ; current breadcrumb index
     4 => bstr .size 64,   ; Ed25519 signature over fields 0-3
                           ;   using identity private key
   }
]]></artwork>
          </li>
          <li>
            <t>The Verifier validates the Liveness Response by
            checking all of the following:</t>
            <ul>
              <li>The Ed25519 signature (field 4) is valid against
                the identity's public key over fields 0-3.</li>
              <li>The nonce echo (field 0) matches the nonce from
                the original Verification Request.</li>
              <li>The chain_head_hash (field 1) is consistent with
                the Verifier's stored trajectory state for this
                identity.</li>
              <li>The response timestamp (field 2) is within the
                response deadline specified in the Liveness
                Challenge.</li>
              <li>The breadcrumb index (field 3) matches or exceeds
                the Verifier's last known index for this identity.</li>
            </ul>
          </li>
          <li>
            <t>Upon successful validation, the Verifier produces a
            fresh PoH Certificate with field 12 set to the Relying
            Party's nonce and field 13 set to the chain_head_hash
            from the Liveness Response.  The Verifier signs this
            certificate with its own Ed25519 key and returns it to
            the Relying Party.</t>
          </li>
          <li>
            <t>The Relying Party verifies the PoH Certificate per
            <xref target="poh-certificate"/>, additionally
            confirming that field 12 matches its original nonce.</t>
          </li>
        </ol>
        <t>
          If the Attester does not respond within the response
          deadline, the Verifier MUST return an error to the
          Relying Party indicating that liveness could not be
          confirmed.  The Verifier MUST NOT fall back to Passive
          mode when Active mode was explicitly requested.
        </t>
      </section>

      <section anchor="active-cddl" numbered="true" toc="include">
        <name>Active Verification CDDL</name>
        <t>
          The following CDDL <xref target="RFC8610"/> schema defines
          the Active Verification messages:
        </t>
        <artwork type="ascii-art"><![CDATA[
   ; Active Verification Protocol CDDL Schema

   verification-request = {
     0 => bstr .size 32,        ; identity_key
     1 => bstr .size 16,        ; nonce
     2 => uint,                 ; request_timestamp
     3 => uint,                 ; freshness_window_seconds
   }

   liveness-challenge = {
     0 => bstr .size 16,        ; nonce
     1 => bstr .size 32,        ; verifier_key
     2 => uint,                 ; challenge_timestamp
     3 => uint,                 ; response_deadline_seconds
   }

   liveness-response = {
     0 => bstr .size 16,        ; nonce_echo
     1 => bstr .size 32,        ; chain_head_hash
     2 => uint,                 ; response_timestamp
     3 => uint,                 ; current_breadcrumb_index
     4 => bstr .size 64,        ; ed25519_signature
   }

   ; The PoH Certificate (Section 9) with fields 12-13
   ; populated serves as the Attestation Result for
   ; Active Verification.
]]></artwork>
      </section>
    </section>

    <!-- ============================================================ -->
    <section anchor="security" numbered="true" toc="include">
      <name>Security Considerations</name>

      <section anchor="attack-gps-replay" numbered="true" toc="include">
        <name>GPS Replay Attacks</name>
        <t>
          An adversary records a legitimate trajectory and replays
          the GPS coordinates on a different device.  TRIP detects
          this through multiple channels:
        </t>
        <ul>
          <li>H_flock: the ambient flock of co-located entities has
            changed since the recording.  The replayed trajectory
            will show misalignment with current human flow.</li>
          <li>H_contextual: unless the adversary also replays Wi-Fi
            BSSIDs, cellular tower IDs, and IMU data, the context
            digest will not match.</li>
          <li>H_structure: the timing regularity of a replay is
            typically either too perfect (exact timestamps) or
            shifted in a detectable pattern.</li>
        </ul>
      </section>

      <section anchor="attack-synthetic" numbered="true" toc="include">
        <name>Synthetic Walk Generators</name>
        <t>
          An adversary uses software to generate plausible-looking
          GPS coordinates.  The Criticality Engine defeats this:
        </t>
        <ul>
          <li>PSD alpha test: random walk generators produce white
            noise (alpha approximately 0).  Brownian motion generators
            produce alpha approximately 2.  Neither falls in the
            biological [0.30, 0.80] range.</li>
          <li>Levy flight fitting: synthetic displacements rarely
            match the truncated power-law distribution with
            biologically plausible beta and kappa values.</li>
          <li>Predictability test: synthetic trajectories either
            show near-zero predictability (random) or near-perfect
            predictability (scripted), both outside the human
            [0.80, 0.95] range.</li>
        </ul>
      </section>

      <section anchor="attack-emulator" numbered="true" toc="include">
        <name>Emulator Injection</name>
        <t>
          An adversary runs the TRIP client on an Android/iOS
          emulator with spoofed GPS.  Detection relies on:
        </t>
        <ul>
          <li>H_contextual: emulators typically provide zero or
            synthetic IMU data that does not correlate with claimed
            GPS displacement.</li>
          <li>Context digest: emulators lack real Wi-Fi scan data
            and cellular tower IDs, producing empty or static
            context digests.</li>
        </ul>
      </section>

      <section anchor="attack-device-strap" numbered="true" toc="include">
        <name>Device Strapping (Robot Dog Attack)</name>
        <t>
          An adversary straps a phone to a mobile robot or drone.
          This is the most sophisticated attack because it produces
          real GPS, Wi-Fi, cellular, and IMU data from actual
          physical movement.  Mitigation relies on:
        </t>
        <ul>
          <li>PSD alpha test: robotic movement typically lacks the
            characteristic 1/f noise of biological systems.  Robots
            move with mechanical regularity (brown noise) or
            programmatic randomness (white noise).</li>
          <li>Phase-space smoothness (H_structure): a robot's
            velocity-acceleration phase portrait differs
            characteristically from human movement.</li>
          <li>Circadian and weekly profiles: a robot generating
            breadcrumbs 24/7 will diverge from human activity
            patterns.</li>
        </ul>
        <t>
          This attack remains an active area of research.  The
          protocol's defense-in-depth approach through multiple
          independent Hamiltonian components makes it progressively
          more expensive to defeat all channels simultaneously.
        </t>
      </section>

      <section anchor="verifier-compromise" numbered="true" toc="include">
        <name>Verifier Compromise</name>
        <t>
          A compromised Verifier could issue fraudulent PoH
          Certificates.  Mitigations include:
        </t>
        <ul>
          <li>Relying Parties SHOULD accept certificates from
            multiple independent Verifiers and cross-check results
            for high-stakes operations.</li>
          <li>Verifier key rotation and revocation procedures
            SHOULD be established as part of deployment policy.</li>
          <li>The Active Verification Protocol ensures that even a
            compromised Verifier cannot produce a valid certificate
            without the Attester's cooperation (the Liveness
            Response requires the identity's private key).</li>
        </ul>
      </section>

      <section anchor="dos" numbered="true" toc="include">
        <name>Denial of Service</name>
        <t>
          An attacker can generate large numbers of Verification
          Requests or breadcrumb submissions to consume Verifier
          resources.  Verifiers SHOULD rate-limit requests per
          identity and per Relying Party.  The Active Verification
          Protocol's real-time requirement (Attester must respond
          within the deadline) provides an inherent rate limit on
          valid completions.
        </t>
      </section>
    </section>

    <!-- ============================================================ -->
    <!-- NEW IN -02: PRIVACY MODEL (REWRITTEN) -->
    <!-- ============================================================ -->
    <section anchor="privacy-model" numbered="true" toc="include">
      <name>Privacy Considerations</name>

      <section anchor="privacy-quantization" numbered="true" toc="include">
        <name>Quantization-Based Privacy</name>
        <t>
          TRIP's privacy model is based on lossy spatial
          quantization, not on data locality.  H3-quantized
          Evidence (cell identifiers, timestamps, context digests,
          and chain hashes) is transmitted from the Attester to the
          Verifier.  Raw GPS coordinates MUST NOT be transmitted
          and MUST NOT be stored by the Attester after quantization.
        </t>
        <t>
          The H3 quantization transform is lossy and irreversible.
          Given an H3 cell identifier, an observer learns only that
          the Attester was within the cell's area at the stated
          time.  At the default resolution 10, each cell covers
          approximately 15,000 m^2 (~0.015 km^2), providing
          meaningful ambiguity in populated areas.
        </t>
        <t>
          H3 resolution is a configurable protocol parameter that
          controls the privacy-precision tradeoff.  Deployments
          operating under strict privacy regulations (e.g., GDPR)
          MAY mandate lower resolutions.  Users SHOULD be informed
          of the selected resolution and its privacy implications.
        </t>
      </section>

      <section anchor="privacy-verifier" numbered="true" toc="include">
        <name>Verifier Data Handling</name>
        <t>
          The Verifier receives and processes H3-quantized Evidence
          to compute trust scores and PoH Certificates.  The
          Verifier:
        </t>
        <ul>
          <li>MUST NOT forward raw Evidence (breadcrumbs, cell
            identifiers, timestamps) to Relying Parties.</li>
          <li>MUST disclose its data retention policy to Attesters.</li>
          <li>SHOULD retain only the statistical aggregates
            (alpha, beta, kappa, transition matrices, circadian
            profiles) necessary for ongoing trust computation,
            and MAY discard individual breadcrumbs after
            incorporation into the aggregate model.</li>
          <li>MUST support data deletion requests where required
            by applicable law.</li>
        </ul>
      </section>

      <section anchor="privacy-rp" numbered="true" toc="include">
        <name>Relying Party Data Minimization</name>
        <t>
          The PoH Certificate is designed for maximum data
          minimization.  A Relying Party learns:
        </t>
        <ul>
          <li>The identity's public key.</li>
          <li>Statistical exponents characterizing movement
            patterns (alpha, beta, kappa).</li>
          <li>Aggregate counts (epochs, breadcrumbs, unique cells).</li>
          <li>A trust score and criticality confidence.</li>
        </ul>
        <t>
          A Relying Party does NOT learn: which cities, countries,
          or specific locations the identity has visited; the
          identity's home or workplace locations; the identity's
          daily schedule; or any raw trajectory data.
        </t>
      </section>

      <section anchor="privacy-trajectory-correlation" numbered="true" toc="include">
        <name>Trajectory Correlation and Sybil Resistance</name>
        <t>
          A trajectory is intrinsically linkable: all breadcrumbs
          share the same identity key.  This is by design, as trust
          accumulation requires identity continuity, and
          Proof-of-Humanity requires a durable binding between one
          physical entity and one cryptographic identity.
        </t>
        <t>
          A single physical entity operating multiple TRIP identities
          simultaneously constitutes a Sybil attack.  TRIP raises
          the cost of such attacks through multiple mechanisms:
          each identity requires a separate physical device, weeks
          of sustained movement, and independent trajectory
          accumulation.  The H_flock component
          (<xref target="h-flock"/>) provides a detection mechanism:
          co-located trajectories with identical displacement
          vectors produce a correlated-movement signal that
          Verifiers MAY use to flag suspected Sybil identities.
        </t>
        <t>
          Cross-trajectory correlation analysis (detecting that two
          identities may be operated by the same physical entity)
          is a Verifier-side heuristic and is outside the scope of
          this specification.  However, Verifiers SHOULD implement
          such heuristics and MAY reduce trust scores for
          trajectories that exhibit sustained co-movement with
          other identities.
        </t>
      </section>

      <section anchor="privacy-density" numbered="true" toc="include">
        <name>Population Density Considerations</name>
        <t>
          In sparsely populated areas, even cell-level granularity
          may narrow identification to very few individuals.
          Implementations SHOULD use lower resolution (larger cells)
          in rural areas and MAY allow users to override to a lower
          resolution at any time.
        </t>
      </section>
    </section>

    <!-- ============================================================ -->
    <!-- NEW IN -02: DEPLOYMENT CONSIDERATIONS -->
    <!-- ============================================================ -->
    <section anchor="deployment" numbered="true" toc="include">
      <name>Deployment Considerations</name>

      <section anchor="deploy-multi-verifier" numbered="true" toc="include">
        <name>Multiple Verifier Deployments</name>
        <t>
          The TRIP architecture supports multiple independent
          Verifier deployments.  Any entity that implements the
          verification procedures defined in this specification
          (chain verification, PSD analysis, Levy flight fitting,
          Hamiltonian evaluation) MAY operate as a TRIP Verifier.
        </t>
        <t>
          An Attester MAY submit Evidence to more than one Verifier
          simultaneously or sequentially.  Each Verifier maintains
          its own independent view of the trajectory and produces
          its own Attestation Results.
        </t>
        <t>
          A Relying Party MAY accept Attestation Results from any
          Verifier it trusts.  The mechanism for establishing and
          managing Verifier trust (e.g., trust lists, certificate
          pinning, reputation systems) is a deployment policy
          decision outside the scope of this specification.
        </t>
      </section>

      <section anchor="deploy-verifier-interop" numbered="true" toc="include">
        <name>Verifier Interoperability</name>
        <t>
          All conforming Verifiers MUST implement the base
          verification procedures: chain integrity
          (<xref target="chain-verification"/>), PSD alpha
          classification (<xref target="psd-analysis"/>), and the
          PoH Certificate format (<xref target="poh-certificate"/>).
        </t>
        <t>
          Verifiers MAY implement additional analysis beyond the
          base specification (e.g., machine-learning-based anomaly
          detection, additional Hamiltonian components).  Such
          extensions MUST NOT alter the PoH Certificate format but
          MAY influence the trust score and criticality confidence
          values.
        </t>
        <t>
          Two Verifiers processing the same Evidence SHOULD produce
          consistent alpha, beta, and kappa values (within
          numerical precision bounds) because these are derived
          from deterministic mathematical operations on the same
          input data.  Trust scores MAY differ if Verifiers apply
          different weighting policies.
        </t>
      </section>

      <section anchor="deploy-transport" numbered="true" toc="include">
        <name>Transport Binding</name>
        <t>
          This specification does not mandate a specific transport
          for Evidence submission, Liveness Challenges, or
          Verification Requests.  Implementations MAY use HTTPS,
          WebSocket, CoAP, or any transport that provides
          confidentiality and integrity protection.
        </t>
        <t>
          The Active Verification Protocol
          (<xref target="active-verification"/>) requires a
          real-time channel between the Verifier and Attester for
          Liveness Challenge delivery.  Implementations SHOULD use
          persistent connections (e.g., WebSocket) or mobile push
          notification services to minimize latency.
        </t>
      </section>

      <section anchor="deploy-naming" numbered="true" toc="include">
        <name>Naming System Integration</name>
        <t>
          TRIP operates on Ed25519 public keys and TITs.  The
          binding of human-readable names (handles) to TRIP
          identities is explicitly outside the scope of this
          specification and is expected to be addressed in a
          companion document.  TRIP provides the trust foundation
          (PoH Certificates) upon which naming systems can make
          registration and access-control decisions.
        </t>
      </section>

      <section anchor="deploy-accessibility" numbered="true" toc="include">
        <name>Accessibility and Low-Mobility Users</name>
        <t>
          TRIP does not require geographic travel.  It requires
          sustained physical existence over time, which is a
          fundamentally different property.  This section clarifies
          how the protocol accommodates users with limited or no
          physical mobility, addressing concerns raised during
          review <xref target="ZHANG-REVIEW"/>.
        </t>
        <t>
          A person who remains in a single H3 cell for an extended
          period still generates a valid trajectory.  The trust
          scoring formula (<xref target="trust-scoring"/>) assigns
          20% weight to temporal continuity (days_since_first) and
          40% weight to breadcrumb count, both of which accumulate
          regardless of spatial diversity.  A homebound user who
          collects breadcrumbs over 365 days achieves 60% of the
          maximum trust score from time and volume alone.
        </t>
        <t>
          The context digest (<xref target="context-digest"/>)
          provides environmental diversity even without movement.
          Wi-Fi access points in a neighborhood change over time
          as devices are added, removed, or replaced.  Cellular
          tower assignments shift with network load.  IMU sensors
          detect micro-movements (hand tremor, breathing, device
          repositioning) that produce non-trivial context variation.
          These ambient changes ensure that breadcrumbs collected
          from a fixed location are not identical, defeating
          simple replay attacks.
        </t>
        <t>
          The Hamiltonian (<xref target="hamiltonian"/>) is
          self-calibrating per identity: the baseline H_baseline is
          the rolling median of the identity's own energy values.
          A user with limited mobility develops a low-energy
          baseline that reflects their actual movement pattern.
          Anomalies are detected relative to the individual's own
          profile, not against a global expectation of travel.
        </t>
        <t>
          The PSD alpha exponent (<xref target="psd-analysis"/>)
          may require adaptation for stationary users.  When the
          displacement time series has very low variance, the PSD
          analysis degrades.  Implementations SHOULD supplement
          spatial PSD with temporal PSD (analyzing inter-breadcrumb
          timing patterns) for identities whose unique cell count
          is below a configurable threshold (default: 5 cells over
          the most recent 200 breadcrumbs).  Circadian rhythms in
          collection timing exhibit the same 1/f characteristics
          as spatial displacement, providing an alternative
          criticality signal.
        </t>
        <t>
          Deployments MUST NOT impose minimum spatial diversity
          requirements that would exclude users with mobility
          limitations.  The trust scoring formula MAY be adjusted
          by deployment policy to increase the weight of temporal
          factors for identities that self-declare reduced mobility,
          provided that the overall security model remains sound.
        </t>
      </section>
    </section>

    <!-- ============================================================ -->
    <section anchor="iana" numbered="true" toc="include">
      <name>IANA Considerations</name>
      <t>
        This document has no IANA actions at this time.  Future
        revisions may request:
      </t>
      <ul>
        <li>CBOR tag assignments for breadcrumb, epoch, PoH
          Certificate, and Active Verification message structures.</li>
        <li>A media type registration for application/trip+cbor.</li>
        <li>An entry in a TRIP Verification Mode registry
          (passive, active).</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 initials="S." surname="Bradner" fullname="S. Bradner"/>
            <date year="1997" month="March"/>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>

        <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author initials="B." surname="Leiba" fullname="B. Leiba"/>
            <date year="2017" month="May"/>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>

        <reference anchor="RFC8032" target="https://www.rfc-editor.org/info/rfc8032">
          <front>
            <title>Edwards-Curve Digital Signature Algorithm (EdDSA)</title>
            <author initials="S." surname="Josefsson" fullname="S. Josefsson"/>
            <author initials="I." surname="Liusvaara" fullname="I. Liusvaara"/>
            <date year="2017" month="January"/>
          </front>
          <seriesInfo name="RFC" value="8032"/>
          <seriesInfo name="DOI" value="10.17487/RFC8032"/>
        </reference>

        <reference anchor="RFC8949" target="https://www.rfc-editor.org/info/rfc8949">
          <front>
            <title>Concise Binary Object Representation (CBOR)</title>
            <author initials="C." surname="Bormann" fullname="C. Bormann"/>
            <author initials="P." surname="Hoffman" fullname="P. Hoffman"/>
            <date year="2020" month="December"/>
          </front>
          <seriesInfo name="STD" value="94"/>
          <seriesInfo name="RFC" value="8949"/>
          <seriesInfo name="DOI" value="10.17487/RFC8949"/>
        </reference>

        <reference anchor="RFC9334" target="https://www.rfc-editor.org/info/rfc9334">
          <front>
            <title>Remote ATtestation procedureS (RATS) Architecture</title>
            <author initials="H." surname="Birkholz" fullname="H. Birkholz"/>
            <author initials="D." surname="Thaler" fullname="D. Thaler"/>
            <author initials="M." surname="Richardson" fullname="M. Richardson"/>
            <author initials="N." surname="Smith" fullname="N. Smith"/>
            <author initials="W." surname="Pan" fullname="W. Pan"/>
            <date year="2023" month="January"/>
          </front>
          <seriesInfo name="RFC" value="9334"/>
          <seriesInfo name="DOI" value="10.17487/RFC9334"/>
        </reference>
      </references>

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

        <reference anchor="H3" target="https://h3geo.org/">
          <front>
            <title>H3: Uber's Hexagonal Hierarchical Spatial Index</title>
            <author>
              <organization>Uber Technologies</organization>
            </author>
            <date year="2023"/>
          </front>
        </reference>

        <reference anchor="PARISI-NOBEL" target="https://www.nobelprize.org/prizes/physics/2021/parisi/facts/">
          <front>
            <title>Nobel Prize in Physics 2021: Giorgio Parisi</title>
            <author>
              <organization>The Nobel Foundation</organization>
            </author>
            <date year="2021"/>
          </front>
        </reference>

        <reference anchor="CAVAGNA-STARLINGS">
          <front>
            <title>Scale-free correlations in starling flocks</title>
            <author initials="A." surname="Cavagna" fullname="A. Cavagna"/>
            <author initials="A." surname="Cimarelli" fullname="A. Cimarelli"/>
            <author initials="I." surname="Giardina" fullname="I. Giardina"/>
            <author initials="G." surname="Parisi" fullname="G. Parisi"/>
            <author initials="R." surname="Santagati" fullname="R. Santagati"/>
            <author initials="F." surname="Stefanini" fullname="F. Stefanini"/>
            <author initials="M." surname="Viale" fullname="M. Viale"/>
            <date year="2010"/>
          </front>
          <seriesInfo name="DOI" value="10.1073/pnas.1005766107"/>
          <refcontent>Proceedings of the National Academy of Sciences, 107(26), 11865-11870</refcontent>
        </reference>

        <reference anchor="BALLERINI-TOPOLOGICAL">
          <front>
            <title>Interaction ruling animal collective behavior depends on topological rather than metric distance</title>
            <author initials="M." surname="Ballerini" fullname="M. Ballerini"/>
            <author initials="N." surname="Cabibbo" fullname="N. Cabibbo"/>
            <author initials="R." surname="Candelier" fullname="R. Candelier"/>
            <author initials="A." surname="Cavagna" fullname="A. Cavagna"/>
            <author initials="E." surname="Cisbani" fullname="E. Cisbani"/>
            <author initials="I." surname="Giardina" fullname="I. Giardina"/>
            <author initials="V." surname="Lecomte" fullname="V. Lecomte"/>
            <author initials="A." surname="Orlandi" fullname="A. Orlandi"/>
            <author initials="G." surname="Parisi" fullname="G. Parisi"/>
            <author initials="A." surname="Procaccini" fullname="A. Procaccini"/>
            <author initials="M." surname="Viale" fullname="M. Viale"/>
            <author initials="V." surname="Zdravkovic" fullname="V. Zdravkovic"/>
            <date year="2008"/>
          </front>
          <seriesInfo name="DOI" value="10.1073/pnas.0711437105"/>
          <refcontent>Proceedings of the National Academy of Sciences, 105(4), 1232-1237</refcontent>
        </reference>

        <reference anchor="BARABASI-MOBILITY">
          <front>
            <title>Understanding individual human mobility patterns</title>
            <author initials="M.C." surname="Gonzalez" fullname="M.C. Gonzalez"/>
            <author initials="C.A." surname="Hidalgo" fullname="C.A. Hidalgo"/>
            <author initials="A.-L." surname="Barabasi" fullname="A.-L. Barabasi"/>
            <date year="2008"/>
          </front>
          <seriesInfo name="DOI" value="10.1038/nature06958"/>
          <refcontent>Nature, 453, 779-782</refcontent>
        </reference>

        <reference anchor="SONG-LIMITS">
          <front>
            <title>Limits of Predictability in Human Mobility</title>
            <author initials="C." surname="Song" fullname="C. Song"/>
            <author initials="Z." surname="Qu" fullname="Z. Qu"/>
            <author initials="N." surname="Blumm" fullname="N. Blumm"/>
            <author initials="A.-L." surname="Barabasi" fullname="A.-L. Barabasi"/>
            <date year="2010"/>
          </front>
          <seriesInfo name="DOI" value="10.1126/science.1177170"/>
          <refcontent>Science, 327(5968), 1018-1021</refcontent>
        </reference>

        <reference anchor="RFC8610" target="https://www.rfc-editor.org/info/rfc8610">
          <front>
            <title>Concise Data Definition Language (CDDL): A Notational Convention to Express Concise Binary Object Representation (CBOR) and JSON Data Structures</title>
            <author initials="H." surname="Birkholz" fullname="H. Birkholz"/>
            <author initials="C." surname="Vigano" fullname="C. Vigano"/>
            <author initials="C." surname="Bormann" fullname="C. Bormann"/>
            <date year="2019" month="June"/>
          </front>
          <seriesInfo name="RFC" value="8610"/>
          <seriesInfo name="DOI" value="10.17487/RFC8610"/>
        </reference>

        <reference anchor="ZHANG-REVIEW">
          <front>
            <title>Review comments on draft-ayerbe-trip-protocol-01</title>
            <author initials="J." surname="Zhang" fullname="Jun Zhang"/>
            <date year="2026" month="February"/>
          </front>
          <refcontent>IETF mailing list post</refcontent>
        </reference>

      </references>
    </references>

    <!-- ============================================================ -->
    <section anchor="acknowledgements" numbered="false" toc="include">
      <name>Acknowledgements</name>
      <t>
        The TRIP protocol builds upon foundational work in
        cryptographic identity systems, geospatial indexing,
        statistical physics, and network science.  The author
        thanks the contributors to the H3 geospatial system, the
        Ed25519 specification authors, and the broader IETF
        community for establishing the standards that TRIP builds
        upon.  The Criticality Engine framework is inspired by
        the work of Giorgio Parisi on scale-free correlations in
        biological systems and Albert-Laszlo Barabasi on the
        fundamental limits of human mobility.
      </t>
      <t>
        The author thanks Muhammad Usama Sardar for detailed review of -01
        that identified the need for explicit RATS role mapping,
        attestation-result replay protection, and privacy model
        corrections.  These contributions substantially improved
        the rigor of this specification.  The author also thanks
        Jun Zhang for raising critical questions about
        accessibility and the applicability of mobility models
        to users with limited physical mobility, leading to
        the Accessibility and Low-Mobility Users section.
      </t>
    </section>

  </back>
</rfc>
