Skip to content

CyberMer/Privacy-Preserving-Polling-App

Repository files navigation

Privacy-Preserving Polling App

A web-based polling system that uses Paillier homomorphic encryption to ensure complete privacy of individual votes while allowing server-side tallying of results.

Installation

  1. Create virtual environment

    python3 -m venv venv
    source venv/bin/activate
  2. Install dependencies

    pip install -r requirements.txt
  3. Run the application

    python src/main.py
  4. Access the application

API Reference

Method Endpoint Description
POST /api/polls Create a new poll
GET /api/polls List all polls
GET /api/polls/{id} Get poll details
POST /api/polls/{id}/close Close a poll

Voting

Method Endpoint Description
POST /api/polls/{id}/vote Submit an encrypted vote
GET /api/polls/{id}/verify/{voter_id} Verify vote integrity

Results

Method Endpoint Description
GET /api/polls/{id}/results/encrypted Get encrypted vote tallies
POST /api/polls/{id}/results/decrypted Get decrypted results

Architecture

┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐
│   Web Client    │    │   Flask API     │    │   Database      │
│                 │    │                 │    │                 │
│ - Vote UI       │◄──►│ - Encryption    │◄──►│ - Polls         │
│ - Results View  │    │ - Tallying      │    │ - Encrypted     │
│ - Poll Creation │    │ - Key Mgmt      │    │   Votes         │
└─────────────────┘    └─────────────────┘    └─────────────────┘

Demo Results

The comprehensive demo shows:

  • ✅ Homomorphic encryption working perfectly
  • ✅ Privacy-preserving vote tallying
  • ✅ Zero-knowledge proof verification
  • ✅ Secure poll management
  • ✅ Real-time encrypted analytics
  • ✅ Password-protected decryption
  • ✅ Double voting prevention

TODO

  • Advanced ZKP protocols (zk-SNARKs)
  • Multi-choice voting support
  • Blockchain integration
  • Mobile app interface
  • Advanced analytics dashboard
  • Voter registration system

About

Privacy-preserving polling system using Paillier homomorphic encryption for voting with encrypted tallying

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published