Quantum-Secure Voting System
Project description
SAWTY | صوتي
Quantum-Secure Electronic Voting
Motivation
SAWTY: Privacy, security, authenticity.
"My Vote, My Voice" is building a fully quantum-secure electronic voting system that redefines trust in decision-making.
We ensure end-to-end ballot security, anonymity, consensus, and voter authentication, setting a new global standard for trustworthy elections.
Features
- Quantum Key Distribution (QKD): secure keys for ballot encryption.
- Quantum-Safe Digital Signatures: voter authentication without compromising anonymity.
- Encrypted, Anonymized Ballots: votes are end-to-end encrypted with zero leakage.
- Blockchain Consensus: votes are recorded only after a Byzantine agreement between tallying nodes.
- Built-in Simulation Tools: easily test small- to medium-scale elections with quantum-secure infrastructure.
Installation
pip install sawty
Or clone the repository directly:
git clone https://github.com/AdrianHarkness/quantumvoting.git
cd quantumvoting
pip install .
Usage Example
You can quickly simulate a quantum-secure election by running:
import sawty
import time
# Define choices and voters
CHOICES = ["YES", "NO", "ABSTAIN"]
VOTER_CHOICES = {
"Aya": "YES",
"Bassem": "NO",
"Charlie": "ABSTAIN",
"Dana": "NO",
"Ella": "NO",
}
QKD_KEY_LENGTH = 32
# Initialize nodes
voters = [Voter(name, qkd_key_length=QKD_KEY_LENGTH) for name in VOTER_CHOICES.keys()]
voter_dict = {voter.id: voter.public_key for voter in voters}
auth = Authenticator("AuthNode", voter_dict, qkd_key_length=QKD_KEY_LENGTH)
talliers = [Tallier(f"TallyNode{i+1}", qkd_key_length=QKD_KEY_LENGTH) for i in range(3)]
blockchain = Blockchain(talliers)
# Quantum key distribution
for voter in voters:
voter.establish_qkd_channel(auth)
for tally in talliers:
voter.establish_qkd_channel(tally)
for tally in talliers:
auth.establish_qkd_channel(tally)
# Voting process
for voter in voters:
voter.sign_identity()
choice = CHOICES.index(VOTER_CHOICES[voter.name])
vote_payload = voter.send_vote(choice, auth, talliers[0])
signature_hex, forwarded_vote = auth.forward_vote(vote_payload, talliers[0], voter)
for tally in talliers:
vote = tally.receive_vote(forwarded_vote, auth)
tally.add_vote(signature_hex, vote)
# Blockchain and consensus
snapshot = talliers[0].received_votes.copy()
timestamp = time.time()
blocks = [blockchain.propose_block(snapshot, t, fixed_creator="TallyConsensus", fixed_timestamp=timestamp) for t in talliers]
if blockchain.byzantine_agreement(blocks):
blockchain.display_chain()
blockchain.save_json("blockchain.json")
blockchain.simple_majority()
Project Status
✅ Local voting simulation fully functional
✅ Quantum Key Distribution with Eve attack simulation
✅ Blockchain consensus + vote majority calculator
✅ PyPI package publishing: https://pypi.org/project/sawty/0.1.0/
License
This project is licensed under the MIT License.
See the LICENSE file for details.
Acknowledgments
- Inspired by real-world challenges in secure elections.
- Based on quantum information protocols such as BB84 and Byzantine Fault Tolerance.
- Built to serve both academic research and real-world democracy.
🌟 Your voice matters. Your vote should too. 🌟
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sawty-0.1.1.tar.gz.
File metadata
- Download URL: sawty-0.1.1.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a141bdbb40f56f0eec99f9af04b5535634207f2958c22f9af513d1ba29237398
|
|
| MD5 |
3430d18d79a99a1ac7b0881392ee4f81
|
|
| BLAKE2b-256 |
77c58750d3773dbb427c2e82496025abe5722d66e70771a4ef8a6c73a6b5f66c
|
File details
Details for the file sawty-0.1.1-py3-none-any.whl.
File metadata
- Download URL: sawty-0.1.1-py3-none-any.whl
- Upload date:
- Size: 18.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00796983a2be1c5e3a3ff8701d7fb772ca821440b41b93e628600fae331b9d9f
|
|
| MD5 |
4aa4ba074ae8d6674db8c725988416db
|
|
| BLAKE2b-256 |
00787c01862d41411c1fcd875daa36adfb564fae3528909ba8e9fdde3fc6d4ea
|