Unitychain / zkvote-node

Using ZK-SNARK to Implement Decentralized Anonymous Voting on p2p Network

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

zkvote: Using ZK-SNARK to Implement Decentralized Anonymous Voting on p2p Network

zkvote is a powerful tool for anonymous voting. It uses a cryptographic function called a ZK-SNARK to keep the voter from revealing its identity. It is also built on a peer-to-peer network so that no single entity or authortity can control the access or result of the voting. Moreover, zkvote utilizes a developing standard called Decentralized Identifier (DID) and Verifiable Credential (VC) to prove the validity of the identity.

How it Works?

  1. Generate keypair
    • Use zkvote-web to generate keypair / DID / identity commitment
    • Doesn't support import at this moment
    • Store in browser localStorage
  2. Propose/Join
    • Proposer
      • Use zkvote-web to propose a new subject to be voted on
    • Joiner
      • Use zkvote-web to join an existing subject
  3. Exchange VC
    • Joiner sends its identity commitment to proposer via other network
      • For example: email, SMS...
    • Proposer receives the identity commitment of the joiner from the network
    • Proposer generates a verifiable credential (VC) for joiner and sends it to joiner. This VC includes:
      • Subject hash
      • identity commitment of joiner
      • Signature of issuer
      • public key of issuer
    • Joiner receives the VC
  4. Vote
    • Proposer
      • Generates the proof that corresponds to the subject
      • Uploads the proof and the VC to zkvote-node
    • Joiner
      • Verify the VC for the subject
      • Generates the proof that corresponds to the subject
      • Uploads the proof and the VC to zkvote-node
  5. Open
    • Use zkvote-web to see the latest result

Contribution

See this document for more technical details

About

Using ZK-SNARK to Implement Decentralized Anonymous Voting on p2p Network

License:MIT License


Languages

Language:Go 100.0%