Skip to content

Repository files navigation

SiVote Home Sender

A tiny, standalone CLI companion to the SiVote platform. It lets an election commission send voting invites from their own computer, so the central voting server never learns which voter received which code — the strongest secrecy posture (an alternative to the hosted SiVote Sender). You generate the single-use codes on the SiVote Engine, then distribute them locally over your own SMTP with these scripts. No framework, no cloud.

Dependencies

Setup

  1. Install PHP

  2. Install Composer

  3. Install dependencies

    composer install
    
  4. Copy and configure config file

    cp config.ini.example config.ini
    

Basic Usage

  1. Create your email template file

  2. Add your email list (as text file with one email per line)

  3. Determine total number of voters

  4. Download the same number of codes as voters from the online system

  5. Run script to send emails

    php sendInvitesToEmails.php --email=email_list.csv --codes=codes_list.csv --count=400 --template=ballot.txt --subject="Ballot"
    

Caching codes

Because sometimes emails do not arrive you may wish to hold on to the map between codes email emails for a short time to confirm everyone got their emails.

To do this use sendInvitesToEmailsWithCache.php with the same arguments as described in Basic Usage.

This will generate a SENSITIVE_MAPPED_CODES_date.csv file.

Resending code&link via email

If someone does not receive the email you may resend it with

   php resendFromCache.php --cache_file=CACHE_FILE.csv --email=name@example.org --template=ballot.txt --subject="Ballot"

Resending code&link via other method

If the email still does not arrive you may wish to forward the code/link combination to the voter in another manor (for example via SMS or encrypted chat app).

This requires the voter to give permission to a member of the voting commission to learn of the voters code as sending it will require seeing it.

If the voter consents you can find the code&link by using

   php getCodeForEmail.php --cache_file=CACHE_FILE.csv --email=name@example.org

This will give you the code&link for the voter without the need to browse the file, seeing other code/email combinations.

This information can then be sent to the affected voter.

A note on the sensitive cache

The SENSITIVE_MAPPED_CODES_*.csv file links codes to emails. Keep it only as long as needed to confirm delivery, store it on the local machine only, and delete it afterwards — its whole point is that this mapping never reaches the server.

License

MIT — see LICENSE. Bundles PHPMailer under LGPL-2.1; see NOTICE. Feedback & support: info@ip21.si

About

SiVote Home Sender — standalone CLI for election commissions to distribute ballot invites from their own computer (Level 2/3 secrecy).

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages