starlinglab / 2022-bijeljina-investigation-zk-photo-redaction

1 stars 2 forks source link

2022 Bijeljina Investigation: ZK Photo Redaction

This repository contains the code used to generate and to verify zero knowledge proofs in our 2022 Bijeljina Investigation. The process is used to provably redact regions in authenticated images before they are published.

The following example uses the filename ZKPHOTO, and the following files are involved in the process:

Creating ZK redaction and generating proof files

Two source files are required in the same folder:

The code generates the following files:

The following files are generated but can be purged:

Run:

# Generate proving Go code
python3 redact.py ZKPHOTO

# Run proving Go code to generate proof
go mod tidy
go run ZKPHOTO_main.go ZKPHOTO

Verifying ZK redaction using proof files

Three files are required in the same folder:

Run:

# Generate verifying Go code 
python3 verify.py ZKPHOTO

# Run verifying Go code to verify proofs
cd verify
go mod tidy
go run ZKPHOTO_main.go ZKPHOTO