# Practical I-Voting on Stellar Blockchain
## 2 Blockchain Technology for I-Voting
### Blockchain Based I-Voting Systems  
Recently (8 September 2019), Moscow decided to test the i-voting system based on Ethereum blockchain for their local Parliament elections [12]. To ensure the transparency of the election procedure, the source code has been provided publicly ([[https://github.com/moscow-technologies/blockchain-voting](https://github.com/moscow-technologies/blockchain-voting)]([https://github.com/moscow-technologies/blockchain-voting](https://github.com/moscow-technologies/blockchain-voting))). In the solution, the blockchain has been used to store votes--one transaction per vote. The voting procedure required the registration of voters. To do this the voter had to fill in account details with personal information and later come to the office to confirm their identity. The voting process has been based on a unique link shared with the voter. To get it, the voter had to provide code that was sent via SMS. It was possible to vote only for 15 min. If the voter had not made his selection, the ballot expired. Votes were added to the blockchain with a random delay, making it more difficult to discover voter's identity. To achieve user anonymity during the voting process, a single-use key was created to sign a transaction and destroyed after casting a vote. Thus no link between vote and voter exists. Election fairness has been achieved by encrypting results during voting. Voters could verify if their votes were cast correctly. After the end of the voting, any voter could join the blockchain network and count the votes. Unfortunately, the system had a problem with weak encryption [12]. The private key had 256 bits that turned out to be too short and changed to 1024 bits before the election. After fixing this issue, newly found security vulnerability could be used to count the number of votes cast for a candidate. Despite this problem, the system should be evaluated as a success. The election gained a high number of participants; 102,000 votes were cast, which was 90.8% of registered voters. Polys [13] is an i-voting solution created by AO Kaspersky Lab. The solution was used in the voting with 82,000 voters in Volgograd (Russia). It uses [PERSON]'s Secret Sharing to divide the key needed to decrypt voting results. The anonymity of voters is warranted by the ElGamal encryption system, which provides ZK-proof by the possibility to check the integrity of vote but without information about the selected candidate. The number of votes for each candidate is calculated based on the homomorphic multiplication property. Each candidate is annotated with some prime number (\(\geq\)2) and the final result is \(N=p_{i}^{x_{i}}\cdot p_{i+1}^{x_{i+1}}\cdot...\cdot p_{i+n}^{x_{i+n}}\), where \(p_{i}\) is \(i\)-th prime number which represent \(i\)-th candidate, \(x_{i}\) is number of votes for \(i\)-th candidate and \(n\) is a number of candidates. The process of calculating the number of votes for each candidate is accelerated by using [PERSON]'s algorithm. With four candidates, the process takes 0.22 s for 10 thousand voters and 1692 s for 1 million voters. A user is represented by the token with the hash value created by KECCA-256. The token is saved in the smart contract. Each time user logs in, the system creates a new Ethereum account. The user is authenticated based on an email address and a unique code. Voatz [14] is a first voting app used in U.S. federal elections (Virginia, Denver, Oregon, Utah). In the first step, the Voatz get a dataset with emails or phone numbers of voters. Each voter register using the record from the dataset (email or phone number). Then, he gets a one-time password and creates an 8-digit PIN. User identity is verified using a 3 rd party app called Jumio. After login, the user can view the elections and cast a vote. The mobile application connects with the server. Each time the application starts, a process of handshaking is performed. The AES-GCM algorithm encrypts communication between the app and server in addition to the TLS method.