Calling this endpoint closes the election and produces the final results. The server marks the election status asDocumentation 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.
vote_ended, then retrieves every encrypted ballot from the anonymizer service. Each ballot is decrypted using the counter’s RSA private key. The counter service then verifies the admin’s digital signature on each ballot and checks the SHA-256 hash of the voter’s N2 nonce. Ballots that pass both checks are counted; those that fail are logged as invalid_signature or invalid_n2 respectively. The endpoint returns a complete breakdown alongside the candidate tally.
Request
Response
Always
"success" on a 200 response.Always
"Votes counted successfully" on a 200 response.Breakdown of all processed ballots.
Example response
HTTP status codes
| Code | Meaning |
|---|---|
200 | Election closed and ballots tallied successfully. |
500 | An unexpected error occurred while counting votes, e.g. a decryption failure. |
Example
The tally produced by this endpoint is also available later via
GET /results/tally without needing to re-run the counting process.