Your SlideShare is downloading. ×
Online e voting prototype with ptc web services v1
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

Online e voting prototype with ptc web services v1

148
views

Published on


0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
148
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
11
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Applying MESE processes to Improve Online E-Voting Prototype System with Paillier Threshold Cryptosystem Web Services Version 1.00 A project submitted to the Faculty of Graduate School, University of Colorado at Colorado Springs in Partial Fulfillment of the Requirements for the Degree of Master of Engineering in Software Engineering Department of Computer Science Prepared by Hakan Evecek CS701 Dr. Chow Spring 2007Online E-Voting Prototype System Evecek / Page 1 of 37
  • 2. This project for the Masters of Engineering in Software Engineer degree by Hakan Evecek has been approved for the Department of Computer Science By _______________________________________________________ Dr. C. Edward Chow, Chair _______________________________________________________ Dr. Richard Weiner _______________________________________________________ Dr. Xiaobo Zhou DateOnline E-Voting Prototype System Evecek / Page 2 of 37
  • 3. Table of ContentsOnline E-Voting System Project Documentation................................................................4Abstract................................................................................................................................61. Introduction......................................................................................................................72. E-Voting System Related Literature................................................................................9 2.1. Public Key Cryptography........................................................................................9 2.2. Homomorphic Encryption.....................................................................................10 2.3. Zero Knowledge Proofs.........................................................................................10 2.5. Cryptographic Voting Protocol..............................................................................11 2.6. Issues in secure e-voting system............................................................................12 2.7. Completely Automated Public Turing test to tell Computers and Humans Apart (CAPTCHA)..................................................................................................................13 2.8. Chinese Remainder Theorem (CRT)....................................................................143. Online E-Voting System Project Description................................................................17 3.1. Paillier Threshold Crytosystem Web Services Architecture and Design..............17 4.1. E-Voting System Overview...................................................................................21 4.1.1 User Login........................................................................................................22 4.1.2. Election Set-Up................................................................................................23 4.1.3. Creating Ballots...............................................................................................24 4.1.4. Vote Format.....................................................................................................25 4.2. Voting....................................................................................................................26 4.2.1. Creating the Vote.............................................................................................26 4.3. Tally the Vote........................................................................................................275. PTC Web Services Efficiency Improvement.................................................................28 5.1 Pre-Computation.....................................................................................................28 5.2 Chinese Remainder Theorem (CRT)......................................................................28 5.3 Paillier Scheme Pre-computations for Decryption.................................................296. Results ...........................................................................................................................30 6.1 Pre-Computation Performance Evaluations ...........................................................30 6.2. Defects Found .......................................................................................................32 6.3. Conclusion.............................................................................................................34 6.5. Future Suggestions.................................................................................................357. References.....................................................................................................................36Online E-Voting Prototype System Evecek / Page 3 of 37
  • 4. Online E-Voting System Project Documentation The subsequent files are located on the following web site: http://cs.uccs.edu/~gsc/pub/master/hevecek/doc/o CS701Proposal_EVotingPrototype.doc : This document describes what the project would be for the advisory committee. It was submitted in February 2007.o EVoting_SRS Document.doc: This is the online E-Voting prototype System Requirements Specification document for the project. The demonstration windows application created used to get the requirements for the online tool. It also has the use cases.o EVoting_SDS Document.doc : This describes the internal design of the project. This document has both black box and white box designs. Also class diagrams from the web services are also prepared for documenting although they were developed previously. It has the main use cases to make it easier to create the SDS. It also involves database design.o EVoting_Test Plan.doc: The tests for the project are documented in this document. Test plans cover all the requirements testing.o Online E-Voting Prototype with PTC Web Services.doc: This is the project report document. It is the final report for the project that has discussions about e-voting system. There are some e-voting related papers researched about the online e-voting system implementation and I tried to explain why it is so hard to implement, develop and deploy today by using these papers. Also in this report for the PTC design section and PTC develop description, [15] is used. Lastly, some efficiency improvementsOnline E-Voting Prototype System Evecek / Page 4 of 37
  • 5. applied in the code and according to the results that will be explained, it has improved.o Paillier ThresholdCryptoService_UserGuide_Updated.doc: This document that is the user guide for the PTC web services. Source files for the code is placed in the link below: http://cs.uccs.edu/~gsc/pub/master/hevecek/src/Online E-Voting Prototype System Evecek / Page 5 of 37
  • 6. Abstract The purpose of this master’s project is to develop an Online E-Voting prototypesystem utilizing the Paillier Threshold Cryptosystem (PTC) web services and applyingMESE processes to it in an attempt to find possible solutions to further improve existingPTC web services. Online voting (e-voting) would be more convenient, relatively secure and utilizefewer resources. To be able to access e-voting system from a personal, business or even apublic library computer may be more convenient for many people needing to vote. Thiscould potentially be a solution for the low voter turnout at the polls. However, it is stillquestionable whether elections can be conducted online or over the internet due to thehigh level of concern over security. Systems considered to be apart of e-voting are Machine readable (create, read,count) ballot systems, Direct Recording Electronic (DRE) systems, voting using mobiledevices and internet voting [1]. As part of this project, an online e-voting prototypesystem has been constructed using the demonstration windows application tool createdfor PTC web services. A pre-computation process is applied due to efficiencyimprovements. The details of this optimization and improvement in the web servicesprocess will be explained in the subsequent sections. In addition to the application of the pre-computation to the process, the ChineseRemainder Theorem can be applied during the decryption process. This change might notbe as noticeable as the pre-computation, however it will make it more efficient as thecalculation gets easier.Online E-Voting Prototype System Evecek / Page 6 of 37
  • 7. 1. Introduction In traditional elections, a voter usually goes to the voting stations. After directperson-person verification with some IDs, the voter is allowed to vote. The voter is thengiven a ballot which allows a single vote. Once the ballot is used, it cannot be used again.However, this ballot must also be anonymous. The ballot must identify the voter as beingpermitted to vote, but not reveal their actual identity, and the voter must also be givenassurances of this. Traditional polling methods trust a lot of parties during the election.The current methods require an attacker interact directly with the voting process todisrupt it. There is a greater chance of getting caught as there will be physical evidence inthe traditional polling. On the other end, internet is harder to control and manage the security as Networkand internet related attacks are more difficult to trace. In the traditional polling, you knowwho is in the election room. Also with the internet or network related voting, from allaround the world you will have attackers, not only by the few people in the room [3].Figure 1 shows the hierarchy of the voting schemes just discussed [17].Online E-Voting Prototype System Evecek / Page 7 of 37
  • 8. Figure 1: The categorization of the voting schemes [17]. Another issue with e-voting is educating the voters. We can not consider that allthe users are computer gurus and they will use the e-voting systems easily. When e-voting is designed it needs to be easy to use. We should consider the fact that a largeportion of the voting public has a very little knowledge about the computers. Accordingto some of the research done by the Public Policy Institute of California over 50% of 18-44 years of age voters prefers Internet voting [3]. Some recent studies have focused on e-voting, its security concerns and making itmore secure. Below is the list of related literature about e-voting:Online E-Voting Prototype System Evecek / Page 8 of 37
  • 9. 2. E-Voting System Related Literature2.1. Public Key Cryptography Public key cryptography, also known as asymmetric cryptography, is a form ofcryptography in which each user will have a key that didn’t have to be kept secret.Having this public key will not inhibit the system’s secrecy as a message encrypted withthe public key can be decrypted only with the corresponding private key. The private keyis kept secret, while the public key may be widely distributed. The public and privatekeys are related mathematically. The private key cannot be practically derived from thepublic key [4]. The two main branches of public key cryptography are: Public key encryption — a message encrypted with a recipients public key cannotbe decrypted by anyone except the recipient possessing the corresponding private key.This is used to ensure confidentiality [4]. The problem with the public key encryption is the intruder can easily replace theprivate key with his when the sender requests the public key. This means the newlyreceived public key will have the intruder’s private key and he can easily decrypt themessage. To avoid this issue digital signature can be used. Digital Signatures — a message signed with a senders private key can be verifiedby anyone who has access to the senders public key, thereby proving that the sendersigned it and that the message has not been tampered with. This is used to ensureauthenticity [4]. Conversely, Secret key cryptography, also known as symmetric cryptographyuses a single secret key for both encryption and decryption. It is also known as one-keyor private-key encryption. The requirement is the shared secret that both parties shouldOnline E-Voting Prototype System Evecek / Page 9 of 37
  • 10. have a copy. In this e-voting prototype shared keys will be used for the users’ encryptionin our tests.2.2. Homomorphic Encryption The encryption algorithm E ( ) is homomorphic if given E(x) and E(y), one canobtain E(x Φ y) without decrypting x; y for some operation Φ. In that case, homomorphic encryption is a special type of cryptography in whichthe sum of two encrypted values is equal to the encrypted sum of the values. In simplemathematics, this is equivalent to the communicative property of multiplication. For amajority of cryptographic algorithms, this does not hold true. It is one of the schemes that can be used in e-voting especially to be able to tallythe votes even though the results are encrypted. There are few cryptosystems which useshomographic encryption. They will be discussed in the next section.2.3. Zero Knowledge Proofs In cryptography it is often needed to prove some statement to someone withoutgiving extra information. This is accomplished by Zero Knowledge Proofs. Especially forthe authentication systems Zero Knowledge Proofs can be used. For example, a partymight want to prove his identity with secret information and does not want the other partyto learn anything about this secret. In other words, second party can only know thecorrectness of the statement or identity of the first party and no more information.2.4. Threshold Cryptography Threshold Cryptography is a term used to describe a cryptosystem in which theability to perform a cryptographic function can be distributed amongst severalOnline E-Voting Prototype System Evecek / Page 10 of 37
  • 11. participants in such a way that only through cooperation of a specified subset of theparticipants can the operation be performed. In addition, if less than the required numberof participants’ attempts to perform the action, no useful information can be constructedor obtained. The threshold value is typically denoted by the letter t. In a thresholdsystem as defined here, only t+1 cooperating authorities can perform the desiredcryptographic operation. The essential components of a threshold cryptography system are a keygeneration algorithm, an encryption algorithm, a share decryption algorithm, and acombining algorithm [5]. First, the key generation algorithm generates the public keyparameters, a set of secret key “shares”, and a set of “verifier keys”. The secret keyshares are distributed to the participants in a secure manner. The encryption algorithmprovides encryption services for an appropriately-sized message m by applying the publickey parameters and an encryption algorithm to generate the ciphertext c. The sharedecryption algorithm is used by each participant with a secret key share to “partiallydecrypt” the encrypted message c. Each participant also uses the verifier keycorresponding to the secret key share to generate a proof of correct encryption. Thecombining algorithm takes all of the “partial decryptions” or “decryption shares”, verifiestheir corresponding proofs, and combines the decryption shares to reveal the originalmessage m. The combining step only succeeds if t+1 valid decryption shares are used.2.5. Cryptographic Voting Protocol Basic requirements for electronic voting • Privacy – All votes should be kept secretOnline E-Voting Prototype System Evecek / Page 11 of 37
  • 12. • Completeness – All valid votes should be counted correctly • Soundness – Any invalid vote should not be counted • Unreusability – No voter can vote twice • Eligibility – Only authorized voters can cast a vote • Fairness – Nothing can affect the voting Extended Requirements for electronic voting • Robustness – faulty behavior of any reasonably sized coalition ofparticipants can be tolerated. In other words, the system must be able to tolerate to certainfaulty conditions and must be able to manage these situations. • Universal Verifiability – any party can verify the result of the voting • Receipt-freeness – Voters are unable to prove the content of his/her vote • Incoercibility – Voter cannot be coerced into casting a particular vote by acoercer. There are four main approaches to efficient and fully secure elections: • Schemes based on homomorphic encryption • Schemes based on mixnets • Heterodox schemes • Schemes based on secret sharing among several mutually distrustfulelection authorities.2.6. Issues in secure e-voting systemOnline E-Voting Prototype System Evecek / Page 12 of 37
  • 13. The issues behind e-voting need to be examined conservatively before suchpotentially dangerous moves are made. In a voting system, privacy and security aredesired, but are not always simultaneously achievable at a reasonable cost. In onlinevoting systems, verification is very difficult to do accurately, and anonymity is difficultto ensure. This document shows some of the many problems with practical e-voting andwhy public elections are too important to trust to it [3]. When e-voting system scheme is considered there are different modules involvedto consider the security and design. Three important phases of having a secure systemare considered as design, development and deployment. In other words, it is important tphave the foundation in designing a secure and practical e-voting scheme to produce asecure, efficient and publicly acceptable implementation of voting schemes in the realworld.2.7. Completely Automated Public Turing test to tell Computers and Humans Apart(CAPTCHA) Any additional check for the security or spam will decrease the security concernsusers have today for the e-voting systems. A CAPTCHA is a program that can generateand grade tests that humans can pass but current computer programs cannot. In ourproject this is used to confirm that users are trying to vote instead of the automatedcomputer systems. CAPTCHAs have several applications for practical security likepreventing comment spam in blogs, protecting web registrations, online polls where youwant to make sure that humans are voting not the programs, preventing dictionaryattacks, search engine bots, worms and spasm etc. Official Captcha site has publishedsome guidelines for it [6].Online E-Voting Prototype System Evecek / Page 13 of 37
  • 14. Accessibility: It should be easily accessible for reading the text. If it is a problemdue to legal reasons audio CAPTCHA can also be used. Image Security: Images should be distorted randomly. Without randomdistortion, application will be open to the attacks. Script Security: By using this, systems are closed to any computer attacks.However we also need to make sure that scripts used are not easily accessible so thatattacker will find the easy way around them to use the systems. Security Even After Wide Spread Adoption: Some of the sites might be using thesites that have CAPTCHAs setup. It is important that the security level kept the same andthese sites are still secure even after a significant number of sites adopt them [6].2.8. Chinese Remainder Theorem (CRT) On several papers for improving the efficiency, CRT is recommended to use bothon encryption and encryption process [16], [21]. As described below CRT is not affectingto the multiplication. In other words, multiplying two big prime numbers and processingthe multiplication will be the same as processing them first and then multiplying. Thisway the process will be done with smaller numbers and will be faster. Thenmultiplication can be done. Theorem Statement: Suppose n1, n2, …, nk are integers which are pairwise coprime. Then, for anygiven integers a1,a2, …, ak, there exists an integer x solving the system of simultaneouscongruencesOnline E-Voting Prototype System Evecek / Page 14 of 37
  • 15. Furthermore, all solutions x to this system are congruent modulo the product N = n1n2…nk. Sometimes, the simultaneous congruences can be solved even if the nis are notpairwise coprime. A solution x exists if and only if: All solutions x are then congruent modulo the least common multiple of the ni. In that case, We can perform 2 operations mod p and mod q like below. x ≡ a mod p, x ≡ b mod q, The Chinese Remainder Theorem can be used to efficiently reduce the decryptionworkload of the cryptosystems [21]. To see this, one has to employ the functions Lp andLq defined over ByOnline E-Voting Prototype System Evecek / Page 15 of 37
  • 16. Decryption can therefore be made faster by separately computing the messagemod p and mod q and recombining modular residues afterwards: With pre-computations Where p - 1 and q - 1 have to be replaced by α in the fast variant.Online E-Voting Prototype System Evecek / Page 16 of 37
  • 17. 3. Online E-Voting System Project Description In this project, PTC Web services are used. In this section, I will explain how thePTC web services work. Efficiency improvement that will be applied to the PTC webservices required some changes on some of the classes used. Applying moreimprovements will need more changes on the classes where calculations applied. Detailswill be explained in the following sections of this report.3.1. Paillier Threshold Crytosystem Web Services Architecture and Design The Paillier cryptosystem is a probabilistic asymmetric algorithm for public keycryptography, first published by Pascal Paillier in 1999. This probabilistic scheme hasgenerated a good amount of interest and further study since it was discovered. The problem of computing n-th residue classes is believed to be computationallydifficult to compute. This is known as the Composite Residuosity (CR). The scheme is anadditive homomorphic cryptosystem; this means that, given only the public-key and theencryption of m1 and m2, one can compute the encryption of m1 + m2. One of the properties of Paillier as mentioned above is the homomorphic propertywhich can allow this cryptosystem to do simple addition operations on several encryptedvalues and obtain the encrypted sum. The encrypted sum can later be decrypted withoutever knowing the encrypted values that made up the sum. Due to these usefulcharacteristics of Paillier, the scheme has been suggested for use in thresholdcryptosystems, secret sharing schemes and the design of voting protocols especially thee-voting systems. Another property of Paillier cryptosystem is self-blinding. This property isessential as it means a ciphertext can be re-encrypted with a random parameter withoutOnline E-Voting Prototype System Evecek / Page 17 of 37
  • 18. changing the underlying cleartext and without changing the ability to decrypt theciphertext using the original keypair[15]. Probabilistic property of Paillier will help toprotect voter’s privacy since none of the votes will be encrypted to the same ciphertext. Paillier has described three different methods in his research. PTC Web servicesthat will be used in this project are using one of these three methods. Below are theschemes invented by Pascal Paillier [21] and Scheme 1: Scheme 1 is probabilistic encryption scheme based on compositeresiduosity. According to theorem mentioned in his paper [21] Scheme 1 is one-way ifan only if the Computational Composite Residuosity Assumption holds. It is alsosemantically secure if and only if the Decisional Composite Residuosity Assumptionhold. n is the multiplication of two prime numbers, n = pq. g is randomly selected base.This can be done by checking whether . This is done on thePTC web services used. n and g are public parameters and (p, q) or λ remains private.Encryption: plaintext m < n randomly select r < n ciphertext c =Decryption: ciphertext c < n2 Table 3.1 Paillier’s Scheme 1 [21]Online E-Voting Prototype System Evecek / Page 18 of 37
  • 19. Scheme 2: Scheme 2 is a trapdoor permutation based on composite residuosity.As described above n is the product of two prime numbers. From the table below, thereare steps explained for decryption. To be able to retrieve m, all these steps will berequired. Scheme 2 is one-way if and only if RSA [n,a] is hard [21].Encryption: plaintext m < n2 split m into m1, m2 such that m = m1 + nm2 ciphertext c =Decryption: ciphertext c < n2 plaintext m = m1 + n m2 Table 3.2 Paillier’s Scheme 2 [21] Scheme 3: Third scheme is the variant with fast decryption. As this is a fastdecryption, this scheme can be applied to improve the efficiency. In the followingsections this scheme will be re-visited and it will be recommended for efficiencyimprovements in the current web services.Encryption: plaintext m < n randomly select r < n ciphertext =Decryption: ciphertext c < n2 Table 3.3 Paillier’s Scheme 3 [21] It is assumed that g Є for some 1 ≤ α ≤ λ. In other words α and λ are not thesame secret keys.Online E-Voting Prototype System Evecek / Page 19 of 37
  • 20. Below are the steps for the key generation, encryption and decryption used [22]. Key generation 1. Choose two large prime numbers p and q randomly. 2. Compute n = pq and λ = lcm(p − 1, q − 1) 3. Select random integer g where 4. Ensure n divides the order of g by checking the existence of the followingmultiplicative inverse: where function L is defined as The public (encryption) key is (n,g). The private (decryption) key is (λ,μ). Encryption 1. Let m be a message to be encrypted where 2. Select random r where 3. Compute ciphertext as: Decryption 1. Ciphertext 2. Compute message: It is the same as the scheme 1 described above. This computation takes some timedue to the large prime numbers used. The secret key is SK = λ(n) = lcm((p-1),(q-1)).Online E-Voting Prototype System Evecek / Page 20 of 37
  • 21. 4. Online E-Voting Prototype System The capabilities of the Paillier Threshold Cryptography system has beendemonstrated on an Online E-Voting Prototype system created for this project. This is aprototype and should not be used in the real world scenarios. It shows the use of thePaillier Threshold Cryptography Web Service. It also has some additional securityfeatures like Completely Automated Public Turing test to tell Computers and HumansApart (CAPTCHA) added to decrease the security concerns. This prototype system SRSand SDS document are all created and they can be downloaded fromhttp://www.cs.uccs.edu/~gsc/pub/master/hevecek/doc/ folder. 4.1. E-Voting System Overview The e-voting system allows for 1 out of L candidate ballots. No options areprovided for n out of L ballots or write-in ballots. An “election” may consist of morethan one ballot. An election administrator creates the ballots and other electionparameters. The administrator requests the Paillier threshold encryption parameters fromthe PTC Web Service during the initial election set-up. The administrator submits theelection parameters to a VotingService web service, and saves the election parameters(including the cryptosystem parameters) to an XML file. Voters then load the electionparameters by opening the XML file, make their selection(s), and cast their encryptedvote(s) to the VotingService web service. During the tally phase, the votes are multipliedtogether, and, due to the homomorphic properties of the Paillier cryptosystem, theproduct can be decrypted to reveal the sum total of all the votes [15].Online E-Voting Prototype System Evecek / Page 21 of 37
  • 22. 4.1.1 User Login User Login is the first form users connected when the voting page is loaded fromthe internet. It will have a connection to the database to validate the user credentials. Usertypes are either voters or Administrators. It is assumed that users have used anotherinterface or form to register for voting. In the same login page there will be CompletelyAutomated Public Turing test to tell Computers and Humans Apart (CAPTCHA)validation with random numbers. Six digit random numbers will be created each time thepage is loaded to be able to stop any kind of computer attacks to the voting site. Figure 4.1 User Login FormOnline E-Voting Prototype System Evecek / Page 22 of 37
  • 23. 4.1.2. Election Set-Up The election administrator uses the Election Builder form to create or modify anelection (before the election is posted to the voting web service). To create a newelection, the administrator clicks on the “New Election” button. A new election iscreated and a unique election id is assigned. The administrator must then enter his/hername and a descriptive title for the election. Election page is the most importantAdministrator page as it has all the functionality setup for the election. Before ballots can be added to the election, the encryption parameters must bespecified and retrieved from the web service. This must occur before the ballots areadded or created, since the vote format is dependent on the specified key size. Theadministrator clicks to the “Encryption Parameters” . This button will be available afterthe Administrator details are entered. Once this button is clicked, the administratorspecifies the key size and whether or not to encrypt the returned key shares. Theadministrator can then add the key share owner information for each owner that is toreceive a secret key share. If the key shares will be encrypted, the administrator will berequired to enter the owner’s username which is the same as the users login andcertificate name to be able to choose automatically. Once all owners have been added, theadministrator selects the cryptosystem threshold value and then clicks “Send Request”,which sends the request to the web service. In the current configuration, a key size oflarger than 256 and sometimes 512 bits will result in such a delay that a “timeout” error iscaused, so it is not recommended that key sizes greater than 256 be used for the webapplication. The web service will generate the requested parameters, encrypt the keyshares (if specified), and return them [15]. The Encryption Parameter Request form willOnline E-Voting Prototype System Evecek / Page 23 of 37
  • 24. transfer the returned parameters to the Election Builder form and close automatically.The election crypto parameters are displayed at the bottom of the Election Builder form. Lastly, on the same election page ballots can be added for the election. If theballots are created prior to the election creation page, the list will appear in the windowfor administrator to choose from the list. They can be added to any election byhighlighting from the list and clicking to the”Add Ballots” button. If the ballot is valid, itwill be imported into the election and displayed in the Election Summary textbox in theform. After all the users, ballots and Administrator details loaded from the electionform, the Administrator will need to save and post the election to be able to initializeelection voting. The election will be saved as an XML file. First save the election byclicking to the “Save Election” button. It will be saved in the web server“App_Data/XMLFiles Folder”. Details of the folder structures are documented in theSoftware Design Specification document. Posting the election to the voting web serviceis a non-reversible operation in the application unless the details are manually deletedfrom the database. Post Election button will be enabled after saving the election. To postthe election, click to “Post Election” button. A web service call will be made that poststhe election data to the web service, which then creates the appropriate database entriesthat are used to manage the election [15]. 4.1.3. Creating Ballots Existing ballots can now be added to the election or new ballots can be createdusing the options from the Election form. To create a new ballot, the administrator willneed to click to the “New Ballot” link from the elections page. It will open the BallotOnline E-Voting Prototype System Evecek / Page 24 of 37
  • 25. Builder form. A new ballot will be created and the random ballot id displayed in theform. Administrator will need to put ballot issue/ problem, and then enter all of theavailable choices, one at a time by using the “Add Choices” button and the text box.Each choice is entered by typing the appropriate text. A choice can be deleted byselecting the choice in the list, and clicking “Delete Candidate” button. When the ballotis complete, the ballot should be saved by clicking “Save ballot” button. This button willget all the details entered and save the ballot in XML format in the web server“App_DataXML FilesBallots” folder. The Ballot Builder Form must be closed and thenre-opened in order to create another ballot. Ballot creation page is also accessible fromthe Administrator menu. 4.1.4. Vote Format When a ballot is added to an election, the format of the vote for that ballot isderived from the key size chosen for the election and the number of “candidate” choiceson the ballot. These two values determine the maximum number of voters allowed. Thetotal size of the vote is limited to the key size k (in bits). The vote is split into c bit fieldswhere c is the number of candidates. The size of the bit fields vc= k/c. However, vc islimited to 32 bits so that each candidate’s field will fit into a 32-bit integer (for ease ofextraction only). Therefore, if k/c > 32, vc=32 and only the first 32*c bits of the vote willbe used. To cast a vote, a voter votes the value 2^(ic*vc) where ic is the desired candidatesballot index (0,…,c-1). By using votes of this format, the tally can be computed bymultiplying all of the votes together and decrypting the product. Due to thehomomorphic property of the Paillier cryptosystem, the multiplication carried out in theciphertext space corresponds to addition in the cleartext space, and thus the decryption ofOnline E-Voting Prototype System Evecek / Page 25 of 37
  • 26. the product will contain the summed votes for each candidate. Each candidate’s bit fieldcan then be extracted and evaluated to determine the total number of votes for thatcandidate [15]. 4.2. Voting 4.2.1. Creating the Vote Once an election has been created, saved, and posted to the election web service,voters can create and cast votes. After the user login page user logs in either as anAdministrator or a voter. If the user logs in as an Administrator, he will have a link fromthe menu for the voting page. If the user has logged in with voter credentials, then he willbe connected to the voting page automatically. When connected to the voting page, a listbox will have all the elections available for the voters. This list is the list of the electionsin the elections folder. After highlighting the election and clicking to the button to loadthe election, election details will be loaded for voters to vote. The ballots from theelection will be loaded, with each issue being loaded into the issue text box, and it’scorresponding choices loaded into the textbox to the right (the choices textbox). Thevoter can make his/her choice simply by clicking on the desired choice. That issue’schoices will then be displayed in the choices textbox. Again, select the desired choice byclicking on it in the choices textbox. Once a choice has been selected, the ballot issueand the selected choice will appear in the “Current Votes” textbox. To the right of theissue question and the selected choice is the hex value of the vote to be cast. Once allchoices have been made, the voter can submit his/her vote by selecting “Submit Vote”button at the bottom of the page. This button will cal the web services and save the voteinto the database. Once the vote is submitted, no changes can be made.Online E-Voting Prototype System Evecek / Page 26 of 37
  • 27. At any time after submitting his/her vote, a voter can check the posted values ofhis/her vote by selecting “Check Submitted Vote” button. This invokes a web service callto the voting web service which retrieves the encrypted vote values posted for thatelection [15]. 4.3. Tally the Vote Administrator will have access to use the Tall Vote option during the electionprocess to tally the vote. Administrator will need to click the “Tally/Decrypt Vote”button on the menu. The Tally form will open. In a list box elections list will appear forAdministrator to choose and tall the vote. If the secret key shares were encrypted, theprogram will automatically get the certificates according to the issued names of the usersto decrypt the owner’s Paillier secret key share. That’s why it is important forAdministrator to collect all the registration details from the user to be able to create theusers. He/she will assign the right certificates so that there won’t be any issues in thefuture process like tally / decrypt vote process. The product of the votes for each ballotis then calculated and displayed both encrypted and decrypted, and the candidate’s talliesare extracted from the decrypted bit field and displayed.Online E-Voting Prototype System Evecek / Page 27 of 37
  • 28. 5. PTC Web Services Efficiency ImprovementThis can be done in three different ways.5.1 Pre-Computation This change will be done for the key generation where the prime numbers will becalculated prior. Any real-time computations will slow down the process on cryptographyapplication. Any pre-computation will improve the efficiency of the application. Thispre-computation can be done via background thread setup in the application.<setting name="ServerPath" serializeAs="String"> <value>c:inetpubwwwrootEVotingPreComputation</value> </setting> <setting name="PrimeNumberCalculationType"serializeAs="String"> <value>DB</value> </setting> This pre-computation is applied to the SafePrimeNumbers generator function.This function is used for the pre-computation.5.2 Chinese Remainder Theorem (CRT) Chinese Remainder Theorem is one of the most useful theorems of number theoryas it says it is possible to reconstruct the integers in a certain range from their residuesmodule a set of pair wise relatively prime module. Details of CRT is explained in theprevious sections. Paillier has suggested to use CRT for especially key generation anddecryption processes [21]. Also CRT has become standard today in many RSAapplications as it increases the decryption up to 4 times [16]. Decryptions can be madefaster by separately computing the messages mod p and mod q instead of mod n andrecombining modular residues later.Online E-Voting Prototype System Evecek / Page 28 of 37
  • 29. With pre-computations: where p-1 and q-1 have to be placed by α5.3 Paillier Scheme Pre-computations for Decryption Scheme 1 used in this project is not the most efficient one especially fordecryption as it is also mentioned in Pascal papers study [21]. Scheme 3 improves theperformance of decryption and he suggested in the same paper to pre-compute theconstant instead of only p and q values applied in this project. Alsoanother constant parameter below can be pre-computed [21].These constant pre-computations can be done with the same methods used in this project.Online E-Voting Prototype System Evecek / Page 29 of 37
  • 30. 6. Results6.1 Pre-Computation Performance Evaluations Pre-computations results are put into both the text file and the Pre-Computationtables created in the SQL Server. Both the text file and the database solutions haveincreased the performance in other words response time more than 80% in average forboth 256 and 128 bit key sizes. Unfortunately this test failed with 1024 and 512 bit keysizes due to time out issues. There is a parameter setup in the settings to use the random prime numbergenerator either real time or text file or database. As a default it will set to the real time.XML solution also needs some improvements and this will be suggested in the futureimprovements section of the project.Online E-Voting Prototype System Evecek / Page 30 of 37