Giter VIP home page Giter VIP logo

voting's Introduction

Blockchain Based Voting

It is python based implementation of blockchain technology to be used for e-Voting. By considering each vote as transaction to be added to pending_transaction, which is ready to be mined and included in a Block. And then the newly created block is added to the blockchain and broadcast to all the nodes.

Features

The blockchain :

  • Possibility of adding multiple nodes to the blockchain
  • Proof of Work (PoW)
  • Simple conflict resolution between nodes
  • Transactions with ecdsa signature verification

The blockchain client has the following features:

  • React based Web App
  • Here is Client README.md

The blockchain API server for miners

  • Block explorer
  • Transaction and Block verification & Broadcasting
  • Block mining
  • p2p communication

Installation

  • first clone the repository by typing this code into your terminal.
git clone https://github.com/ephremdeme/voting.git
  • simply cd voting and install all the dependencies from requirement.txt by typing this code
pip install -r requirements.txt
  • First export Flask api app using export FLASK_APP=api
  • on linux terminal run ./run.sh, this will apen a 6 tab terminal for 6 network nodes
  • or add each node like python BlockchainAPINode.py 5000
  • to add peer node to the blockchain, open postman POST request localhost:5000/register-node/broadcast and send json { "new_node": "http://localhost:5002"}
  • to start the blockchain client, go to cd client and execute: python clientGUI.py
  • finally open your browser and go to localhost:5000

Contribution

Any suggestion or contribution is welcome.

voting's People

Contributors

dependabot[bot] avatar ephremdeme avatar ephreme avatar kaifkhan1040 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

voting's Issues

Dashboard for miners

Implement a react dashboard component to be integrated to this system.
The component have to do this features:
-> Show miners "mine" button
-> Show miners "consensus" button, to interact with other peers and update the chain incase it is outdated
-> Show miners connect to other nodes option

all these components interact with flask API.
like localhost:5000/mine to mine new block,
localhost:5000/consensus to update the chain
localhost:5000//register-node/broadcast to register new nodes by giving its address

Hardcoded secret key

Hello,

We are a cybersecurity research group from the CISPA Helmholtz Center for Information Security and Caโ€™ Foscari University of Venice. We recently conducted an analysis of the session management used in your web application as part of our research. We have discovered a security vulnerability that we believe requires your attention.

Vulnerability Description:

After our analysis, we have identified that your application is using a hard-coded secret key that is leaked through GitHub. If operators who install your web application do not change this secret key, they are vulnerable to cookie forgeries. The cookie forgery attack allows an attacker, knowing the key used to sign a cookie, to forge new arbitrary cookies to impersonate and take over other accounts.

link to the relevant code part

Recommendation for Mitigation:

To address this vulnerability and enhance the security posture of your web application, we highly recommend setting the secret key from an environment variable. If the environment file is not shared on GitHub then this would force operators of your application to create their own key upon installation, forcing them to set their own secure secret key.

We hope this notification helps improve your security. Can you take a look into the relevant code parts and comment on the issue?

Error when requirements.txt is executed

I got the following error when i run requirements.txt:

Building wheels for collected packages: fastecdsa
Building wheel for fastecdsa (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-Ecksx5/fastecdsa/setup.py'"'"'; file='"'"'/tmp/pip-install-Ecksx5/fastecdsa/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-haF_w7
cwd: /tmp/pip-install-Ecksx5/fastecdsa/
...........................

Blockchain explorer to list each block

List each blocks in a container using bootstrap css. each block contains attributes, you can find out in block.py, and transactions in transaction.py. what i want to be done is for each block generate block display UI.

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.