All Projects → eddieoz → haal

eddieoz / haal

Licence: Apache-2.0 license
Hääl - Anonymous Electronic Voting System on Public Blockchains

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to haal

baseline
The Baseline Protocol is an open source initiative that combines advances in cryptography, messaging, and distributed ledger technology to enable confidential and complex coordination between enterprises while keeping data in systems of record. This repo serves as the main repo for the Baseline Protocol, containing core packages, examples, and r…
Stars: ✭ 565 (+488.54%)
Mutual labels:  protocol, smart-contracts, zk-snarks, zero-knowledge-proofs
nifty-game
🃏🎮A NFT(ERC721) card game build on Ethereum, Truffle, Ganache and hosting on IPFS.
Stars: ✭ 222 (+131.25%)
Mutual labels:  dapp, smart-contracts, ganache
Purple
Official Rust implementation of the Purple Protocol
Stars: ✭ 85 (-11.46%)
Mutual labels:  protocol, smart-contracts
Set Protocol Contracts
🎛 Set Protocol Smart Contracts
Stars: ✭ 151 (+57.29%)
Mutual labels:  protocol, smart-contracts
FranklinPay-iOS
Secure Dollar Wallet
Stars: ✭ 35 (-63.54%)
Mutual labels:  dapp, smart-contracts
Kadence
⚠️ KADENCE HAS MOVED TO GITLAB ⚠️
Stars: ✭ 363 (+278.13%)
Mutual labels:  protocol, proof
Protocol
⛓ Dev Protocol is an open source middleware for creator's sustainability.
Stars: ✭ 56 (-41.67%)
Mutual labels:  protocol, smart-contracts
Merkletreejs
🌱 Construct Merkle Trees and verify proofs in JavaScript.
Stars: ✭ 238 (+147.92%)
Mutual labels:  protocol, smart-contracts
Awesome Buggy Erc20 Tokens
A Collection of Vulnerabilities in ERC20 Smart Contracts With Tokens Affected
Stars: ✭ 251 (+161.46%)
Mutual labels:  dapp, smart-contracts
cheezyverse
Cheeze Wizards is the world's first battle royale on the blockchain (with cheese!)
Stars: ✭ 38 (-60.42%)
Mutual labels:  dapp, smart-contracts
zeneth
🏵️ Let Your ETH Chill — Gasless Ethereum account abstraction with Flashbots
Stars: ✭ 112 (+16.67%)
Mutual labels:  dapp, smart-contracts
ampleforth-contracts
Smart contracts for Ampleforth Protocol (working name uFragments)
Stars: ✭ 238 (+147.92%)
Mutual labels:  protocol, smart-contracts
kleros
Kleros smart contracts
Stars: ✭ 203 (+111.46%)
Mutual labels:  protocol, smart-contracts
Element
DID Method implementation using the Sidetree protocol on top of Ethereum and IPFS
Stars: ✭ 80 (-16.67%)
Mutual labels:  protocol, dapp
Motoro
Smart contracts for decentralized rentals of vehicles.
Stars: ✭ 96 (+0%)
Mutual labels:  protocol, dapp
Gun
An open source cybersecurity protocol for syncing decentralized graph data.
Stars: ✭ 15,172 (+15704.17%)
Mutual labels:  protocol, dapp
Credits
Credits(CRDS) - An Evolving Currency For An Evolving Society
Stars: ✭ 14 (-85.42%)
Mutual labels:  protocol, smart-contracts
Erc20 Generator
Create an ERC20 Token for FREE in less than a minute with the most used Smart Contract Generator for ERC20 Token. No login. No setup. No coding required.
Stars: ✭ 202 (+110.42%)
Mutual labels:  dapp, smart-contracts
Web3swift
Elegant Web3js functionality in Swift. Native ABI parsing and smart contract interactions.
Stars: ✭ 237 (+146.88%)
Mutual labels:  dapp, smart-contracts
ArianeeMaster
Smart contracts & tools for Arianee Protocol
Stars: ✭ 30 (-68.75%)
Mutual labels:  protocol, dapp

Node.js CI

Hääl

Anonymous Electronic Voting System on Public Blockchains

Hääl means voice in Estonian. Voice means power of people.

This code is a proof-of-concept of the protocol presented on the whitepaper located at the root folder. It describes a full process for an e-voting system, using public blockchains and without a mixnet or an oracle for tallying the votes.

The full protocol makes use of:

  • Zero-knowledge proofs (with zk-snarks verified on-chain)
  • Homomorphic encryption (Paillier protocol + zk)
  • Stealth addresses (as proposed by Peter Todd, but ported to ethereum)
  • Encrypted notes (e.g Zcash, AZTEC)
  • Cryptography challenges (based on Sigma protocol)
  • Digital signatures
  • Ethereum (or another blockchain capable of running dApps)
  • other technologies described on the whitepaper

Working in progress. No access control layers implemented in this PoC to avoid overhead, implement it as your needs. All contributions are welcome.

Installation

Pre-requisites

  • ganache-cli ^6.3.0 or Ganache ^1.2.2
  • Node 8
  • Solidity ^0.4.5
  • Yarn ^1.13.0

Setup

# yarn install && yarn truffle build && yarn ganache-cli

Run

(on a new terminal)
# yarn truffle test

Manual installation (for debugging purposes)

Install and set the correct version of NodeJS.

$ apt-get install node npm
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash 
$ nvm install 8
$ nvm use 8

Download third-party dependencies.

$ curl -o /usr/bin/solc -fL https://github.com/ethereum/solidity/releases/download/v0.4.25/solc-static-linux
$ chmod u+x /usr/bin/solc

Get https://github.com/trufflesuite/ganache/releases/download/v1.2.2/ganache-1.2.2-x86_64.AppImage
$ chmod +x ganache-1.2.2-x86_64.AppImage

Run

$ npm install -Wno-cast-function-type 2> debug.log
$ node ./node_modules/truffle/build/cli.bundled.js build
$ ./ganache-1.2.2-x86_64.AppImage (on a new terminal)
$ node ./node_modules/truffle/build/cli.bundled.js test

Compiler warnings

Is expected to receive the warning below during contracts compilation:

haal/contracts/HAAL/haal.sol:2:1: Warning: Experimental features are turned on. Do not use experimental features on live deployments.
pragma experimental ABIEncoderV2;
^-------------------------------^

That message appears because we're using an experimental method to fill arrays (bytes[]):

function addVote(
        bytes[] _president, 
        bytes[] _senator, 
        bytes[] _stateGovernor,
        ^-----^
[...]

function getVotes(uint _index) view public returns(bytes[], bytes[], bytes[])
                                                   ^-----------------------^

Apache License https://www.apache.org/licenses/LICENSE-2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].