← Back to home

ZKfightsAI

ZKP_FIGHT_AI is a project designed to help users distinguish genuine human-created digital content from AI-generated fakes. We use a novel zero-knowledge proof signing method to do this.

Screenshots

ZKfightsAI screenshot 1
ZKfightsAI screenshot 2
ZKfightsAI screenshot 3

Problem Statement

Tokyo Hackathon: ZKP_FIGHT_AI:The aim of this project is to help users distinguish between genuine human-created digital content and AI-generated fakes. We will achieve this by leveraging a new ZKECDSA scheme called Spartan-ecdsa.This approach allows devices with private keys to sign within a group of public keys without revealing sensitive information. For the ETHGlobal Tokyo hackathon, we will use the 'control of ETH address' method for a better user experience, despite its slower response time. Users can show that they are apart of a group, while maintaining the privacy of their address. Outside the scope of fighting AI, this tech can be used for NFT trading or other transactions where exposing a public address is undesirable.For example, we could sign from an address to show that we possess a specific NFT without revealing our underlying public address. Or we could demonstrate that we have access to an account with over $10,000 USD in value, without exposing the trading history or account balance associated with that address.Both BTC and ETH utilize ECDSA signatures, which offers numerous benefits in terms of usage and tooling.Motivation:AI has the ability to process content from audio sources and convincingly replicate human voices. This can lead to impersonation, misinformation, or worse, across a variety of media formats. Our challenge is to establish the authenticity of content and determine whether it is AI-generated or not. Find more motivation in this Twitter thread.How it works:Spartan-ecdsa is the fastest open-source method to verify secp256k1 ECDSA signatures in zero-knowledge.Users can visit ZKPfightAI and post a link to their media. They can sign using either a private key or their ETH address via MetaMask or another tool. A proof is generated, which can be verified by anyone using their browser. Content owners can provide a "human-authenticated ZKBadge" and URL. Users can then confirm that the content they are viewing has been verified.Hardware devices, such as cameras and phones, could have private keys uploaded to them. Since we do not want to expose any single key in the group of device keys, we would use this ZKECDSA method. There is an interesting video on ZKP for misinformation prevention on YouTube.Blockchain:Hosting proofs and verifying them on-chain is a trustless way for anyone to confirm the source of information. As artificial intelligence becomes more advanced, blockchain with ZKP will play a significant role in preventing deep-fakes and misinformation. ZKP that run fast on user and resource-constrained devices will play a prominent role in protecting against fakes.

Solution

I used Next.js for the app server with React and Tailwind.css for the user interface. Ethereum accounts with Metamask is one signing method. I left an option open for users who have private key access to sign with ZKECDSA directly; this is important for hardware devices. Circom is used for the internal workings of the zero-knowledge proofs circuits with Snarkjs.One core module that is used is @personaelabs/spartan-ecdsa. This module uses a zero-knowledge proof system called Spartan. It is modified to increase performance on user and resource constrained device. Signing with private keys is still quicker than signing with an ETH address. The reason for this is hashing is a slow operation in ZK systems. Public address need to be put through a Keccak hash to be converted to an Ethereum address.This work is the first public repo demonstrating this tech in a user app. Since it is open source anyone can now get up and running with their own use-case. Investigations have been done over the course of the hackathon to speed up the Kekkak hash proof and wrap the proof into another proof (recursion); to make the final proof smaller and explored recursion/folding. We can do this with a schemes like Polygon's Plonky2, Groth16, Nova, or any other scheme that outputs small proofs.. Some of this work is slightly out of the scope of the limited time-constraints here. I was able to make something that works 100%, and is really fast!

Hackathon

ETHGlobal Tokyo

2024

Contributors