<?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-01"
     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-01"/>

    <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="08"/>

    <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>

    <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>
        This revision introduces a formal trust-scoring framework
        grounded in statistical physics.  A Criticality Engine
        evaluates the Power Spectral Density (PSD) of movement
        trajectories for the 1/f signature characteristic of
        biological Self-Organized Criticality (SOC).  A mobility
        model based on truncated Levy flights and Markov anchor
        transition matrices enforces known constraints of human
        movement.  A six-component Hamiltonian energy function
        detects anomalies in real time by combining spatial,
        temporal, kinetic, flock-alignment, contextual, and
        structural analysis of each breadcrumb against the
        identity's learned behavioral profile.
      </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 of this specification adds a rigorous
        mathematical framework for distinguishing biological movement
        from synthetic trajectories.  Drawing on Giorgio Parisi's
        Nobel Prize-winning work on scale-free correlations in
        complex systems <xref target="PARISI-NOBEL"/> and
        Albert-Laszlo Barabasi's research on the fundamental limits
        of human mobility <xref target="BARABASI-MOBILITY"/>, the
        protocol now includes a Criticality Engine that evaluates
        whether a trajectory exhibits the statistical fingerprint of
        a living organism operating at the edge of criticality.
      </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>
        <dl>
          <dt>Breadcrumb</dt>
          <dd>
            A single, signed attestation of spatiotemporal presence.
            The atomic unit of the TRIP protocol.
          </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).
          </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 containing only statistical
            exponents derived from the trajectory, with no raw
            location data.
          </dd>
        </dl>
      </section>

      <section anchor="changes-from-00" numbered="true" toc="include">
        <name>Changes from -00</name>
        <t>
          This section summarizes the substantive changes from
          draft-ayerbe-trip-protocol-00:
        </t>
        <ul>
          <li>
            Added the Criticality Engine (<xref target="criticality"/>)
            with PSD alpha-exponent analysis for biological movement
            detection.
          </li>
          <li>
            Added mobility statistics framework
            (<xref target="mobility"/>) based on truncated Levy
            flights and Markov anchor transition matrices.
          </li>
          <li>
            Defined the six-component Hamiltonian energy function
            (<xref target="hamiltonian"/>) for real-time anomaly
            detection.
          </li>
          <li>
            Added Proof-of-Humanity Certificate specification
            (<xref target="poh-certificate"/>).
          </li>
          <li>
            Expanded Security Considerations with analysis of
            GPS replay, synthetic walk, and emulator injection
            attacks.
          </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-9)</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 9:
        </t>
        <table anchor="h3-resolutions">
          <name>H3 Resolution Parameters</name>
          <thead>
            <tr><th>Resolution</th><th>Edge Length</th><th>Use Case</th></tr>
          </thead>
          <tbody>
            <tr><td>7</td><td>~1.22 km</td><td>Rural / low-density</td></tr>
            <tr><td>8</td><td>~0.46 km</td><td>Default / suburban</td></tr>
            <tr><td>9</td><td>~0.17 km</td><td>Urban / high-density</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.
        </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 breadcrumb fields at keys 0 through 7 are serialized
          as a canonical JSON object (keys sorted lexicographically).
          The Ed25519 signature <xref target="RFC8032"/> is computed
          over the UTF-8 encoding of this JSON string and stored
          at key 8.
        </t>
      </section>

      <section anchor="block-hash" numbered="true" toc="include">
        <name>Block Hash and Chaining</name>
        <t>
          The block hash is SHA-256 over the concatenation of the
          canonical JSON representation and the hex-encoded
          signature, separated by a colon character.  Each
          breadcrumb at index &gt; 0 MUST carry the block hash of
          its immediate predecessor in field 6, forming an
          append-only hash chain.
        </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>

    <!-- ============================================================ -->
    <!-- NEW IN -01: CRITICALITY ENGINE -->
    <!-- ============================================================ -->
    <section anchor="criticality" numbered="true" toc="include">
      <name>The Criticality Engine</name>
      <t>
        The Criticality Engine is the core analytical component
        introduced in this revision.  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 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"/>.  Human mobility displays the same
        critical-state dynamics: movement is neither fully random
        nor fully deterministic, but exists at a characteristic
        point in between.
      </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>

    <!-- ============================================================ -->
    <!-- NEW IN -01: MOBILITY STATISTICS -->
    <!-- ============================================================ -->
    <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>

    <!-- ============================================================ -->
    <!-- NEW IN -01: THE HAMILTONIAN -->
    <!-- ============================================================ -->
    <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>

    <!-- ============================================================ -->
    <!-- NEW IN -01: PROOF-OF-HUMANITY CERTIFICATE -->
    <!-- ============================================================ -->
    <section anchor="poh-certificate" numbered="true" toc="include">
      <name>Proof-of-Humanity Certificate</name>
      <t>
        A PoH Certificate is a compact, privacy-preserving
        attestation 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 (64)</td><td>Ed25519 signature</td></tr>
        </tbody>
      </table>
      <t>
        A relying party receiving a PoH Certificate can verify:
      </t>
      <ol>
        <li>The signature is valid for the claimed public key.</li>
        <li>The alpha exponent falls within [0.30, 0.80].</li>
        <li>The criticality confidence exceeds a policy threshold.</li>
        <li>The trust score meets application requirements.</li>
        <li>The certificate has not expired.</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>

    <!-- ============================================================ -->
    <section anchor="rats-mapping" numbered="true" toc="include">
      <name>Mapping to RATS Architecture</name>
      <t>
        TRIP maps naturally to the RATS architecture defined in
        <xref target="RFC9334"/>:
      </t>
      <table anchor="rats-roles">
        <name>TRIP-to-RATS Role Mapping</name>
        <thead>
          <tr><th>RATS Role</th><th>TRIP Component</th></tr>
        </thead>
        <tbody>
          <tr>
            <td>Attester</td>
            <td>The TRIP-enabled device producing breadcrumbs</td>
          </tr>
          <tr>
            <td>Evidence</td>
            <td>Individual breadcrumbs and epoch records</td>
          </tr>
          <tr>
            <td>Verifier</td>
            <td>The Criticality Engine evaluating trajectory
              statistics and Hamiltonian energy</td>
          </tr>
          <tr>
            <td>Attestation Results</td>
            <td>The PoH Certificate and trust score</td>
          </tr>
          <tr>
            <td>Relying Party</td>
            <td>Any service accepting PoH Certificates as
              proof of physical-world presence</td>
          </tr>
        </tbody>
      </table>
      <t>
        TRIP breadcrumbs serve as Evidence in the RATS sense:
        claims produced by an attester (the device) about an
        attested environment (the physical world), encoded in
        CBOR, signed with Ed25519, and structured for evaluation
        by a verifier.
      </t>
    </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="privacy-location" numbered="true" toc="include">
        <name>Location Privacy</name>
        <t>
          TRIP provides location privacy through multiple layers:
        </t>
        <ul>
          <li>H3 quantization reduces GPS precision to cell-level
            granularity (170m to 1.2km depending on resolution).</li>
          <li>Trajectory data is stored and analyzed locally on the
            device.  Raw breadcrumbs need never leave the device.</li>
          <li>The PoH Certificate contains only statistical exponents
            (alpha, beta, kappa), revealing nothing about specific
            locations visited.</li>
          <li>Context digests are one-way hashes; the underlying
            Wi-Fi BSSIDs, tower IDs, and IMU vectors cannot be
            recovered.</li>
        </ul>
      </section>

      <section anchor="privacy-density" numbered="true" toc="include">
        <name>Population Density Considerations</name>
        <t>
          H3 resolution selection SHOULD account for population
          density.  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>

    <!-- ============================================================ -->
    <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 CBOR tag assignments for breadcrumb,
        epoch, and PoH Certificate structures.
      </t>
    </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>
      </references>

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

        <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>

        <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>

      </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>
    </section>

  </back>
</rfc>
