<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc [
<!ENTITY nbsp "&#160;">
]>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" category="info" docName="draft-condrey-rats-pop-aggregation-00" ipr="trust200902" submissionType="independent" xml:lang="en" version="3">

  <front>
    <title abbrev="PoP VDF Aggregation">Proof of Process: VDF Proof Aggregation Extension</title>

    <seriesInfo name="Internet-Draft" value="draft-condrey-rats-pop-aggregation-00"/>

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

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

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

    <keyword>VDF</keyword>
    <keyword>aggregation</keyword>
    <keyword>SNARK</keyword>
    <keyword>Merkle</keyword>

    <abstract>
      <t>
        This document defines optional mechanisms for aggregating
        Verifiable Delay Function (VDF) proofs in Proof of Process
        Evidence packets. Aggregation enables O(1) or O(log n)
        verification of entire checkpoint chains that would otherwise
        require O(n) sequential VDF recomputation. This extension
        supports Merkle tree aggregation and SNARK-based proof
        compression for high-volume verification scenarios.
      </t>
    </abstract>
  </front>

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

      <t>
        This document defines optional mechanisms for aggregating VDF proofs
        to reduce verification cost. Aggregation enables O(1) or O(log n)
        verification of entire checkpoint chains that would otherwise
        require O(n) sequential VDF recomputation.
      </t>

      <t>
        This extension is defined as a companion to the main Proof of
        Process specification <xref target="I-D.condrey-rats-pop"/>.
      </t>

      <section anchor="conventions">
        <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>

    <section anchor="motivation">
      <name>Motivation</name>

      <t>
        The iterated-sha256 VDF provides strong temporal guarantees but
        requires verifiers to recompute the entire hash chain. For a
        document with 1000 checkpoints, each with 10 million iterations,
        full verification requires 10 billion hash operations.
      </t>

      <t>
        While this verification cost is acceptable for high-stakes
        scenarios, it creates barriers to adoption:
      </t>

      <ul>
        <li>
          Publishers processing thousands of submissions cannot afford
          O(n) verification per document.
        </li>
        <li>
          Mobile devices and web browsers may lack computational resources
          for full verification.
        </li>
        <li>
          Real-time verification scenarios require sub-second response.
        </li>
      </ul>

      <t>
        VDF aggregation addresses these challenges by providing
        efficiently-verifiable proofs that attest to the correctness
        of the underlying VDF chain.
      </t>
    </section>

    <section anchor="aggregation-structure">
      <name>Aggregation Proof Structure</name>

      <t>
        The VDF aggregate proof is an optional extension to the vdf-proof
        structure, identified by integer key 9.
      </t>

      <sourcecode type="cddl"><![CDATA[
; VDF aggregate proof extension
; Key 9 in vdf-proof (optional)
vdf-aggregate-proof = {
    1 => uint,                       ; checkpoints-covered
    2 => aggregation-method,         ; method
    3 => bstr,                       ; aggregate-proof
    ? 4 => aggregate-metadata,       ; metadata
}

aggregation-method = &(
    merkle-vdf-tree: 1,              ; Merkle tree over VDF outputs
    snark-groth16: 16,               ; Groth16 SNARK proof
    snark-plonk: 17,                 ; PLONK SNARK proof
    stark: 18,                       ; STARK proof
    recursive-snark: 19,             ; Recursive SNARK composition
)

aggregate-metadata = {
    ? 1 => tstr,                     ; prover-version
    ? 2 => uint,                     ; proof-generation-time-ms
    ? 3 => uint,                     ; proof-size-bytes
    ? 4 => tstr,                     ; verification-key-id
    ? 5 => bstr,                     ; verification-key
}
]]></sourcecode>
    </section>

    <section anchor="merkle-aggregation">
      <name>Merkle VDF Tree Aggregation</name>

      <t>
        The simplest aggregation method constructs a Merkle tree over
        VDF inputs and outputs, enabling selective verification with
        O(log n) proof size.
      </t>

      <section anchor="merkle-construction">
        <name>Tree Construction</name>

        <artwork><![CDATA[
For N checkpoints with VDF proofs:

Leaf{i} = H(VDF_input{i} || VDF_output{i} || iterations{i})

Internal nodes computed as standard Merkle tree:
  Node{parent} = H(Node{left} || Node{right})

Root = final tree root

Aggregate proof contains:
  - Root hash
  - Total iterations across all checkpoints
  - Optional: Merkle proofs for sampled checkpoints
]]></artwork>
      </section>

      <section anchor="merkle-verification">
        <name>Verification Procedure</name>

        <t>
          Merkle aggregation supports three verification modes:
        </t>

        <dl>
          <dt>Full verification:</dt>
          <dd>
            Recompute all VDFs and verify Merkle root matches. O(n) time.
          </dd>

          <dt>Sampled verification:</dt>
          <dd>
            Randomly select k checkpoints, verify their VDFs, and verify
            Merkle inclusion proofs. O(k * VDF_iterations/n + k * log n).
            Provides probabilistic assurance.
          </dd>

          <dt>Root-only verification:</dt>
          <dd>
            Trust the prover, verify only the Merkle root signature.
            O(1) time. Requires trusted aggregation service.
          </dd>
        </dl>

        <t>
          The verification mode SHOULD be documented in the Attestation
          Result.
        </t>
      </section>

      <section anchor="merkle-cddl">
        <name>Merkle Aggregate CDDL</name>

        <sourcecode type="cddl"><![CDATA[
; Merkle VDF tree proof structure
merkle-vdf-proof = {
    1 => hash-value,                 ; root-hash
    2 => uint,                       ; total-iterations
    3 => uint,                       ; checkpoint-count
    ? 4 => [+ merkle-sample],        ; sampled-proofs
    ? 5 => cose-signature,           ; aggregator-signature
}

merkle-sample = {
    1 => uint,                       ; checkpoint-index
    2 => [+ hash-value],             ; merkle-path
    3 => bool,                       ; vdf-verified (by aggregator)
}
]]></sourcecode>
      </section>
    </section>

    <section anchor="snark-aggregation">
      <name>SNARK-Based Aggregation</name>

      <t>
        For constant-time verification, SNARK (Succinct Non-interactive
        ARgument of Knowledge) proofs can attest to the correctness of
        the entire VDF chain.
      </t>

      <section anchor="snark-circuit">
        <name>Circuit Definition</name>

        <t>
          The SNARK circuit proves the following statement:
        </t>

        <artwork><![CDATA[
Public inputs:
  - VDF_input{0} (genesis input)
  - VDF_output{N-1} (final output)
  - total_iterations
  - checkpoint_count

Private inputs:
  - All intermediate VDF_input{i} and VDF_output{i}
  - All iteration counts per checkpoint

Circuit constraints:
  For each checkpoint i in 0..N-1:
    (1) VDF_output{i} = SHA256^iterations{i}(VDF_input{i})
    (2) VDF_input{i+1} = H(VDF_output{i} || content-hash{i+1} || ...)
    (3) sum(iterations{i}) = total_iterations
]]></artwork>

        <t>
          A valid SNARK proof demonstrates that there exist valid
          intermediate values satisfying all constraints, without
          revealing those values or requiring recomputation.
        </t>
      </section>

      <section anchor="snark-verification">
        <name>SNARK Verification</name>

        <t>
          SNARK verification is constant-time regardless of checkpoint
          count:
        </t>

        <sourcecode type="pseudocode"><![CDATA[
def verify_snark_aggregate(
    proof: bytes,
    vdf_input_genesis: bytes,
    vdf_output_final: bytes,
    total_iterations: int,
    checkpoint_count: int,
    verification_key: bytes
) -> bool:
    public_inputs = encode_public_inputs(
        vdf_input_genesis,
        vdf_output_final,
        total_iterations,
        checkpoint_count
    )
    return snark_verify(verification_key, public_inputs, proof)
]]></sourcecode>

        <t>
          Verification complexity: O(1) for Groth16, O(log n) for PLONK
          with logarithmic verification.
        </t>
      </section>

      <section anchor="snark-trust">
        <name>Trust Assumptions</name>

        <t>
          SNARK-based aggregation introduces additional trust assumptions:
        </t>

        <ul>
          <li>
            <strong>Trusted setup (Groth16):</strong> The verification key
            MUST be generated through a secure multi-party computation.
            A compromised setup allows forged proofs.
          </li>
          <li>
            <strong>Cryptographic assumptions:</strong> SNARK security
            relies on hardness of discrete logarithm and pairing
            assumptions.
          </li>
          <li>
            <strong>Implementation correctness:</strong> The circuit MUST
            correctly encode the VDF verification constraints.
          </li>
        </ul>

        <t>
          For maximum assurance, implementations SHOULD support both
          SNARK verification (for efficiency) and full VDF recomputation
          (for trust-minimized verification).
        </t>
      </section>

      <section anchor="snark-cddl">
        <name>SNARK Aggregate CDDL</name>

        <sourcecode type="cddl"><![CDATA[
; SNARK proof structure
snark-vdf-proof = {
    1 => snark-scheme,               ; scheme
    2 => bstr,                       ; proof-bytes
    3 => bstr,                       ; verification-key-id
    4 => [+ bstr],                   ; public-inputs (encoded)
    ? 5 => tstr,                     ; circuit-version
    ? 6 => bstr,                     ; setup-ceremony-hash
}

snark-scheme = &(
    groth16-bn254: 1,                ; Groth16 on BN254 curve
    groth16-bls12-381: 2,            ; Groth16 on BLS12-381
    plonk-bn254: 3,                  ; PLONK on BN254
    plonk-bls12-381: 4,              ; PLONK on BLS12-381
)
]]></sourcecode>
      </section>
    </section>

    <section anchor="verification-modes">
      <name>Verification Mode Selection</name>

      <t>
        Verifiers SHOULD select verification modes based on the
        assurance level required by the Relying Party:
      </t>

      <table anchor="tbl-verification-modes">
        <name>Verification Mode Comparison</name>
        <thead>
          <tr>
            <th>Mode</th>
            <th>Complexity</th>
            <th>Trust Required</th>
            <th>Use Case</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>Full VDF recomputation</td>
            <td>O(n * iterations)</td>
            <td>None</td>
            <td>Litigation, forensics</td>
          </tr>
          <tr>
            <td>Merkle + full sample</td>
            <td>O(k * iterations/n)</td>
            <td>Statistical</td>
            <td>Academic review</td>
          </tr>
          <tr>
            <td>SNARK verification</td>
            <td>O(1)</td>
            <td>Setup ceremony</td>
            <td>High-volume processing</td>
          </tr>
          <tr>
            <td>Signed aggregate only</td>
            <td>O(1)</td>
            <td>Aggregator</td>
            <td>Real-time display</td>
          </tr>
        </tbody>
      </table>

      <t>
        Attestation Results MUST document which verification mode was
        used and any associated trust assumptions.
      </t>
    </section>

    <section anchor="example">
      <name>Aggregation Proof Example</name>

      <sourcecode type="cbor-diag"><![CDATA[
vdf-proof = {
  1: 1,
  2: {1: 1, 2: 8500000},
  3: h'genesis-input...',
  4: h'final-output...',
  5: h'',
  6: 3600.0,
  7: 30600000000,
  8: { ... },

  9: {
    1: 150,
    2: 1,
    3: h'merkle-proof-bytes...',
    4: {
      1: "witnessd-aggregator-1.0",
      2: 45000,
      3: 2048,
    }
  }
}
]]></sourcecode>
    </section>

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

      <t>
        VDF aggregation introduces security trade-offs:
      </t>

      <ul>
        <li>
          <strong>Merkle aggregation:</strong> Security equivalent to
          underlying hash function. No additional cryptographic
          assumptions. Sampled verification provides probabilistic
          (not cryptographic) assurance proportional to sample size.
        </li>
        <li>
          <strong>SNARK aggregation:</strong> Security depends on
          discrete logarithm hardness in pairing-friendly groups.
          Groth16 requires trusted setup; PLONK uses universal setup.
          Post-quantum security is NOT provided.
        </li>
        <li>
          <strong>Aggregator trust:</strong> Signed aggregates require
          trust in the aggregation service. Verifiers SHOULD verify
          aggregator identity through established PKI.
        </li>
      </ul>

      <t>
        Full security considerations for the Proof of Process format are
        specified in <xref target="I-D.condrey-rats-pop"/>.
      </t>
    </section>

    <section anchor="iana">
      <name>IANA Considerations</name>
      <t>
        This document has no IANA actions. The aggregation extension
        uses key 9 within the vdf-proof structure as defined in the
        main architecture document.
      </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 fullname="S. Bradner" initials="S." surname="Bradner"/>
            <date month="March" year="1997"/>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
        </reference>

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

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

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