# Unlocking Media Authenticity: The Case for Zero-Knowledge Proofs

By [Maya Protocol](https://paragraph.com/@mayaprotocol) · 2024-03-15

---

In our [previous blog](https://medium.com/@mayalabs.zk/unmasking-the-illusion-navigating-the-advances-and-challenges-in-deepfake-detection-technology-7468d7f43c7d), we talked about the problem of **misinformation** and **AI deepfakes**, their significant consequences and potential solutions to the problem.

In this article, we will explore why we believe **Zero Knowledge** technology is the endgame for ensuring the **authenticity of digital media content** across the Internet.

Introduction
------------

Before we dive deeper, let’s take a moment to refresh our understanding of zero-knowledge proofs, as described on [Wikipedia](https://en.wikipedia.org/wiki/Zero-knowledge_proof):

> _In_ [_cryptography_](https://en.wikipedia.org/wiki/Cryptography)_, a_ **_zero-knowledge proof_** _or_ **_zero-knowledge protocol_** _is a method by which one party (the prover) can prove to another party (the verifier) that a given statement is true, while avoiding conveying to the verifier any information beyond the mere fact of the statement’s truth._[_\[1\]_](https://en.wikipedia.org/wiki/Zero-knowledge_proof#cite_note-1) _The intuition underlying zero-knowledge proofs is that it is trivial to prove the possession of certain information by simply revealing it; t\*he challenge is to prove this possession without revealing the information_, **or any aspect of it whatsoever**.\*

Zero Knowledge (ZK) is extensively applied within the web3 ecosystem, catering to a wide range of applications from **privacy enhancements** to **scalability solutions** and more. The most prominent examples are [zkRollups](https://ethereum.org/developers/docs/scaling/zk-rollups), which use **ZK** to efficiently **scale** [**Ethereum**](https://ethereum.org/).

For an in-depth exploration of this topic, we highly recommend the explainer articles by [Ingonyama](https://www.ingonyama.com/ingopedia/zkbeginner) and [Lambdaclass](https://blog.lambdaclass.com/).

The origins
-----------

Before we dive into the role of ZK in ensuring digital media authenticity, let’s briefly review some prior work by [Starling Lab](https://www.starlinglab.org/) at Stanford:

[https://vimeo.com/494323381](https://vimeo.com/494323381)

This video serves as an insightful explainer, highlighting the critical importance of authenticity of digital media content in today’s world, especially given the **rapid advancements in AI-generated media**.

To guarantee the authenticity of digital media, such as images, it’s crucial to **cryptographically secure their provenance** — that is, their **source and history**. Imagine being able to trace an image or video back to the point it was taken and verifying that history to ensure its authenticity. Essentially, the concept of provenance can be distilled into two key phases:

1.  **Capture**: The initial step where media, be it an image or video, is **captured** using devices like **smartphones or professional cameras**.
    
2.  **Edits**: Post-capture, the media often undergoes a **series of edits** to make it more presentable before publication.
    

![Visual showing the two key phases of provenance: Capture and Edits](https://storage.googleapis.com/papyrus_images/e9afae8e82ae1e940709753a6cff7d677965e2836a212b165d210dec31d76628.png)

Visual showing the two key phases of provenance: Capture and Edits

So, to verify the authenticity of an image, [we need to ensure two things](https://medium.com/@boneh/using-zk-proofs-to-fight-disinformation-17e7d57fe52f):

> _(i) the original unedited image was properly signed, and was taken at the claimed time and location, and (ii) only permissible edits, such as cropping, resizing, and grayscale, were made to the signed image. The security of the scheme should not require trusting the editing software._

Here’s how we can provide evidence for these aspects:

*   **Capture**: By using technologies like [C2PA](https://c2pa.org/) to **cryptographically sign** the image directly from the camera (modern models like the [Leica M11-P](https://leica-camera.com/en-int/photography/cameras/m/m11-p-black) are equipped for this), we can **authenticate the capture process**.
    
*   **Edits**: To verify edits, we can employ either **digital signatures** or **zero-knowledge** (ZK) proofs, each having its own pros and cons.
    

By cryptographically verifying these proofs — **Proof of Capture** and **Proof of Edits —** we can assure the authenticity of an image and rule out any **unauthorized manipulation**.

A real-world example of this technology in action is the collaboration between Starling lab and [Rollingstone](https://www.rollingstone.com/), who utilized this provenance approach to [**investigate**](https://investigation.rollingstone.com/dj-photo-war-crimes-bosnia/archive/the-document/) **war crimes in** [**Bosnia**](https://en.wikipedia.org/wiki/Bosnia_and_Herzegovina). Their proof-of-concept demonstrates how each phase in the image’s history, from **capture to publication**, can be cryptographically verified, ensuring its **authenticity and credibility**.

![Visual showing the provenance of an image, ie, the source and history of an image](https://storage.googleapis.com/papyrus_images/cfc169ad7dff13373790bde7fd41144a4056c4eaaf45ef105a222ca4d4e36182.webp)

Visual showing the provenance of an image, ie, the source and history of an image

They also employed **zero-knowledge proofs to redact the names** of hundreds of individuals who were not subjects of their investigation\*\*.\*\*

> _These zero-knowledge proofs, or ZK proofs, are some of the most innovative methods used by cryptographers today. They provide “mathematical proofs” that the redaction boxes were placed in exact locations by authorized editors and archivists, as the only permissible change to the file._
> 
> _If challenged, one can compare the ZK proof to the certificate of the original file to audit the changes_ **_without seeing the unredacted information._**

This use of ZK proofs was one of the first real-world applications of the technology for image redactions, designed specifically for _Rolling Stone_ by [Stanford University’s Applied Cryptography Group](https://crypto.stanford.edu/).

![Visual showing a document with redacted names of individuals](https://storage.googleapis.com/papyrus_images/6077153ecaf3c6bc09f66bfd4aeb95f38c3ad459365d31bce930a33ba8e88de3.webp)

Visual showing a document with redacted names of individuals

**ZK for Media Authenticity**
=============================

Zero Knowledge technology is incredibly useful for proving the authenticity of digital media content, such as **images, videos and audios**.

The magic lies in **ZK proofs of image transformations**. These proofs can confirm, **without revealing the original**, that an image is indeed the result of certain edits applied to it. This verification process is swift, taking just a **couple of milliseconds**. We’re also excited to share that we recently open-sourced a [CLI tool](https://github.com/0xmayalabs/maya-cli) to generate and verify ZK proofs of image transformations.

![Using ZK Proofs instead of Cryptographic Signatures ensures complete privacy and solves the risk of private key exposure](https://storage.googleapis.com/papyrus_images/bf4e7570e0d91da02742071e82ca00fdf297f92d1204ccafe0f8f9f8fd9b1f79.webp)

Using ZK Proofs instead of Cryptographic Signatures ensures complete privacy and solves the risk of private key exposure

While digital signatures have their merits, they come with the risk of **private key exposure**. On the other hand, ZK proofs offer **robust security** but can demand **significant resources**. Yet, the benefits of Zero Knowledge technology, especially for scalable systems, are undeniable. Here are a couple of key advantages:

*   **Privacy**: The **Zero Knowledge** property ensures **complete privacy**, allowing the original image to remain hidden while still proving its authenticity. This is crucial, as many raw images undergo editing, and some may contain **sensitive information** not intended for public release.
    
*   **Trustless verification**: The **Soundness/Completeness** property of Zero Knowledge enables **fully trustless verification**, so the verifier doesn’t need to trust the prover. This establishes a system where authenticity can be confirmed without any reliance on a third party.
    

So, despite its resource demands, Zero Knowledge technology holds the key to a future where the **authenticity of** **digital media can be securely and privately verified**.

**Challenges**
==============

Major progress has been achieved in applying **Zero-Knowledge proofs to images**. [PhotoProof](https://ieeexplore.ieee.org/document/7546506) (Naveh and Tromer, 2016) was one of the **first research** in this area, demonstrating the creation of zero-knowledge for edits on 128x128 images — a process that initially took **several minutes**.

Since that initial research, several studies have been published using the latest ZK frameworks. For instance, [**ZK-IMG**](https://arxiv.org/abs/2211.04775) by [Daniel Kang](https://twitter.com/daniel_d_kang) et al. employs [**halo2**](https://zcash.github.io/halo2/), while the [work of Dan Boneh and Trisha Dutta](https://medium.com/@boneh/using-zk-proofs-to-fight-disinformation-17e7d57fe52f) makes use of [**circom**](https://github.com/iden3/circom). Additionally, we have [developed](https://docs.mayalabs.tech/) ZK circuits using [**gnark**](https://github.com/Consensys/gnark) and have **open-sourced** it [here](https://github.com/0xmayalabs/maya-cli).

However, these methods have not yet reached the optimization level required for **scalable real-world applications**. There’s a need for **targeted** **optimizations,** specifically for ZK proofs related to images, to enhance their **speed and efficiency**.

On the other hand, applying **ZK proofs to videos remains a significant challenge and is still an open problem**. [Dan Boneh](https://en.wikipedia.org/wiki/Dan_Boneh) from Stanford highlighted this problem in an [episode](https://youtu.be/EKoY8ysGblk?t=1145&feature=shared) of the Zero knowledge podcast, pointing out the difficulty due to the substantial file sizes of videos, which can reach **several gigabytes.** The question then becomes: **How do we generate ZK proofs on such large amounts of data as videos?**

To our knowledge, no research has been published yet that specifically addresses ZK proofs for video content. So, it continues to be a **challenging, unsolved problem**.

**Performance for images**
==========================

Generating a zero-knowledge proof for image transformations requires significant computational resources, particularly for larger images (>1000x1000).

In our [CLI tool](https://github.com/0xmayalabs/maya-cli), we’ve written some ZK circuits using [gnark](https://github.com/Consensys/gnark) to prove image transformations. We have also benchmarked their performance, focusing on proof generation times and proof sizes, as detailed in our [docs](https://docs.mayalabs.tech/perf/performance.html).

For instance, the [following table](https://docs.mayalabs.tech/perf/r6i-8xlarge/crop.html) illustrates the performance of crop transformations on an [AWS EC2 R6i.8xlarge](https://aws.amazon.com/ec2/instance-types/r6i/) instance (32 CPU cores, 256 GB RAM):

![Visual showing the performance benchmarks for proving image transformations of various sizes](https://storage.googleapis.com/papyrus_images/3abf8d8451474c14e3f77becaa6a8894533e5aabaacaefab961bea97f5f8842f.webp)

Visual showing the performance benchmarks for proving image transformations of various sizes

It’s clear that the proof generation is still very expensive and tends to increase with the size of the images involved. **As the image sizes increase, so does the time needed for proof generation.**

**Future scope**
================

As long as technology costs remain higher, it will hinder widespread adoption. As Elon Musk points out,

> _Any new technology is expensive when it starts out._

However, the future looks optimistic as the costs associated with ZK proofs have been steadily declining, thanks to advancements in ZK-related hardware and software. Companies like [Ingonyama](https://www.ingonyama.com/) and [Accseal](https://accseal.com/) are making strides in hardware acceleration for zero-knowledge proofs. For instance, **Ingonyama** announced a **programmable hardware accelerator** called the [Zero Knowledge Processing Unit](https://medium.com/@ingonyama/zpu-the-zero-knowledge-processing-unit-f886a48e00e0) (**ZPU**). And recently, **Accseal** [released](https://twitter.com/Accseal/status/1754671380355039667) the world’s first Zero-Knowledge Proof (ZKP) System-on-Chip (SoC) **acceleration chip**, named the **Accseal LEO chip**.

![Justin Drake (Researcher, Ethereum Foundation) showing an ASIC chip for proving SNARKs https://twitter.com/drakefjustin/status/1756008702539071600](https://storage.googleapis.com/papyrus_images/45e5ecaf992536c5024e36a8415083043b429b42f2bfcc3ad94aa3e6e8c44aba.webp)

Justin Drake (Researcher, Ethereum Foundation) showing an ASIC chip for proving SNARKs https://twitter.com/drakefjustin/status/1756008702539071600

On the software front, there have been tremendous progress in **GPU-acceleration** and **FPGA-acceleration,** alongside the development of **newer, faster ZK proof systems**. Open-source libraries like [ICICLE](https://dev.ingonyama.com/icicle/overview) (by Ingonyama) are enhancing ZK acceleration using **CUDA-enabled GPUs**. [Blaze](https://github.com/ingonyama-zk/blaze) is another library that focuses on **FPGA-based ZK acceleration**, offering access to primitives like MSM, NTT and Poseidon hash.

The advent of cutting-edge ZK backend technologies like [plonky3](https://github.com/Plonky3/Plonky3) is revolutionizing proof generation, leading to **smaller proof sizes** and **faster proof generation times**.

Given these advancements in both hardware and software, we believe that the era of ZKP computing is just getting started, potentially unlocking endless opportunities for applications that were previously not scalable due to the cost constraints associated with zero-knowledge proofs.

**Maya Protocol**
=================

We are building the Maya Protocol, **a protocol to verify and ensure the authenticity of digital media content across the web**.

A fitting analogy for the Maya Protocol is the [TLS](https://www.cloudflare.com/en-gb/learning/ssl/transport-layer-security-tls/) protocol, which transforms standard HTTP pages into **secure HTTPS** websites, thereby enhancing their security. Similarly, the Maya Protocol transforms ordinary media content, such as images and videos, into **authentic and publicly verifiable media**, thus boosting their **credibility**.

Just as TLS relies on [public key cryptography](https://en.wikipedia.org/wiki/Public-key_cryptography) and [digital signatures](https://en.wikipedia.org/wiki/Digital_signature) to secure data communications, the Maya Protocol employs [Zero-Knowledge cryptography](https://en.wikipedia.org/wiki/Zero-knowledge_proof) to safeguard its integrity and security.

We are currently focusing our research efforts towards creating ZK proof systems **specifically optimized** for **images and videos**. Alongside this, we are also working on core products that will serve as the foundation of the Maya protocol.

Stay tuned for an upcoming article where we will do a deep dive into the Maya Protocol!

**Conclusion**
==============

Recent advancements in **AI-generated digital media technologies**, such as [DALL·E 2](https://openai.com/dall-e-2), [Midjourney](https://www.midjourney.com/home), and [Sora](https://openai.com/sora), have reached a level of [realism](https://twitter.com/minchoi/status/1762812204884074979) where distinguishing between **authentic** and **synthetic** media has become increasingly challenging. No doubt, the advancements are exciting. However, if we don’t find a way to fix this soon, it might become **impossible to trust anything** we see online.

Governments around the world (see [link1](https://techcrunch.com/2024/03/03/india-reverses-ai-stance-requires-government-approval-for-model-launches/), [link2](https://www.csis.org/blogs/strategic-technologies-blog/ai-regulation-coming-what-likely-outcome)) are attempting to create laws to regulate the use of AI. However, it’s becoming clear that putting the AI genie back in the bottle is no longer an option. We have to embrace these new innovations in AI.

There are still numerous challenges to solve this problem of digital media authenticity, but one thing is certain: **solving this problem is extremely crucial right now.** We’re actively tackling this issue and welcome collaboration from curious readers, researchers, tech enthusiasts and anyone interested in contributing. Your feedback and contributions are invaluable as we work together to develop this solution.

**We believe that Maya Protocol will lead the revolution for digital media authenticity.**

Thanks for reading!

Follow us on [Twitter](https://twitter.com/0xmayalabs) and [Farcaster](https://warpcast.com/mayaprotocol) for more updates.

---

*Originally published on [Maya Protocol](https://paragraph.com/@mayaprotocol/unlocking-media-authenticity-the-case-for-zero-knowledge-proofs)*
