How Do I Reveal How I Voted, But Still Keep My Vote Secret?
A demo of the method I will show is here.
Well, the UK is going to the polls — again — on Thursday. So how can I reveal to you the way I voted, after the election, and by revealing my commitment within the voting process? For this, we could perform a one way hash of my vote, and then send you that:
commitment = Hash(“Labour”) or Hash(“Conservative”)
But you would be able to crack this, so I can add salt to the hash:
commitment = Hash(“Labour”+salt) | Hash(“Conservative”+salt)
I can then give you my commitment, and after the vote I can give you the salt value that I used, and you can check it. But let’s say that you do not trust the hashing process, or that I don’t want to reveal my statement for the vote. For this, we can use the Pedersen Commitment, and where I can commit a value, and then reveal my voting options at some time later.
In the Pedersen Commitment we take two large prime numbers (p and q) and and we create a generator value (g) which is of the order of q and a subgroup of Z∗p. Then s becomes a secret from 0 to Zq, and we calculate h=g^s(mod p). The values of (p,q,g,h) are public values.
The sender now creates a commitment for a message (m) and with a random number (r):