There are lots of discussions about electronic voting vs paper-based voting and technical concerns about it. So here's another one.

There are some concepts that are very similar to cryptocurrencies like bitcoin. Suppose such open distributed cryptography-based voting system. One popular concern about such system is that results of voting will be available to all users all the time. Instead, the results should be kept in secret until the voting is complete.

Is that technically possible to solve this problem? How?

For example, suppose that users of such system can only make votes and they are not able to decrypt the whole database.

There's also a private key that allows to decrypt the database (but doesn't allow to change the database). This key is stored by a person on an offline device. Since the voting is complete this key is getting published so everybody can observe the results.

Is that a naive approach? Is there a better one?

1 Answer 1


That approach wouldn't work, since when the secret key is published, whoever did vote what, would still be available.

If you want to provide a simple voting system, its better that eligible voters, are given a key by you. This key are generated in a such fashion that it can be verified that its a valid voting key and not a key home-generated by some rogue user.

One thing to accomplish this, is that a random private key (Elliptic Curve) is generated. This generated key, call it Kr, is converted to a public key (EC), Pr. After this, you MAC Pr with a secret key, Ks, eg MAC(Pr, Ks) = V. V is a hash, that should contain a secret validation string Vs. This string (Vs) should be same for all votes, but kept a secret. If the result of MAC does not contain the specified validation string, then a new private key is generated. (eg, Think "brute-forcing" until a private key that has the valid verification value appears, Think "vanitygen" in bitcoin. A malicious party cannot do this since he does not know the MAC key or what the result substring should be.)

Eg, in other Words, Generate a secret key Kr, such as the MAC of the corresponding public key combined with a secret MAC key, gives a hash result, which contain a specific secret substring.

Repeat this until enough secret keys are generated so theres one secret key for each voter.

When time for voting, after a successful secure voting identification, give the voter one of the random secret keys. Check off the voter in a list, eg so he cannot check out multiple secret keys. This can be done online.

Voter votes by signing the vote and publishing this in the public ledger. Since the public key cannot be linked to a voter, its not possible to link votes to voters.

First (valid) vote is what Counts, and when the voter has voted, he is encouraged to publish his key, possible anonymously, and/or display it for friends. The reason for doing this, is to prevent a key to be linked to a voter post-vote, which prevents coercion. This also prevents the voter from proving what he voted for, to someone, because he could just have taken some other's key to prove he voted "right" (when he actually voted "wrong").

Actually, the voter can generate his own fake key, and the publish a fake vote, that will not be counted, using this fake key, and then use that fake vote to "prove" he voted "right" to a coercier. The coercier cannot detect that the vote is fake Before the authorities publish the Ks and Vs.

However, the publishement must be delayed so all the nodes have recorded the vote Before publishing the key. Of course the voter must check that a couple of random nodes have recorded the vote correctly. The reason for this, is that if the vote is withheld by one or more malicious nodes, they can change the vote using the published key. By delaying the publishing of the key until the nodes have published the vote, its not possible to change the vote after that.

When voting are over, the authorities publish the secret MAC key (Ks) and the secret validation substring (Vs).

Anyone can now tally the votes using the public records. The first valid vote (invalid vote could be voting "what?" in a yes/no vote) of each key that succeeds MAC validation with Ks and Vs, is a valid vote. Any other votes are ignored, eg double votes or "home-generated" keys. Nobody can cheat the voting system. If the number of valid votes exceed the number of eligible voters, fake votes have inserted, either by a malicious party that "accidentially" created a valid key by chance, or a malicious state inserting votes in the system.

Such fake votes should not be reacted upon unless theres a Close call, eg there is a possibility that the fake votes affected the outcome. A "yes/no" vote where the result is 90% yes, such vote is not gonna affect the outcome unless more than about 40 % of the votes are fake.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .