Skip to content

tola95/BlockVote

Repository files navigation

BlockVote

Proof of concept for electronic voting in a blockchain fabric.

Setup

The following is a stripped down explanation of how the system works, ignoring technical and theoretical details.

Voting Properties

BlockVotes is a setup of contracts that enables elections to take place satisfying

  1. Privacy - Voters votes are kept private
  2. Eligibility - Only legitimate voters can vote, and only once
  3. Individual Verifiability - Voters can verify that their vote was actually counted
  4. Universal Verifiability - Voters can verify that the election outcome is the sum of all votes
  5. Fairness - No early results can be obtained.

Contracts

The contracts in use are

  1. Adminstrator: This contract handles voter and tallying authority registration and generates the mathematical parameters for the election.
  2. BulletinBoard: This contract stores the encrypted votes by voters, which can be accessed by all parties after a certain deadline.
  3. Authority: There must be at least two of these. They handle receiving votes from voters and tallying the sum of all votes at the end of the election.

Parties

BlockVotes has three parties that operate on the blockchain

  1. Administrator: This party handles registration and administration of the election. The Administrator controls the Administrator and BulletinBoard contracts.
  2. Authority: There must be at least two of these, one Authority per Authority contract. They handle tallying of votes after the election is over.
  3. Voter: These parties do not operate any contracts, but send transactions (votes) via the front end interface to an Authority to cast votes. Every voter has a PIN number which is known to them and the Administrator

Stages

BlockVotes has four stages:

  1. Setup Phase: In this phase the contracts are deployed to the Ethereum network by the party in control of them.
  2. Registration Phase: Voters send an encrypted copy of their PIN number to the Administrator (via Ethereum transaction generated by the front end). If the PIN is in the list of valid PINs the Administrator has, then the transaction returns contract information of the Authority to which the voter will cast votes to.
  3. Voting Phase: The voter then sends an encrypted copy of their vote to the Aduthority, who checks with the Administrator if the voter Ethereum address is eligible and if so, sends the encrypted vote to the bulletin board.
  4. Tallying Phase: All parties retrieve the list of encrypted votes from the Bulletin Board and sum the votes, revealing who the winner is.

Demo

A quick demo with one Administrator, three Authorities and three voters is available. It requires you to have both Ethereum testrpc https://github.com/ethereumjs/testrpc and the truffle framework http://truffleframework.com installed.

Steps

  1. Start testrpc
  2. In a separate console window run truffle migrate. This deploys the Administrator, Authority(i) and BulletinBoard contracts
  3. Open Demo.js in an editor
  4. On the truffle console, run each of the lines of Demo.js on the console

About

Proof of concept for electronic voting in a blockchain fabric.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages