Skip to content

feat/1019-signed-evidence-bundles-transparency-log - #1233

Merged
Mosas2000 merged 1 commit into
StellaBridge:mainfrom
nasarajoe:feat/1019-signed-evidence-bundles-transparency-log
Aug 29, 2026
Merged

feat/1019-signed-evidence-bundles-transparency-log#1233
Mosas2000 merged 1 commit into
StellaBridge:mainfrom
nasarajoe:feat/1019-signed-evidence-bundles-transparency-log

Conversation

@nasarajoe

Copy link
Copy Markdown
Contributor

Summary

Implements signed, portable evidence bundles and an append-only transparency
log so a verifier can prove exactly which raw observations, code/config
versions, decoder versions, query parameters and chain-finality metadata
produced a report or export — without trusting the application database.

Closes #1019

What's included

Pure verification core — backend/src/services/transparencyLog/

No DB or network imports, so the exact same code backs the offline verifier.

  • canonical.ts — deterministic JSON (RFC 8785 subset)
  • merkle.ts — RFC 6962 Merkle tree: root, inclusion proofs, consistency
    proofs
    , and tree-free verification (ported from transparency-dev/merkle)
  • ed25519.ts — Ed25519 over raw 32-byte hex keys
  • evidenceBundle.ts — canonical core builder, evidence-root hashing,
    partial disclosure (discloseSubset), and verifyEvidenceBundle() which
    recomputes every commitment and checks the signature + transparency proof

Database service — backend/src/services/evidenceBundle.service.ts

  • Rotating Ed25519 signer keys; registration / rotation / revocation each
    appended to the log
    so key lifecycle is independently auditable
  • Append-only log serialized with pg_advisory_xact_lock, publishing a
    signed tree head for every tree size (signed by a separate log key so
    tree-head trust and authorship trust are distinct)
  • Assembles a self-contained bundle document: canonical core + disclosed
    sections (with salts) + inclusion proof + signed tree head + signer
    key-registration proof
  • Inclusion and consistency proof serving

Schema — 20260829100000_signed_evidence_bundles.ts

evidence_bundle_signing_keys, transparency_log_entries,
transparency_log_checkpoints, evidence_bundles.

REST API — /api/v1/evidence/*

Method Path Purpose
POST /bundles create a signed bundle for a report/export
GET /bundles / /bundles/:id list / fetch full bundle document
GET /bundles/:id/disclose partial-disclosure view (?sections=&outputs=)
GET /bundles/:id/verify server-side offline verification report
POST /bundles/verify stateless verification of a supplied document
GET /log / /log/checkpoint log entries / latest signed tree head
GET /log/proof/inclusion / /log/proof/consistency proofs
GET /log/keys, POST /log/keys/rotate, POST /log/keys/:keyId/revoke signer key lifecycle

Standalone offline verifier — backend/scripts/verify-evidence-bundle.mjs

Node stdlib only. Prints a PASS/FAIL line per check; exit 0 = valid, 1 = invalid.

curl -s "$API/api/v1/evidence/bundles/eb_abc123" | node backend/scripts/verify-evidence-bundle.mjs -

@Mosas2000
Mosas2000 merged commit dd70f9a into StellaBridge:main Aug 29, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Create Signed Evidence Bundles and Append-Only Transparency Log

2 participants