CryptoBallot is a cryptographically secure online voting system, providing secure anonymous voting with end-to-end verifiability.
It is currenly under active development and is not production ready.
CryptoBallot is fundamentally a transaction processor and validator. When transactions are validated in order, it creates an end-to-end verifiable voting system.
- Transaction 1: Election Transaction - Defines an election, created by an election authority.
- Transaction 2: KeyGenCommitment Transaction - Trustee commitment to participate in this election.
- Transaction 3: KeyGenShare Transaction - Trustee Key Generation Share - needed to generate Election Encryption Key.
- Transaction 4: KeyGenPublicKey Transaction - Trustee’s computation of the Election Encryption Key.
- Transaction 5: EncryptionKey Transaction - The Encryption Key that will be used by voters to encrypt their vote.
- Transaction 6: Vote Transaction - Voter’s encrypted vote.
- Transaction 7: VotingEnd Transaction - Denotes the end of voting.
- Transaction 8: Mix Transaction - Shuffled and mixed vote for a single contest, created by a trustee.
- Transaction 9: PartialDecryption Transaction - A partially decrypted vote from a trustee.
- Transaction 10: Decryption Transaction - A fully decrypted vote .
- Election Authority - Creates an Election Transaction.
- Trustee - A group of trustees collectively create the encryption-key, decrypt votes, and run the mixnet. Generally ⅔ of trustees are required to be honest for the CryptoBallot protocol to function.
- Authenticator - Certifies that a voter can vote an election and ballot.
- Contest - A single question that voters are voting on.
- Ballot - A set of contests, usually restricted to a geographic area. A single contest can exist across multiple ballots.
The Auth Package triplet of election-id, ballot-id, and voter public key
RSA Public Key for blind signing
An Authentication is returned by an authenticator, clearing the voter to vote.
An Authenticator is responsible for authenticating a voter as allowed to vote a specific ballot in an election.
Transaction 10: Decryption
Transaction 1: Election
Transaction 5: EncryptionKey
Transaction 2: KeyGenCommitment
Transaction 4: KeyGenPublicKey
Transaction 3: KeyGenShare
A simple store that uses an in-memory BTreeMap
Transaction 8: Mix
Transaction 9: Partial Decryption
A generic signed transaction
A group of trustees collectively create the encryption-key, decrypt votes, and run the mixnet.
Transaction 6: Vote
Transaction 7: VotingEnd
A signed transaction
An unsigned transaction TODO: Implment From going for specific tx to this emum and vice versa
A transaction type
Transaction Validation errors
All CryptoBallot transactions implement this trait
A transaction store
Decrypt the vote from the given partial decryptions.
Encrypt a vote with the public key provided by the encryption_key transaction (EncryptionKeyTransaction.encryption_key)
A convenience function for getting an encrypted-vote from some upstream transaction ID. The upstream transaction should either be a mixnet or a vote transaction.
Generate an ed25519 keypair
Do a mixnet shuffle This is an expensive and time-consuming operation, so should ideally be offloaded to it’s own thread
Verify mixnet shuffle