Skip to content

Verifiable video trimming/editing software using Folding-based zkSNARKs

License

Notifications You must be signed in to change notification settings

zero-savvy/proven-view

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cover (Generated by Bing Image creator, Powered by DALL-E 3)

Installation

I-Dependencies

  • I-a) Node JS:
    • curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
    • source ~/.bashrc
    • nvm install v16.20.0

Tip

in rare cases (miss-configured Linux distros), if you got an error stating that version "v16.20.0" was not found; following command might help: export NVM_NODEJS_ORG_MIRROR=http://nodejs.org/dist

  • I-b) snarkjs:
    • npm install -g snarkjs
  • I-c) Rust:
    • curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain none -y
    • rustup default stable
  • I-d) build-essentials:
    • sudo apt install gcc build-essential nlohmann-json3-dev libgmp3-dev nasm
  • I-e) Circom:
    • git clone https://github.com/iden3/circom.git
    • cd circom
    • cargo build --release
    • cargo install --path circom
    • Verify the installation: circom --version
  • I-f) Time:
    • sudo apt install time

Note

We have successfully executed benchmarks on multiple systems and expect there should be minimal sensitivity regarding spesific versions in the dependencies, however, we note one of our recent system configurations for the record:

  • Ubuntu @ 22.04
  • Circom @ 2.2.1
  • snarkjs @ 0.7.5
  • rustc @ 1.86.0-nightly

II-Installing

Once you have installed dependencies, you can proceed with setting up and running provenview. To obtain the latest version of provenview, head to directory of your choice and install provenview using the following command:

  • Clone: git clone https://-----anon----.git
  • Head to the nova directory: cd asiacss-paper-22BC/nova/
  • build and install provenview using cargo:
    • cargo build
    • cargo install --path .
    • verify installation of provenview: provenview --help

II-b) Building Circuits

go to the circuits directory:

cd ../circuits

build node modules:

npm install

build ZK circuits using the provided script in this directory:

./build_circuits.sh

Benchmarks

We've built the tools necessary for benchmarking using the samples provided in the samples directory. To do this, simply Go to the main directory of provenview repo and run the provided script:

./benchmark.sh 

This script reproduces the benchmarks for proving the construction of full VC in ZK (Table 6).

How to Use (Detailed)

You can try to use the system with any video file that you have.

cd ../python virtualenv .venv source .venv/bin/activate pip install -r requirements.txt

execute commit phase:

python commit_phase.py

execute prove phase:

python prove_phase_full.py

  • when promted, just press enter for default values!

Then, you can use the generated files (in the python/output/ directory) as the input for the actual proof:

provenview --function <FUNCTION>
--resolution <RESOLUTION> --input <FILE>
--circuit <R1CS FILE> --output <FILE>
--witnessgenerator <BINARY/WASM FILE>

which will be like this:

provenview --circuit ../circuits/merkle_fold_step.r1cs --function vector_commitment --input output/ --output folding-proof-file.json --witnessgenerator ../circuits/merkle_fold_step_cpp/merkle_fold_step

About

Verifiable video trimming/editing software using Folding-based zkSNARKs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Contributors 2

  •  
  •