A web-based polling system that uses Paillier homomorphic encryption to ensure complete privacy of individual votes while allowing server-side tallying of results.
-
Create virtual environment
python3 -m venv venv source venv/bin/activate -
Install dependencies
pip install -r requirements.txt
-
Run the application
python src/main.py
-
Access the application
- Web interface: http://localhost:5000
- API documentation: http://localhost:5000/api
| 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 |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/polls/{id}/vote |
Submit an encrypted vote |
| GET | /api/polls/{id}/verify/{voter_id} |
Verify vote integrity |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/polls/{id}/results/encrypted |
Get encrypted vote tallies |
| POST | /api/polls/{id}/results/decrypted |
Get decrypted results |
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Web Client │ │ Flask API │ │ Database │
│ │ │ │ │ │
│ - Vote UI │◄──►│ - Encryption │◄──►│ - Polls │
│ - Results View │ │ - Tallying │ │ - Encrypted │
│ - Poll Creation │ │ - Key Mgmt │ │ Votes │
└─────────────────┘ └─────────────────┘ └─────────────────┘
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
- Advanced ZKP protocols (zk-SNARKs)
- Multi-choice voting support
- Blockchain integration
- Mobile app interface
- Advanced analytics dashboard
- Voter registration system