The Crypto E-Voting API is a FastAPI-based back-end that powers a cryptographically secure electronic voting system. It combines RSA blind signatures, session-scoped nonce credentials (N1 and N2), and an anonymizer pipeline so that no single party — including the administrator — can link a voter’s identity to their ballot.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Crypto-Project-ENSTA/back-end/llms.txt
Use this file to discover all available pages before exploring further.
Quick start
Run the API locally and cast your first test vote in minutes
How it works
Understand the five-party protocol that keeps votes private
API reference
Explore every endpoint: voters, voting session, results, and config
Guides
Step-by-step workflows for registration, casting votes, and tallying results
How the voting flow works
Register voters
Submit each voter’s email address via
POST /voters/register. The system stores it and waits for the election to start.Start the election
Call
POST /voting/start-vote. The server generates unique N1 and N2 nonces for every voter and delivers them by email. The voting phase begins.Cast a ballot
Each voter verifies their N1 code with
POST /voters/check_n1, then submits their encrypted ballot with POST /voters/submit_vote. The RSA blind-signature protocol hides their identity from the counter.Key guarantees
Ballot secrecy
RSA blind signatures ensure the administrator signs ballots without ever seeing their content
Double-vote prevention
Session-scoped N1 verification is consumed on first use, preventing replay attacks
Individual verifiability
Every voter can confirm their vote was received and counted using their N2 fingerprint
Anonymized ballots
The anonymizer pipeline decouples voter identity from submitted encrypted ballots