GithubHelp home page GithubHelp logo

annon_voting's Introduction

Annonymous Voting with ZKP

This project tries to carry out annonymous voting using ZKPs. The premise is that a user can only vote once and will be private. We strive to demonstrate the capabilities of implementing zkp to perform annonymous voting (and checking if a user has voted only once) that can be implemented on any web app.

A user first generates two random keys, one is public and one is secret. Then they can connect to a UI that requires voting via a wallet like Metamask and sign a signature to obtain a registration ticket (essentially a commitment). This registration ticket gets stored in the backend database and store on the public merkle tree on a smart contract (it takes the id and commitment of the user).

Once validation is successful, the user can submit a vote. Now they are ready to submit their vote to the chain and it is verified by the merkle tree on the chain. The browser received the event that the commitment is submitted to the chain and generates the merkle tree and calculates the zk proof with its nullifier. This checks if the voter has voted before or not. Finally, their vote is officially submitted and logged on chain.

The image below illustrates the flow of the project.

alt text

annon_voting's People

Contributors

seansing9 avatar seansing avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.