-
Notifications
You must be signed in to change notification settings - Fork 4
Election verifier
Original source
The election verifier analyzes the data published in an election to enable universal verifiability. In end-to-end verifiability terms, the election verifier covers the recorded-as-cast and counted-as-recorded properties.
This verification takes as input the trustee verification keys, the ballot ciphertexts input to the system and the plaintexts output by the system. The verification passes only if it can be proven that the plaintexts are exactly the result of the correct decryption of a set of ciphertexts that is equivalent to the input set of ciphertexts. Note
- Two sets of ciphertexts are equivalent if they contain equivalent ciphertexts.
- Two ciphertexts are equivalent if they encode the same plaintexts, irrespective of randomness.
- Correct decryption is defined with respect to the trustee verification keys.
Given Sequent’s use of a mixnet verification translates to:
- The ballot ciphertexts are the input to the first link in the mixing chain.
- The proof of shuffle for each link in the mixing chain verifies.
- The ciphertexts in the last link of the mixing chain correspond to the ciphertexts input to decryption.
- The proof of decryption linking the decryption factors to the input ciphertexts verifies with respect to the trustee verification keys.
- The combination of decryption factors matches the plaintexts.
This verification takes as input an individual ballot hash and the ballot ciphertexts input to the system. The verification passes only if a ciphertext exists in the ballot ciphertexts whose hash is equal to the input ballot hash.
This verification combines the two verifications above, taking as input an individual ballot hash, the trustee verification keys, the ballot ciphertexts input to the system and the plaintexts output by the system. The verification passes only if both the above verifications pass; this guarantees that the specified ballot was included in the correctly counted result.
The election verifier implements concrete checks that in combination support the verification objectives above. Additional consistency checks are also performed to detect deviations from expected behavior.
These are checks that are made for the session as a whole, and not individual tallying batches.
- CONFIGURATION_VALID
This check verifies that the election configuration artifact is valid:
- The number of trustees ranges from 2 to 12 (crate::protocol2::MAX_TRUSTEES).
- The threshold ranges from 2 to the number of trustees.
- There are no duplicate trustees.
- MESSAGE_SIGNATURES_VALID
All message signatures verify, with respect to their specified sender public key present in the configuration referenced in 4.2.
- MESSAGES_CFG_VALID
All messages refer to the same configuration referenced in 4.2.
- PK_VALID
- The public key has been correctly constructed.
- The trustee verification keys have been correctly constructed.
- All trustees have signed the public key statement, which asserts correctness of private shares (VSS).
The following checks will be made for each tallying batch.
- BALLOTS_PK_VALID
- The ballots artifact message signature verifies with respect to the protocol manager’s public key.
- The message includes the hash of the ballot ciphertexts and the hash of the public key checked by 4.
- MIX_START_VALID
The first link in the mixing chain takes the ballots referenced in 5 as input.
- MIX_END_VALID
The last link in the mixing chain outputs the ciphertexts input to decryption referenced in 10.
- MIX_VALID
- The proof of shuffle for each link in the chain verifies.
- The number of links in the mixing chain is equal to the threshold specified in the configuration referenced in 1.
- MIX_UNIQUE_VALID
Each of the links in the mixing chain was produced by a different trustee.
- DECRYPTION_VALID
The proof of decryption linking the decryption ciphertexts to the decryption factors verifies with respect to the public key information referenced in 4, 5.
- PLAINTEXTS_VALID
The combination of decryption factors referenced in 10 matches the published plaintexts.
Usage: verify [OPTIONS] --server-url <SERVER_URL> --board <BOARD>
Options:
--server-url <SERVER_URL> URL of the bulletin board server
--board <BOARD> Name of the board to audit
--ballot-hash <BALLOT_HASH> Checks inclusion of the given ballot
-h, --help Print help
The --board, --server-url parameters are required. If the --ballot-hash parameter is present the verifier will run counted-as-cast verification. Otherwise counted-as-recorded verification will be run.
The verifier will output progress messages and a summary at the end of the run.