I’ve been looking at e-voting (see https://medium.com/asecuritysite-when-bob-met-alice/privacy-preserving-and-trusted-voting-a6fe63b0985) and I can’t see how you can reach total privacy without a third party.
Let’s say I have a smart contract SC, and n voters v1,… vn. I want SC to be able to count v1, …vn votes without revealing them. How can I do it ?
At the end of the voting period I expect to have in SC:
vote[‘A’] = 10
vote[‘B’] = 30
vote[‘Z’] = 0
If I understand correctly, ECCs are used to hide the identity of users when they vote by having 2 third parties involved the voting agent and the vote counter. If I replace those 2 with 2 smart contract then how can I make the vote counter key private as everything is public in smart contracts. Is the solution to have it off chain ?
Also as an extra problem, what about if I want to allow voters to update their vote before the end of the voting period ? I suppose they should be able to pass an extra information like an ID with their vote but then it needs to use an algorithm that could not create collisions.