The Hybrid BlockChain-based E-Voting System (HBPEVS) is a revolutionary voting system designed to be transparent, permissioned, append-only, and decentralized. This system allows people to vote easily with little to no assistance and verify their votes anonymously without revealing their identity. The system is tamper-proof and does not depend on a single point of failure. It can coexist with the current electoral system and facilitates a complete power structure to prevent any unauthorized activity.
HBPEVS combines the higher security, transparency, anonymity, and immutability of a public blockchain with the high efficiency and regulations of a private blockchain. This hybrid approach ensures compatibility with the public policy of the electoral system.
- Transparency: Every vote is recorded on the blockchain, ensuring full transparency and traceability.
- Decentralized: No single point of failure; the system is distributed across multiple nodes.
- Permissioned: Only authorized users can participate in the voting process.
- Append-Only: Once a vote is recorded, it cannot be altered or deleted.
- Anonymity: Voters can verify their votes without revealing their identity.
- Tamper-Proof: The blockchain ensures that votes cannot be tampered with.
- High Efficiency: The private blockchain component ensures efficient processing of votes.
- Regulations: Compliance with electoral regulations and public policy.
- Blockchain: Utilizes a hybrid blockchain approach combining public and private blockchain features.
- LevelDB: A fast key-value storage library for storing blockchain data.
- Libp2p: A peer-to-peer networking library for decentralized communication.
- Gin: A web framework for building the API endpoints.
- Go: The programming language used for the implementation.
- Cryptography: Uses SHA-256 for hashing and Ed25519 for digital signatures.
- Base58: Encoding format used for keys and hashes.
- Testing: Benchmarking and testing frameworks to ensure performance and reliability.
- Go (version 1.16 or later)
- LevelDB
- Libp2p
- Gin
-
Clone the repository:
git clone https://github.com/JonyBepary/pqhbevs_hac.git cd pqhbevs_hac
-
Install dependencies:
go mod tidy
-
Run the application:
go run main.go
-
Add Vote:
POST /add_vote
- Adds a new vote to the blockchain.
- Parameters:
vote
,pscode
,digest
,po_id
,po_privkey
,verbose
-
Generate Genesis Block:
POST /generate_genesis
- Initializes the genesis block.
- Parameters:
pscode
,seed
,start
,duration
,config
,verbose
-
NID Server Benchmark:
go test -benchmem -run=^$ -bench ^Benchmark_NID_SERVER$ github.com/sohelahmedjoni/pqhbevs_hac/test -benchtime 100x >> nid_data.txt
-
Block Generation Rate Benchmark:
go test -benchmem -run=^$ -bench ^Benchmark_BlockGenearationRate$ github.com/sohelahmedjoni/pqhbevs_hac/test -benchtime 100x >> newblock_data.txt -timeout 60m
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.