Nationalized Voting System: Zero-Trust Architecture with Distributed Key Generation and Homomorphic Encryption
Abstract
This software serves as the reference implementation for the Nationalized Voting System, a zero-trust cryptographic framework for secure elections developed by Cory Ray Shelby. Written in Python 3.8+, this codebase demonstrates the practical application of advanced cryptographic primitives to solve key challenges in electronic voting, including voter anonymity, tally verification, and resistance to malicious actors. Code Modules & Functionality The implementation is structured into three primary modules: Hardened Cryptography (CryptoParams): Implements RFC 3526 2048-bit MODP Group 14 (approx. 112-bit security) for all cryptographic operations. Enforces subgroup confinement (Quadratic Residues) to prevent small-subgroup attacks. Includes a solve_discrete_log method using the baby-step giant-step algorithm (O(\sqrt{N})) for efficient tally recovery. ry. Zero-Trust Proofs (DisjunctiveZP, DecryptionProof): Context-Bound ZKPs: Generates Disjunctive Chaum-Pedersen proofs that bind the vote validity (0 or 1) to the voter's unique registration token, preventing replay and vote-copying attacks. Verifiable Decryption: Implements proof generation for partial decryptions, ensuring trustees cannot inject false data into the final count. . Distributed Key Generation (Trustee, DKG_Orchestrator): Simulates a 2-of-3 threshold authority using Feldman Verifiable Secret Sharing (VSS). Manages the decentralized generation of the election public key without ever reconstructing the private key in a single location. Coordinates homomorphic aggregation and distributed decryption of the final tally. ly. Simulation & Testing The included main execution block simulates a complete election lifecycle: DKG Setup: Initialization of trustees and generation of the global public key. Registration: Issuance of anonymous credentials via RSA Blind Signatures. Voting: Casting of encrypted ballots with context-bound proofs. Attack Simulations: Automated tests demonstrating resilience against Vote Copying/Replay Attacks (Eve) and Subgroup Injection Attacks (Mallory). Tallying: Homomorphic aggregation and verified
Fields of Study & Subjects
Internet Traffic Analysis and Secure E-voting
Cryptography and Data Security
Blockchain Technology Applications and Security
Publication details
- Journal / source
- Zenodo (CERN European Organization for Nuclear Research)
- Publication date
- 3 February 2026