Skip to content

Repository files navigation

Provenance: Layer 1 Content Provenance Registry

prov

Sign and timestamp source code, PDFs, documents, and media through a dual-anchor cryptographic registry with full C2PA interoperability. 27 file formats verified working. Real round-trips through actual c2pa.Reader validation, not mocks.

Layer 1 of a five-layer AI royalty and attribution system. This is the shipping part.

What It Does

Your work gets signed into a cryptographic manifest and timestamped through two independent, non-colluding authorities:

  • RFC 3161: Traditional timestamp authority (immediate confirmation)
  • Bitcoin: OpenTimestamps blockchain anchor (permanent settlement)

No single point of failure. No central gatekeeper. Verifiable record of what existed and when.

Supported Formats (v1.1.3)

Images (10)

PNG, JPEG, WebP, TIFF, HEIC, HEIF, AVIF, GIF, SVG, DNG

Audio (4)

WAV, MP3, M4A, MPA

Video (4)

MP4, MOV, M4V, AVI

Documents (5)

PDF, EPUB, DOCX, ODT, OXPS

Fonts (3)

OTF, TTF, SFNT

Source Code & Text (7)

.py, .js, .yaml, .sql, .md, HTML, HTM

All formats have passed real sign+validate round-trips through the c2pa.Reader library. See FINDINGS.md for detailed test results on every format.

Installation

NPM (Recommended)

npm install -g @vektormemory/prov
prov --help

From Source

git clone https://github.com/Vektor-Memory/Provenance.git
cd Provenance
npm install
# Also install Python dependencies
pip install -r requirements.txt

Usage

Sign a File

# Generate signing key and CSR
prov c2pa:csr "Your Name" your-email@example.com

# Sign with your key
prov c2pa:sign myfile.png mykey.pem myfile_signed.png

# Sign source code
prov c2pa:sign-text code.py mykey.pem code_signed.py

# Sign PDF
prov c2pa:sign-pdf document.pdf mykey.pem document_signed.pdf

# Sign documents (EPUB, DOCX, ODT, OXPS)
prov c2pa:sign-zip ebook.epub mykey.pem ebook_signed.epub

# Sign fonts
prov c2pa:sign-font font.otf mykey.pem font_signed.otf

Verify a Signed File

# The manifest is embedded in the file
# Use any C2PA-compatible reader (e.g., Encypher Verify)
# Or use c2pa-python directly

python3 -c "
from c2pa import Reader
with open('myfile_signed.png', 'rb') as f:
    reader = Reader()
    manifest = reader.read(stream=f)
    print(manifest)
"

How It Works

  1. Your file is hashed and loaded into a cryptographic manifest
  2. The manifest includes:
    • Your digital signature (proves you created/approved this version)
    • Dual timestamp anchors (RFC 3161 + Bitcoin)
    • C2PA standard assertions (signer identity, timestamp, actions)
  3. The manifest is embedded in the file (binary formats) or appended (text formats)
  4. Anyone can verify the manifest without contacting Vektor or trusting us

Architecture

Dual-Anchor Design

The dual-anchor pattern prevents any single party from controlling the timestamp registry:

YOUR FILE
    |
    v
[RFC 3161] (FreeTSA) ← Fast, traditional authority
    |                  (minutes to verify)
    +-- Dual-Anchor Manifest
    |
[Bitcoin] (OpenTimestamps) ← Immutable, decentralized
                            (hours to confirm)
    |
    v
VERIFIABLE RECORD

If one authority is compromised or coerced, the other anchor proves the timestamp is fraudulent. Backdating a claim would require controlling both systems simultaneously.

Custody of Signing Keys

The system supports Shamir's Secret Sharing for identity-vault keys, so key compromise doesn't automatically compromise the registry. Verification of this is implemented in layer1_shamir_custody.py.

Design Documents

  • LAYER1_CUSTODY_DESIGN_NOTE.md - Threshold custody and TSA tie-break policy for the dual-anchor mechanism
  • MVP_BUILD_PLAN.md - Full implementation roadmap and phase breakdown

Testing

All 27 formats have passing smoke tests. Run them yourself:

python3 smoke_test_c2pa_bridge_multiformat.py       # Binary formats (PNG, JPEG, MP4, etc)
python3 smoke_test_c2pa_text_bridge_multiformat.py  # Source code (.py, .js, .md, etc)
python3 smoke_test_pdf_bridge.py                    # PDF-specific tests
python3 smoke_test_zip_bridge_multiformat.py        # Document containers (EPUB, DOCX, etc)
python3 smoke_test_font_bridge.py                   # Font formats (OTF, TTF, SFNT)

See FINDINGS.md for the complete test matrix, every bug found and fixed, and technical details on each format implementation.

Standards Compliance

  • C2PA 2.4 - Full specification compliance for manifest generation and embedding
  • RFC 3161 - Traditional timestamp authority protocol
  • OpenTimestamps - Bitcoin blockchain timestamping
  • ISO 32000 - PDF embedded-file mechanism (Appendix 7.11.3)
  • EPUB Open Container Format - Spec A.6 ZIP-based manifest embedding
  • OpenType/TrueType SFNT - OpenFontFormat proposal #56 for C2PA tables

Every implementation was verified against the actual specification, not guessed from memory.

What This Doesn't Solve

  • Attribution: We timestamp what exists, but don't determine who created it (depends on your identity system)
  • Training data attribution: We can track staleness of scores over time, but can't generate attribution scores ourselves (separate research problem)
  • Governance: We provide the technical layer; policy questions (fair use, consent, copyright) remain unsolved
  • Enforcement: This is a proof system, not a legal contract; enforcement is a business/legal problem

Layers 2-5 (In Development)

This repository contains simulations of the four additional layers (streaming safety guards, attribution staleness decay, anti-Sybil governance, escrow and economics). They are not production systems yet. See the root README for more.

Why We're Shipping This

Because Layer 1 is real and works. Twenty-seven formats tested. Every bug found and fixed. Every test is reproducible. We'd rather ship the part that's done than wait for the rest of the system.

License

MIT

Contributing

Report bugs, suggest improvements, or submit pull requests at https://github.com/Vektor-Memory/Provenance/issues.

For security issues, see SECURITY.md.

About Vektor Memory

We build local-first, privacy-preserving persistent memory infrastructure for AI agents. Provenance is one layer of a larger system for giving AI agents reliable, verifiable context across time.

Learn more at https://vektormemory.com


Article: Read about the full design, the red-team testing, and what breaks in the other layers: https://medium.com/@vektormemory/provenance-what-it-actually-takes-to-prove-creator-data-dignity-306417f53f14?postPublishedType=repub

FINDINGS.md (65 KB): Complete test results for all 27 formats, every vulnerability found in Layers 2-5, technical depth on what works and what doesn't.

About

Provenance - Built by Vektor Memory - A wizard tool to prove what your code looked like, and when. Cryptographic and verifiable, works on any codebase.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages