Cover photo

Unlocking Media Authenticity: The Case for Zero-Knowledge Proofs

In our previous blog, 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:

In 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] 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 informationor 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, which use ZK to efficiently scale Ethereum.

For an in-depth exploration of this topic, we highly recommend the explainer articles by Ingonyama and Lambdaclass.

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 at Stanford:

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
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:

(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 to cryptographically sign the image directly from the camera (modern models like the Leica M11-P 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, who utilized this provenance approach to investigate war crimes in Bosnia. 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
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.

Visual showing a document with redacted names of individuals
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 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
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 imagesPhotoProof (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 by Daniel Kang et al. employs halo2, while the work of Dan Boneh and Trisha Dutta makes use of circom. Additionally, we have developed ZK circuits using gnark and have open-sourced it here.

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 problemDan Boneh from Stanford highlighted this problem in an episode 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, we’ve written some ZK circuits using gnark to prove image transformations. We have also benchmarked their performance, focusing on proof generation times and proof sizes, as detailed in our docs.

For instance, the following table illustrates the performance of crop transformations on an AWS EC2 R6i.8xlarge instance (32 CPU cores, 256 GB RAM):

Visual showing the performance benchmarks for proving image transformations of various sizes
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 and Accseal are making strides in hardware acceleration for zero-knowledge proofs. For instance, Ingonyama announced a programmable hardware accelerator called the Zero Knowledge Processing Unit (ZPU). And recently, Accseal released 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
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 (by Ingonyama) are enhancing ZK acceleration using CUDA-enabled GPUsBlaze 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 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 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 and digital signatures to secure data communications, the Maya Protocol employs Zero-Knowledge cryptography 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 2Midjourney, and Sora, have reached a level of realism 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 link1link2) 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 and Farcaster for more updates.