Skip to content

Latest commit

 

History

29 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZeroWitness - Privacy-Preserving Cryptographic Media Verification

ZeroWitness is an advanced, privacy-preserving media and location verification platform. It allows users to capture live photographs and cryptographically prove that the media was recorded within a specific geographic region at a specific time, without revealing their exact location coordinates or exposing raw, identifying visual data.

By leveraging Zero-Knowledge (ZK) cryptography, ZeroWitness establishes a trustless bridge between physical reality and digital verification, making it highly beneficial for whistleblower protection, citizen journalism, insurance claims, supply chain audits, and secure legal witnessing.

Live Production Verification Portal: https://zero-witness.vercel.app/


Core Benefits

  • Absolute User Anonymity: High-accuracy location verification is completed within a private geographical boundary (such as a 1.0 km radius). The exact GPS coordinates of the user are never exposed to any public registry, verifier, or server.
  • Trustless Media Authentication: The cryptographic proof guarantees that the media matches the captured hash and was recorded at a real, live GPS coordinate without relying on a centralized authority.
  • Anti-Spoofing Protections: By binding the live hardware camera capture to real-time location subscriptions, the platform defends against metadata tampering, fake image uploads, and GPS coordinate spoofing.
  • Metadata Privacy: Traditional EXIF metadata, which can easily leak identity or precise coordinates, is replaced by a cryptographically secure, zero-knowledge witness artifact.

How It Works

The ZeroWitness architecture operates through a secure, five-stage pipeline:

graph TD
    A[1. Live Camera & GPS Capture] --> B[2. Hardware-Accelerated Skia Blur]
    B --> C[3. Zero-Knowledge Proof Generation]
    C --> D[4. Hardened Storage Deletion]
    D --> E[5. Trustless Web Verification]
Loading
  1. Live Camera and GPS Capture: The mobile application captures a live photograph and synchronizes high-precision GPS coordinates using real-time location poller subscriptions.
  2. Hardware-Accelerated Privacy Masking: The raw image is instantly processed through an on-device canvas using high-performance hardware-accelerated filters (via Shopify Skia), applying a heavy blur to ensure no sensitive visual identities or private details are readable.
  3. Zero-Knowledge Proving: The application generates a cryptographic witness proof based on a Noir circuit. The prover calculates that:
    • The secret, exact coordinates fall strictly within a public bounding box.
    • The secret, exact coordinates match the physical position of the hardware sensor.
    • The public image hash corresponds to the blurred image asset.
  4. Hardened Storage Deletion: To enforce privacy boundaries, the application permanently deletes the raw, unblurred photograph from the device's filesystem immediately after generating the proof.
  5. Trustless Web Verification: The proof, public inputs, and blurred image are compiled into a .witness artifact. Third parties can upload this file to the Next.js verification portal, which mathematically verifies the proof's validity offline or online, confirming authenticity without seeing the unblurred photo or exact coordinates.

Technical Stack

Mobile Application

  • Framework: React Native and Expo (SDK 54)
  • Graphics Engine: @shopify/react-native-skia (Hardware-accelerated rendering and canvas filters)
  • Animation & UI: react-native-reanimated (Fluid interface layouts and transitions)
  • Language: TypeScript

Cryptography Layer

  • Domain-Specific Language: Noir (Rust-based language for writing Zero-Knowledge circuits)
  • Proving System Backend: Barretenberg (ASIC/hardware-friendly PLONK prover)
  • Data Types: jsbi (High-precision JavaScript BigInt support)

Verification Web Portal

  • Framework: Next.js (React 19)
  • Styling: Vanilla CSS
  • Language: TypeScript
  • Hosting: Vercel (Support for serverless Edge functions)

Key Features

  • Real-time GPS Tracking: Continuous, high-precision location fetching that updates every second to verify live presence.
  • On-device Privacy Blurring: Live Skia-based canvas masking that runs locally at 60 FPS, ensuring no raw image data ever leaves the local environment.
  • Client and Server Proving Configurations: Robust proving mechanisms supporting both client-side generation and server-side fallback endpoints to manage computation loads.
  • Witness Artifact Export: Saves structured .witness packages locally or exports them securely using native sharing protocols.
  • Next.js Verifier Portal: Web-based verification client that parses cryptographic proofs and verifies mathematical validity directly.

Project Structure

├── android/               # Native Android application configuration
├── api/                   # Serverless proving API endpoints
├── assets/                # Application assets and precompiled ZK circuits
├── noir/                  # Noir cryptographic circuits source code
├── server/                # Express-based development proving servers
├── web-verifier/          # Next.js web application for verification
├── App.tsx                # Main mobile application entry and UI
├── zk.ts                  # ZK client proving execution logic
└── package.json           # Project dependencies and run scripts

Getting Started

Prerequisites

  • Node.js (version 18 or later)
  • Android SDK (for local Android emulation/builds)
  • Expo Go app or EAS CLI configured for development

Installation

  1. Clone the repository to your local directory.
  2. Install the top-level dependencies:
    npm install

Running the Mobile Application

  1. Start the Expo development server:
    npm run start
  2. Press a in the terminal to build and run the application on an Android emulator or connected device.

Running the Web Verification Portal

  1. Navigate to the web verifier directory:
    cd web-verifier
  2. Install dependencies and start the local development server:
    npm install
    npm run dev
  3. Open http://localhost:3000 in your web browser to upload and verify .witness files locally, or navigate directly to the production verifier: https://zero-witness.vercel.app/

About

A privacy-preserving media and location verification platform. ZeroWitness uses Zero-Knowledge (ZK) cryptography (Noir & Barretenberg) to verify that photographs were captured at a real, live location within a private boundary, without revealing the user's exact coordinates or raw identity metadata.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages