Giter VIP home page Giter VIP logo

rajasthanhack4.0's Introduction

Decentralised Voting System

YouTube Video Link

EasyVote video

What is Decentralised Voting System?

Voting framework where people can vote on questions and choices.

How it will help me?

One of the most critical ways that individuals can influence governmental decision-making is through voting. Fair and accurate elections are vital for a healthy democracy. Many voters choose not to vote to avoid travelling far and waiting in long queues. Decentralised Voting System gives you the freedom to vote from wherever you wish you, while ensuring security and transparency.

Why is the blockchain necessary for voting?

Most voting systems suffer from 2 major problems - lack of transparency and security. No one knows if the counting process is correct and no one knows how many of the votes are not fake. Blockchain, inherently, ensures that the counting process is perfect since every vote is recorded on it. But there is a downside to it. How to ensure privacy in a system where everything is transparent? Here comes in blind signatures (help in secret ballots). It allows you to be cast your vote without linking your indentity to your vote.

alt text

alt text

Thus with blockchain and blind signatures (which work off-chain), you can vote from anywhere but be assured that the system is fair.

How does it work?

No central authority except to verify voter validity. The process begins with the voter registering himself to the central authority (the owner of the localbody) using the blind signature registeration process. After generating the unblined signed secret the voter waits for a cooldown period and send a transaction to the LocalBody contract from an anonymous address with his secret and the unblinded signature. The LocalBody is notified of this event through Ethereum Logs and it veririfes the signature and approves the anonymous voter address to vote.

Then the owner of the localbody can set up a poll which has yes/no options or multiple choice options (representing the different candidates for eg.) The voter can now use the anonymous address to cast a vote on the Ethereum blockchain. Once a vote is cast it cannot be changed, nor can a vote be cast after the deadline. The voter can see the results real time after voting.

alt text

How to run it?

  1. Run npm install
  2. Run testrpc (at localhost: 8545)
  3. Run truffle compile
  4. Run truffle migrate --reset
  5. Run npm run dev
  6. Navigate to localhost:8080 for the main page
  7. Navigate to localhost:8080/voter.html?id=<voter_id> to view voter pages
  8. By default 8 voters are provided to test the setup

How to run the Blind Token prototype

Requirements: python3, crypto python pacakage

  1. Run scripts/blindSecret.py <your_secret_string> <random_number>
  2. You pass the generated blinded secret to the authority to sign: scripts/signBlindSecret.py <blinded_secret>
  3. The authority returns the signed blinded secret to you and you generate the unblinded signature of your secret: scripts/unblindSignedSecret.py <signed_blinded_secret> <same_random_number>
  4. Now you submit your secret and its unblinded signature to the authority to verify: scripts/verifySignature.py <your_secret> <unblinded_signature>
  5. Any changes to your secert or your unblinded signature passed to the authority to verify will result in a signature mismatch

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.