Skip to main content

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.

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.

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

1

Register voters

Submit each voter’s email address via POST /voters/register. The system stores it and waits for the election to start.
2

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.
3

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.
4

Tally and verify

Call POST /voting/end-vote to decrypt and count all ballots. Anyone can then check GET /results/tally for totals, and individual voters can confirm their vote was counted with POST /results/verify-vote.

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

Build docs developers (and LLMs) love