๐Ÿ“ฆ tobinsouth / zktaxaudit

Old zktaxaudit code

โ˜… 1 stars โ‘‚ 0 forks ๐Ÿ‘ 1 watching
๐Ÿ“ฅ Clone https://github.com/tobinsouth/zktaxaudit.git
HTTPS git clone https://github.com/tobinsouth/zktaxaudit.git
SSH git clone git@github.com:tobinsouth/zktaxaudit.git
CLI gh repo clone tobinsouth/zktaxaudit
Tobin South Tobin South Merge pull request #5 from tobinsouth/tobin-march e00e2a6 2 years ago ๐Ÿ“ History
๐Ÿ“‚ main View all commits โ†’
๐Ÿ“ circuits
๐Ÿ“ frontend
๐Ÿ“„ .gitignore
๐Ÿ“„ jsonHelper.py
๐Ÿ“„ package.json
๐Ÿ“„ README.md
๐Ÿ“„ TODO.md
๐Ÿ“„ yarn.lock
๐Ÿ“„ README.md

Zero-knowledge Tax Audits

File Stucture

  • frontend/ has all the page website stuff
  • circuits/ has the circom circuits (and lots of wasted test files etc)
  • frontend/pages/prove.tsx: the made NextJS page for taking a signed tax JSON and creating a redeacted version JSON + zk proof pair.
  • frontend/utilities/json.ts: a bunch of tools that parse the inputted JSON.
  • frontend/utilities/crypto.ts: a bunch of tools to allow us to extract signatures & pubkeys as well as using snark friends poseidon hashes.
  • circuits/circuits/jsonFull.circom: the main circom circuit that proves the redacted JSON is valid.
  • circuits/circuits/build.sh: compiles the jsonFull.circom with snarkjs to produce jsonFull_final.zkey.
  • frontend/public/worker.js: this is a async worker that performs the snarkjs groth16 proof using the jsonFull circuit.
  • frontend/pages/verify.tsx: as yet incomplete page to verify the produced proofs
  • frontend/pages/api/verify.ts: async worker (via API) that performs the snarkjs groth16 verify step.

Files that may be redundant:

  • frontend/helpers/*
  • circuits/utilities
  • circuits/build.sh
  • circuits/json-verify.circom

Quirks to be aware of

  • The signature is stored as a key-pair in JSON with each character of the hash being stored as an int.