[][src]Crate cryptoballot

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.

Glossary:

  • Transaction 1: Election Transaction - Defines an election, created by an election authority.
  • Transaction 2: Vote Transaction - Posted by a voter to cast a vote in an election.
  • Transaction 3: Secret Share Transaction - Posted by a trustee to allow votes to be decrypted and viewed.
  • Transaction 4: Decryption Transaction - Decrypt a vote, allowing it to be tallied.
  • Election Authority - Creates an Election Transaction and distributes the encryption secret to trustees via Shamir Secret Sharing.
  • Trustee - Holds a vote-decryption secret share, posts Secret Share Transactions.
  • Authenticator - Certifies that a voter can vote an election and ballot using blind-signing.
  • Ballot - A set of contests for an election, usually restricted to a geographic area.

Structs

AuthPackage

The Auth Package triplet of election-id, ballot-id, and voter public key

AuthPublicKey

RSA Public Key for blind signing

Authentication

An Authentication is returned by an authenticator, clearing the voter to vote.

Authenticator

An Authenticator is responsible for authenticating a voter as allowed to vote a specific ballot in an election.

DecryptionTransaction

Transaction 4: Decryption

ElectionTransaction

Transaction 1: Election

Identifier

Transaction identifier

SecretShareTransaction

Transaction 3: SecretShare

Signed

A generic signed transaction

Trustee

A trustee is responsible for safeguarding a secret share (a portion of the secret vote decryption key), distributed by the election authority via Shamir Secret Sharing.

VoteTransaction

Transaction 2: Vote

Enums

Error

Error types

SignedTransaction

A signed transaction

Transaction

An unsigned transaction

TransactionType

A transaction type

ValidationError

Transaction Validation errors

Functions

deal_secret_shares

Deal the election secret into shares, ready to be distributed to trustees.

decrypt_vote

Decrypt the vote from the given recovered decryption key.

encrypt_vote

Encrypt a vote with the public key provided by the election transaction (ElectionTransaction.encryption_key)

generate_keypair

Generate an ed25519 keypair

recover_secret_from_shares

Given a set of secret shares recovered from all SecretShareTransaction, reconstruct the secret decryption key. The decryption key can then be used to decrypt votes and create a DecryptionTransaction.