https://github.com/unitychain/zkvote-node
Using ZK-SNARK to Implement Decentralized Anonymous Voting on p2p Network
https://github.com/unitychain/zkvote-node
dht golang kademlia libp2p p2p zero-knowledge-proofs zkp
Last synced: about 2 months ago
JSON representation
Using ZK-SNARK to Implement Decentralized Anonymous Voting on p2p Network
- Host: GitHub
- URL: https://github.com/unitychain/zkvote-node
- Owner: Unitychain
- License: mit
- Created: 2019-11-18T03:51:49.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-06-08T10:28:40.000Z (almost 6 years ago)
- Last Synced: 2024-06-21T08:51:01.889Z (almost 2 years ago)
- Topics: dht, golang, kademlia, libp2p, p2p, zero-knowledge-proofs, zkp
- Language: Go
- Homepage:
- Size: 88.5 MB
- Stars: 13
- Watchers: 5
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://hackmd.io/@juincc/B1QV5NN5S) for more technical details