Privacy Preserving Voting: With the Help of John Napier’s Logs

--

In many elections we need to count votes, but preserve the privacy of the voters. With additive homomorphic encryption we can create a voting system where we can count encrypted votes and determine the total votes cast for each party. Let’s say there are voters in Scotland and Ireland, and they have the following votes:

Scotland: Enc(100 Votes)

Ireland: Enc(25 Votes)

How do we determine the total votes, without revealing what each country voted? Well additive homomorphic encryption makes this possible. The normal ElGamal process — and which uses discrete logs — is this:

This method supports a multiplier and divisor operation. We can make it into additive:

We now can brute force to find a value which matches g^i, and where i will be M1+M2. In this way we can count the results of the vote, without revealing their votes. Here is the code [here]:

package main

--

--

Prof Bill Buchanan OBE FRSE
ASecuritySite: When Bob Met Alice

Professor of Cryptography. Serial innovator. Believer in fairness, justice & freedom. Based in Edinburgh. Old World Breaker. New World Creator. Building trust.