██████╗███████╗██████╗ ████████╗██╗██╗ ██╗██╗ ██╗
██╔════╝██╔════╝██╔══██╗╚══██╔══╝██║██║ ██║██║ ██║
██║ █████╗ ██████╔╝ ██║ ██║╚██╗ ██╔╝██║ ██║
██║ ██╔══╝ ██╔══██╗ ██║ ██║ ╚████╔╝ ██║ ██║
╚██████╗███████╗██║ ██║ ██║ ██║ ╚██╔╝ ╚██████╔╝
╚═════╝╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝
Quantum-resistant trust infrastructure for AI-generated content.
Sign. Verify. Audit. Before Q-Day arrives.
Certivu operated as a live product from June to August 2026 and is now shut down. The hosted service — certivu.ai, api.certivu.ai, the dashboard, docs, CDN registries, and the published SDKs — is offline. Nothing in this repository points at working infrastructure anymore; it is published as an engineering portfolio piece.
The honest postmortem: the product lost to the market, not to the technology. Over five months I shipped a post-quantum signing API, six SDKs, neural + DCT watermarking across four media types, a post-quantum C2PA implementation, Stripe billing, teams/RBAC, EU AI Act attestation exports, and three frontends — solo. What I didn't do was spend that time talking to customers and selling. By the time the feature set was "complete," established players (Resemble AI and others) had already won the distribution race with smaller feature sets and better go-to-market. The lesson is the oldest one in the book: features don't sell a product — selling sells a product. I built like an infrastructure company and marketed like a repo.
What remains here is a complete, working codebase: a real production system that signed and verified real content for real (if few) users. Everything below this notice describes the product as it ran.
Certivu is a provenance verification infrastructure for AI-generated content. When AI generates content, Certivu cryptographically signs it at creation time using ML-DSA (Dilithium) — a post-quantum cryptographic algorithm — so anyone can later verify it is authentic and untampered.
Certivu does not claim to detect all AI content. It verifies declared, signed provenance when present. That distinction is intentional and legally important.
Generation Time Verification Time
────────────── ─────────────────
AI generates content Upload content to /verify
↓ ↓
Embed DCT + neural watermark + token Extract token from metadata container
↓ OR decode neural / DCT watermark
Hash content (SHA-3) OR pHash / acoustic fuzzy lookup
↓ ↓
Sign with ML-DSA Lookup record in MongoDB
↓ ↓
Store record in MongoDB → Re-hash content, compare
↓ Verify ML-DSA signature
Return ctv_ token ↓
(optional: embed PQ C2PA manifest) Return confidence + provenance
Classical cryptography (RSA, ECC) will be broken by quantum computers via Shor's algorithm. NIST has mandated:
- RSA/ECC deprecated by 2030
- Completely disallowed by 2035
Certivu uses ML-DSA (FIPS 204) for signatures and plans ML-KEM (FIPS 203) for key exchange — the NIST-standardized post-quantum algorithms — so provenance records signed today remain verifiable long after Q-Day.
- Cryptographic signatures establish truth — watermarks are resilience, not proof
- Watermarks preserve traceability through resizing, recompression, and social media re-uploads
- Verification reports signals and confidence — never false certainty
- No content storage — only hashes and records
- Neutral, compliance-safe positioning — absence of provenance ≠ human origin
| Layer | Technology |
|---|---|
| Runtime | Bun |
| Framework | Hono |
| Language | TypeScript |
| Database | MongoDB Atlas |
| Cache / Rate Limit | Redis |
| Operator Dashboard | SolidJS + Vite |
| Marketing / Verifier | Astro + SolidJS |
| PQC Signatures | ML-DSA via @noble/post-quantum (NIST FIPS 204) |
| Hashing | SHA-3 via @noble/hashes |
| Watermarking | DCT spread-spectrum + neural TrustMark (image) · DCT frame + neural WavMark (WAV) · ZWC steganography (text) · format-native metadata containers |
| Neural inference | Python · FastAPI · PyTorch (TrustMark + WavMark) — apps/inference, opt-in via INFERENCE_URL |
| C2PA | Pure-TS ML-DSA-signed COSE_Sign1 + JUMBF manifest (post-quantum, embedded into JPEG/PNG) |
| Build System | Turborepo |
| Linter / Formatter | Biome | Deploy | Fly.io (API + inference) · Cloudflare Pages (web/dashboard/docs) |
/certivu
├── /apps
│ ├── /api # Bun + Hono backend — core product
│ ├── /inference # Python + FastAPI neural watermarking (TrustMark + WavMark)
│ ├── /dashboard # SolidJS operator dashboard (auth, audit log, API keys, signer)
│ ├── /web # Astro marketing site + public verifier + certificate page
│ ├── /docs # API documentation (Starlight)
│ ├── /cli # @certivu/cli — sign / verify / attestation from the terminal
│ └── /status # Public status page
│
├── /packages
│ ├── /sdk # @certivu/sdk — installable npm SDK
│ ├── /sdk-python # certivu — PyPI SDK (kept in sync with JS)
│ ├── /badge # <certivu-badge> web component
│ ├── /types # @certivu/types — shared TypeScript types
│ ├── /crypto # @certivu/crypto — PQC primitives + C2PA write (isolated)
│ └── /config # @certivu/config — shared Biome/TS configs
│
├── /integrations # ComfyUI node · A1111 extension · browser extension
│
└── /infra
├── /docker # Dockerfiles + docker-compose
├── /fly # Fly.io deployment config (api, inference, sandbox)
└── /scripts # gen-keys.ts, seed.ts, watermark-robustness.ts, …
POST /v1/records
Authorization: Bearer ctv_key_xxx
Content-Type: application/json
{
"watermark_id": "uuid",
"generator_id": "uuid",
"model": "stable-diffusion-xl",
"content_hash": "sha3-256:a1b2c3...",
"signature": "base64-ml-dsa-signature",
"signed_payload": { ... }
}{
"token": "ctv_xxxxxxxxxxxxx",
"record_id": "rec_abc123",
"created_at": "2026-05-24T00:00:00Z"
}POST /v1/verify
Content-Type: multipart/form-data
content: <image file>
token: ctv_xxxxxxxxxxxxx (optional — auto-extracted from XMP or watermark){
"authentic": true,
"tampered": false,
"confidence": "high",
"token_source": "xmp",
"signals": {
"watermark_found": true,
"neural_watermark_found": true,
"record_found": true,
"signature_valid": true,
"phash_match": false
},
"provenance": {
"org": "Acme AI",
"model": "stable-diffusion-xl",
"signed_at": "2026-05-24T00:00:00Z"
}
}Records & C2PA
POST /v1/records — submit a signed provenance record
GET /v1/records/:id — fetch a record by ID
GET /v1/records/:id/c2pa — export C2PA manifest (JSON)
POST /v1/records/:id/c2pa/embed — embed PQ (ML-DSA) C2PA into JPEG/PNG (Growth+)
Verify (no auth required, always free)
POST /v1/verify — verify content (token optional)
POST /v1/verify/batch — batch verification, up to 50
GET /v1/verify/status/:token — CDN-cacheable status (powers <certivu-badge>)
Sign (session)
POST /v1/sign — no-code web signer
Generators & keys
GET /v1/generators — list generators for authenticated org
POST /v1/generators — register a new generator
PUT /v1/generators/:id/revoke — revoke a generator
POST /v1/generators/:id/rotate-key — rotate signing key (kid)
GET /v1/keys/:generatorId — retrieve generator public keys
Insight & compliance
GET /v1/audit /v1/audit/export — paginated event log (keyset) + CSV/JSON export
GET /v1/analytics/overview — verification analytics (plan-gated)
GET /v1/analytics/records/:id — per-record drill-down (Growth+)
GET /v1/attestation — EU AI Act attestation (Enterprise, JSON/HTML)
GET/PATCH /v1/account/branding — org certificate branding (Growth+)
Webhooks (Growth+)
GET/POST /v1/webhooks — list + create endpoints
PATCH/DELETE /v1/webhooks/:id — update or delete
GET /v1/webhooks/:id/deliveries — delivery log
Platform
GET /v1/billing/plans /v1/billing/usage — plan catalogue + org usage
* /v1/auth/* /v1/team/* /v1/billing/* — auth, RBAC/teams, Stripe billing
* /v1/support/* /v1/admin/* — support tickets + admin console
GET /health /version — health + build/environment probe
| Confidence | Signals Present | Meaning |
|---|---|---|
high |
(Neural or DCT) watermark ✓ + Record ✓ + Signature ✓ | Full chain intact, watermark survived |
medium |
Record ✓ + Signature ✓ recovered via pHash / acoustic fingerprint | Transformed/re-uploaded, provenance still recovered |
low |
Partial signals | Something is off |
none |
Nothing found | Not signed by Certivu — no claim either way |
The token_source field reports how the record was located: provided, xmp, watermark, neural_watermark, or phash.
Certivu uses ML-DSA (Module Lattice Digital Signature Algorithm), standardized as NIST FIPS 204. Resistant to attacks from both classical and quantum computers.
Key Generation: generateKeypair() → { publicKey, privateKey } // base64
Signing: sign(privateKey, message) → signature // base64
Verification: verify(publicKey, message, signature) → boolean
Hashing: hash(content) → "sha3-256:<hex>"
Token: encodeToken(payload) → "ctv_xxxxx"
The @certivu/crypto package is completely isolated from business logic. Swapping the underlying PQC library requires changes to exactly one package.
Provenance is embedded at signing time through a format-native metadata container (fast path) plus a resilient watermark or fingerprint (survival path). Embedded data is only an opaque watermark_id — a lookup handle, nothing more.
| Media | Fast path (metadata) | Resilient path |
|---|---|---|
| Image (JPEG/PNG/WebP) | XMP / tEXt / RIFF chunk | Neural TrustMark · DCT spread-spectrum watermark · pHash fuzzy lookup |
| Audio (MP3/FLAC/WAV) | ID3v2 / Vorbis / CTV RIFF chunk | Neural WavMark (WAV, opt-in) · DCT frame watermark (WAV) · acoustic fingerprint (MP3/FLAC) |
| Text (PDF/HTML/plain) | PDF XMP stream / HTML <meta> |
ZWC steganography in text content |
| Video (MP4/MOV/MKV/WebM) | cerv atom / sentinel trailer |
Neural keyframe TrustMark + audio WavMark (opt-in) · first-I-frame pHash fuzzy lookup |
Extraction order on verify: provided token → format-native container (instant) → neural watermark → resilient DCT watermark → pHash / acoustic fingerprint fuzzy lookup (last resort) → no_provenance_found
The neural watermark layer (TrustMark/WavMark) is opt-in via the apps/inference service and rides alongside the always-on DCT/ZWC marks. Neural marks and the DCT watermark each carry only an opaque lookup code — the ML-DSA signature remains the sole source of truth.
Not claimed to be unremovable — honest, legally safe positioning. The signature is the source of truth.
# Install dependencies
bun install
# Start the API (port 3000)
bun dev --filter=@certivu/api
# Start the operator dashboard (port 5173)
bun dev --filter=@certivu/dashboard
# Start the marketing site + public verifier (port 4321)
bun dev --filter=@certivu/web
# Generate a keypair and seed an org + generator into MongoDB
MONGODB_URI=<your-uri> bun run infra/scripts/gen-keys.ts "Org Name" "Generator Name"
# Create a signed test image and POST it to /v1/records
export GENERATOR_ID=... API_KEY=... PRIVATE_KEY=... # from gen-keys.ts output
bun run infra/scripts/make-test-image.ts
# → saves ./test-signed.jpg, then upload to http://localhost:4321/verify- Neural watermarking — opt-in
apps/inferenceservice (Python/FastAPI/PyTorch) running TrustMark (image) and WavMark (audio), reached through a graceful-degrade adapter. Image marks embed after the DCT pass and survive JPEG recompression + resize; in-band video marks every keyframe plus the audio track. Neural marks carry opaque format-scoped lookup codes — the signature stays the source of truth - Post-quantum C2PA write — pure-TS
cbor/cose/c2paWritebuild a real ML-DSA-signed COSE_Sign1 (alg −49) + JUMBF manifest with hard binding, embedded into JPEG (APP11) / PNG (caBX) viaPOST /v1/records/:id/c2pa/embed(Growth+). Structurally interoperable; standard verifiers flag the algorithm as unrecognized (the moat). Richer third-party C2PA read - Perceptual watermark texture gate — DCT mark now rides only in textured blocks (skies/flat fills are skipped on embed + extract), removing visible grain; strength tuned to Δ=8
- v2.5.1 audit remediation — graceful-degrade + integrity hardening across neural sign, video caps, C2PA fixed-point binding, crypto worker-pool crash-requeue, batch-verify concurrency cap, and inference-service fail-closed auth. Full list in
V2_5_AUDIT.md
- EU AI Act attestation —
GET /v1/attestation(+/export?format=json|html), Enterprise-gated, maps three Article 50 obligations with zero PDF deps - Org-branded certificates —
OrgBranding(display name / logo / color / support URL), managed from dashboard Settings, rendered on the public certificate page and<certivu-badge>(Growth+) - v2.4.1 full-codebase audit remediation — fixes across 4 passes: admin inbox stored XSS (sandboxed iframe), true recursive
canonicalJson, webhook SSRF guard, transactional GDPR delete, worker-pool offload for ML-DSA + audio FFT, server-sign input-hash dedup, keyset audit cursor, standardized error envelope. Full list inAUDIT_REPORT.md
- Sign where it's made — ComfyUI node + A1111 extension (wrap the
certivupip SDK), no-code web signer in the dashboard (POST /v1/sign) - Verify where it's consumed —
<certivu-badge>web component (CDN), MV3 browser extension (right-click verify), CLI-based CI verification (certivu verifyglob +--fail-on-missing) - Ops — sandbox environment (
CERTIVU_ENV=sandbox,ctv_test_key_prefix), public status page, permissive CORS on public read/verify
- Video signing + verification — MP4/MOV via a
cervcustom atom (appended at EOF to keep files playable), MKV/WebM via a Certivu sentinel trailer. Format auto-detected from magic bytes - Resilient video path (v2.2.1) — ffmpeg extracts the first I-frame at sign time; the server computes and stores a pHash. On verify, a fuzzy pHash lookup (Hamming ≤ 8, format-scoped) recovers provenance after container strip/remux. Confidence
medium
- Deeper embedding across every format — HTML ZWC in text nodes (survives sanitizers), PDF
/MetadataXMP stream, WAV 24-bit PCM watermark, ZWC distributed across paragraphs - Acoustic fingerprint fallback — MP3/FLAC get a Shazam-style landmark fingerprint (pure-TS FFT) as a last-resort verify path when tags are stripped
- Multi-format signing —
POST /v1/signaccepts JPEG/PNG/WebP, MP3/FLAC/WAV, PDF/HTML/plain text. Format auto-detected from magic bytes or specified viaformat. Upload limit 50 MB - Format-appropriate provenance — XMP for images, ID3v2/VORBIS_COMMENT/CTV RIFF chunk for audio, PDF XMP / HTML
<meta>for text - Resilient watermarks — DCT spread-spectrum (image), DCT frame watermark (WAV), ZWC steganography (plain text)
- Generator format enforcement —
supported_formatsrequired on registration; unlisted format →400 format_not_supported - SDK + CLI — JS SDK, Python SDK, and CLI updated with
format(auto-detected if omitted)
Development ended at v2.6.1. Beyond the changelog above, the final two releases shipped:
- v2.6.0 — SDK Expansion: four additional thin-REST SDKs — Go, Rust, Java/Kotlin, and PHP — each distributed as a static, content-addressed registry (Go module proxy, Cargo sparse registry, Maven repo, Composer repo) served from
cdn.certivu.ai, plus a parity audit and fixes across all six SDKs - v2.6.1 — Design Language Renovation: dashboard, marketing site, and status page redesigned under a single shared "Instrumented" design system and token set
The full build history and roadmap live in POST_MVP.md and SDK_ROADMAP.md.
These are intentional. Certivu does not claim:
- Detection of all AI-generated content
- Watermarks that are unremovable
- That absence of provenance data implies human origin
Certivu provides cryptographically verifiable provenance for AI-generated content, enabling platforms and media to label content with confidence — without claiming universal detection.
Copyright (c) 2026 Bleart Emini.
Licensed under the PolyForm Noncommercial License 1.0.0 — you may read, run, and modify this code for any noncommercial purpose. Commercial use is not permitted.
Built by Bleart Emini
Quantum-resistant. Honest. Infrastructure-grade.