Read the original article: Cryptographically Securing Democratic Elections with Block Chain Technology
Securing Democratic Elections using cryptography, is actually very easy. In fact, what I am describing in this article, is really nothing but "blockchain for Democracy". But since we’re all coders here, let me start with some simple pseudo code.
Plain Text
xxxxxxxxxx
1
1
openQueueSempahore
2
if (firstVote)
3
oldHash = hash(subject + body)
4
else
5
oldHash = previousVoteHash
6
newHash = hash(oldHash + username + voteValue)
7
insertVote(username, voteValue, newHash)
8
The whole idea with the above pseudo code, is that it results in a "chain of votes", where each individual vote, is based upon its previous vote’s hash value. Then the first vote, is based upon the hash value of the subject and its content.
Read the original article: Cryptographically Securing Democratic Elections with Block Chain Technology