Operating System Project
Operating System Project
system utilizing the Paillier Threshold Cryptosystem (PTC) web services and applying
Online voting (e-voting) would be more convenient, relatively secure and utilize
fewer resources. To be able to access e-voting system from a personal, business or even a
public library computer may be more convenient for many people needing to vote. This
could potentially be a solution for the low voter turnout at the polls. However, it is still
questionable whether elections can be conducted online or over the internet due to the
count) ballot systems, Direct Recording Electronic (DRE) systems, voting using mobile
devices and internet voting [1]. As part of this project, an online e-voting prototype
system has been constructed using the demonstration windows application tool created
improvements. The details of this optimization and improvement in the web services
In traditional elections, a voter usually goes to the voting stations. After direct
person-person verification with some IDs, the voter is allowed to vote. The voter is then
given 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 being
permitted to vote, but not reveal their actual identity, and the voter must also be given
assurances 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 to
disrupt it. There is a greater chance of getting caught as there will be physical evidence in
On the other end, internet is harder to control and manage the security as Network
and internet related attacks are more difficult to trace. In the traditional polling, you know
who is in the election room. Also with the internet or network related voting, from all
around 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].
Voting
Schemes
Traditional Electronic
Voting Voting
Internet E- DRE
voting machines
Chaum’s
scheme
Another issue with e-voting is educating the voters. We can not consider that all
the 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 large
portion of the voting public has a very little knowledge about the computers. According
to some of the research done by the Public Policy Institute of California over 50% of 18-
Some recent studies have focused on e-voting, its security concerns and making it
cryptography 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 with
the public key can be decrypted only with the corresponding private key. The private key
is kept secret, while the public key may be widely distributed. The public and private
keys are related mathematically. The private key cannot be practically derived from the
public key [4]. The two main branches of public key cryptography are:
Public key encryption — a message encrypted with a recipient's public key cannot
be decrypted by anyone except the recipient possessing the corresponding private key.
The problem with the public key encryption is the intruder can easily replace the
private key with his when the sender requests the public key. This means the newly
received public key will have the intruder’s private key and he can easily decrypt the
Digital Signatures — a message signed with a sender's private key can be verified
by anyone who has access to the sender's public key, thereby proving that the sender
signed it and that the message has not been tampered with. This is used to ensure
authenticity [4].
uses a single secret key for both encryption and decryption. It is also known as one-key
or private-key encryption. The requirement is the shared secret that both parties should
have a copy. In this e-voting prototype shared keys will be used for the users’ encryption
in our tests.
The encryption algorithm E ( ) is homomorphic if given E(x) and E(y), one can
the sum of two encrypted values is equal to the encrypted sum of the values. In simple
It is one of the schemes that can be used in e-voting especially to be able to tally
the votes even though the results are encrypted. There are few cryptosystems which uses
giving extra information. This is accomplished by Zero Knowledge Proofs. Especially for
the authentication systems Zero Knowledge Proofs can be used. For example, a party
might want to prove his identity with secret information and does not want the other party
to learn anything about this secret. In other words, second party can only know the
correctness of the statement or identity of the first party and no more information.
participants can the operation be performed. In addition, if less than the required number
system as defined here, only t+1 cooperating authorities can perform the desired
cryptographic operation.
combining algorithm [5]. First, the key generation algorithm generates the public key
parameters, a set of secret key “shares”, and a set of “verifier keys”. The secret key
shares are distributed to the participants in a secure manner. The encryption algorithm
key parameters and an encryption algorithm to generate the ciphertext c. The share
decryption algorithm is used by each participant with a secret key share to “partially
decrypt” the encrypted message c. Each participant also uses the verifier key
corresponding to the secret key share to generate a proof of correct encryption. The
combining algorithm takes all of the “partial decryptions” or “decryption shares”, verifies
their corresponding proofs, and combines the decryption shares to reveal the original
message m. The combining step only succeeds if t+1 valid decryption shares are used.
participants can be tolerated. In other words, the system must be able to tolerate to certain
Universal Verifiability – any party can verify the result of the voting
coercer.
There are four main approaches to efficient and fully secure elections:
Heterodox schemes
election authorities.
potentially dangerous moves are made. In a voting system, privacy and security are
desired, but are not always simultaneously achievable at a reasonable cost. In online
voting systems, verification is very difficult to do accurately, and anonymity is difficult
to ensure. This document shows some of the many problems with practical e-voting and
When e-voting system scheme is considered there are different modules involved
to consider the security and design. Three important phases of having a secure system
have the foundation in designing a secure and practical e-voting scheme to produce a
secure, efficient and publicly acceptable implementation of voting schemes in the real
world.
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 concerns
users have today for the e-voting systems. A CAPTCHA is a program that can generate
and grade tests that humans can pass but current computer programs cannot. In our
project this is used to confirm that users are trying to vote instead of the automated
computer systems. CAPTCHAs have several applications for practical security like
preventing comment spam in blogs, protecting web registrations, online polls where you
want to make sure that humans are voting not the programs, preventing dictionary
attacks, search engine bots, worms and spasm etc. Official Captcha site has published
However we also need to make sure that scripts used are not easily accessible so that
attacker will find the easy way around them to use the systems.
Security Even After Wide Spread Adoption: Some of the sites might be using the
sites that have CAPTCHAs setup. It is important that the security level kept the same and
these sites are still secure even after a significant number of sites adopt them [6].
In this project, PTC Web services are used. In this section, I will explain how the
PTC web services work. Efficiency improvement that will be applied to the PTC web
services required some changes on some of the classes used. Applying more
improvements will need more changes on the classes where calculations applied. Details
cryptography, first published by Pascal Paillier in 1999. This probabilistic scheme has
generated a good amount of interest and further study since it was discovered.
difficult to compute. This is known as the Composite Residuosity (CR). The scheme is an
additive homomorphic cryptosystem; this means that, given only the public-key and the
which can allow this cryptosystem to do simple addition operations on several encrypted
values and obtain the encrypted sum. The encrypted sum can later be decrypted without
ever knowing the encrypted values that made up the sum. Due to these useful
characteristics of Paillier, the scheme has been suggested for use in threshold
cryptosystems, secret sharing schemes and the design of voting protocols especially the
e-voting systems.
changing the underlying cleartext and without changing the ability to decrypt the
ciphertext using the original keypair[15]. Probabilistic property of Paillier will help to
protect 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 services
that will be used in this project are using one of these three methods. Below are the
hold. n is the multiplication of two prime numbers, n = pq. g is randomly selected base.
PTC 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
As described above n is the product of two prime numbers. From the table below, there
are steps explained for decryption. To be able to retrieve m, all these steps will be
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 fast
decryption, this scheme can be applied to improve the efficiency. In the following
sections this scheme will be re-visited and it will be recommended for efficiency
Encryption:
plaintext m < n
randomly select r < n
ciphertext =
Decryption:
ciphertext c < n2
It is assumed that g Є for some 1 ≤ α ≤ λ. In other words α and λ are not the
Below are the steps for the key generation, encryption and decryption used [22].
Key generation
multiplicative inverse:
Encryption
Decryption
1. Ciphertext
2. Compute message:
It is the same as the scheme 1 described above. This computation takes some time
due to the large prime numbers used. The secret key is SK = λ(n) = lcm((p-1),(q-1)).
4. Online E-Voting Prototype System
demonstrated on an Online E-Voting Prototype system created for this project. This is a
prototype and should not be used in the real world scenarios. It shows the use of the
Paillier Threshold Cryptography Web Service. It also has some additional security
features like Completely Automated Public Turing test to tell Computers and Humans
The e-voting system allows for 1 out of L candidate ballots. No options are
provided for n out of L ballots or write-in ballots. An “election” may consist of more
than one ballot. An election administrator creates the ballots and other election
parameters. The administrator requests the Paillier threshold encryption parameters from
the PTC Web Service during the initial election set-up. The administrator submits the
election parameters to a VotingService web service, and saves the election parameters
(including the cryptosystem parameters) to an XML file. Voters then load the election
parameters by opening the XML file, make their selection(s), and cast their encrypted
vote(s) to the VotingService web service. During the tally phase, the votes are multiplied
together, and, due to the homomorphic properties of the Paillier cryptosystem, the
product can be decrypted to reveal the sum total of all the votes [15].
User Login is the first form users connected when the voting page is loaded from
the internet. It will have a connection to the database to validate the user credentials. User
types are either voters or Administrators. It is assumed that users have used another
interface or form to register for voting. In the same login page there will be Completely
Automated Public Turing test to tell Computers and Humans Apart (CAPTCHA)
validation with random numbers. Six digit random numbers will be created each time the
page is loaded to be able to stop any kind of computer attacks to the voting site.
The election administrator uses the Election Builder form to create or modify an
election (before the election is posted to the voting web service). To create a new
election, the administrator clicks on the “New Election” button. A new election is
created and a unique election id is assigned. The administrator must then enter his/her
name and a descriptive title for the election. Election page is the most important
Administrator page as it has all the functionality setup for the election.
Before ballots can be added to the election, the encryption parameters must be
specified and retrieved from the web service. This must occur before the ballots are
added or created, since the vote format is dependent on the specified key size. The
administrator clicks to the “Encryption Parameters” . This button will be available after
the Administrator details are entered. Once this button is clicked, the administrator
specifies the key size and whether or not to encrypt the returned key shares. The
administrator can then add the key share owner information for each owner that is to
receive a secret key share. If the key shares will be encrypted, the administrator will be
required to enter the owner’s username which is the same as the users login and
certificate name to be able to choose automatically. Once all owners have been added, the
administrator 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 of
larger than 256 and sometimes 512 bits will result in such a delay that a “timeout” error is
caused, so it is not recommended that key sizes greater than 256 be used for the web
application. The web service will generate the requested parameters, encrypt the key
shares (if specified), and return them [15]. The Encryption Parameter Request form will
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 the
ballots are created prior to the election creation page, the list will appear in the window
for administrator to choose from the list. They can be added to any election by
highlighting from the list and clicking to the”Add Ballots” button. If the ballot is valid, it
will be imported into the election and displayed in the Election Summary textbox in the
form.
After all the users, ballots and Administrator details loaded from the election
form, the Administrator will need to save and post the election to be able to initialize
election voting. The election will be saved as an XML file. First save the election by
clicking to the “Save Election” button. It will be saved in the web server
Software Design Specification document. Posting the election to the voting web service
is a non-reversible operation in the application unless the details are manually deleted
from the database. Post Election button will be enabled after saving the election. To post
the election, click to “Post Election” button. A web service call will be made that posts
the election data to the web service, which then creates the appropriate database entries
Existing ballots can now be added to the election or new ballots can be created
using the options from the Election form. To create a new ballot, the administrator will
need to click to the “New Ballot” link from the elections page. It will open the Ballot
Builder form. A new ballot will be created and the random ballot id displayed in the
form. Administrator will need to put ballot issue/ problem, and then enter all of the
available 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 by
selecting the choice in the list, and clicking “Delete Candidate” button. When the ballot
is complete, the ballot should be saved by clicking “Save ballot” button. This button will
get all the details entered and save the ballot in XML format in the web server
“App_Data\XML Files\Ballots” folder. The Ballot Builder Form must be closed and then
re-opened in order to create another ballot. Ballot creation page is also accessible from
When a ballot is added to an election, the format of the vote for that ballot is
derived from the key size chosen for the election and the number of “candidate” choices
on the ballot. These two values determine the maximum number of voters allowed. The
total size of the vote is limited to the key size k (in bits). The vote is split into c bit fields
where c is the number of candidates. The size of the bit fields vc= k/c. However, vc is
limited to 32 bits so that each candidate’s field will fit into a 32-bit integer (for ease of
extraction only). Therefore, if k/c > 32, vc=32 and only the first 32*c bits of the vote will
be used. To cast a vote, a voter votes the value 2^(ic*vc) where ic is the desired candidates
ballot index (0,…,c-1). By using votes of this format, the tally can be computed by
multiplying all of the votes together and decrypting the product. Due to the
homomorphic property of the Paillier cryptosystem, the multiplication carried out in the
ciphertext space corresponds to addition in the cleartext space, and thus the decryption of
the product will contain the summed votes for each candidate. Each candidate’s bit field
can then be extracted and evaluated to determine the total number of votes for that
candidate [15].
4.2. Voting
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 an
Administrator or a voter. If the user logs in as an Administrator, he will have a link from
the menu for the voting page. If the user has logged in with voter credentials, then he will
be connected to the voting page automatically. When connected to the voting page, a list
box will have all the elections available for the voters. This list is the list of the elections
in the elections folder. After highlighting the election and clicking to the button to load
the election, election details will be loaded for voters to vote. The ballots from the
election will be loaded, with each issue being loaded into the issue text box, and it’s
corresponding choices loaded into the textbox to the right (the choices textbox). The
voter can make his/her choice simply by clicking on the desired choice. That issue’s
choices will then be displayed in the choices textbox. Again, select the desired choice by
clicking on it in the choices textbox. Once a choice has been selected, the ballot issue
and the selected choice will appear in the “Current Votes” textbox. To the right of the
issue question and the selected choice is the hex value of the vote to be cast. Once all
choices 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 vote
into the database. Once the vote is submitted, no changes can be made.
At any time after submitting his/her vote, a voter can check the posted values of
his/her vote by selecting “Check Submitted Vote” button. This invokes a web service call
to the voting web service which retrieves the encrypted vote values posted for that
election [15].
Administrator will have access to use the Tall Vote option during the election
process 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 for
Administrator to choose and tall the vote. If the secret key shares were encrypted, the
program will automatically get the certificates according to the issued names of the users
to decrypt the owner’s Paillier secret key share. That’s why it is important for
Administrator to collect all the registration details from the user to be able to create the
users. He/she will assign the right certificates so that there won’t be any issues in the
future process like tally / decrypt vote process. The product of the votes for each ballot
is then calculated and displayed both encrypted and decrypted, and the candidate’s tallies
5.1 Pre-Computation
This change will be done for the key generation where the prime numbers will be
calculated prior. Any real-time computations will slow down the process on cryptography
application. Any pre-computation will improve the efficiency of the application. This
Pre-computations results are put into both the text file and the Pre-Computation
tables created in the SQL Server. Both the text file and the database solutions have
increased the performance in other words response time more than 80% in average for
both 256 and 128 bit key sizes. Unfortunately this test failed with 1024 and 512 bit key
There is a parameter setup in the settings to use the random prime number
generator 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 future
3500
3000
2500
Time (msec)
2000
1500
1000
500
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Number (#)
4000
3500
3000
Time (msec)
2500
2000
1500
1000
500
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Num ber (#)
6.3. Conclusion
the need for voting system has started to increase and some organizations or countries has
started to look for the solutions, this can be the starting point to improve and deploy in
We need to keep in mind htat voting is not the only process during the whole
voting processes. There might be some other security concerns that need to be considered
papers [1], [8]. Random numbers pre-computation is one of the ways implemented in this
project. It has increased the calculation more than one of the ways. In the next section, I
will be listing all improvements that can be done to this web service and application.
In this project E-Voting Online prototype application has been implemented. PTC
Web Services are used for the encryption and decryption process. The method
implemented and used on the PTC Web services is the first scheme invented by Paillier
ad explained above. In the following years in numerous projects other similar method
called Second Paillier Cryptosystem is used and this calculation simplifies the decryption.
Additionally, there are few suggestions made about the efficiency improvement
above. Any of these or all of these can be applied to make the web services more
schemes invented. The pre-computation applied in this project can be applied to more
generic constants and have a dll application running continuously on the back ground
thread from the server instead of a button from the web server.
Lastly, tests failed on 512 and 1024 bit key size encryption. Design can be
[1] http://cris.joongbu.ac.kr/publication/evoting_implementation-APIEMS2004.pdf
[2] http://www.euractiv.com/en/egovernment/estonia-country-world-introduce-internet-
October 2005.
[3] http://www.cs.virginia.edu/~pev5b/writing/academic/thesis/thesis.html
Vote Early, Vote Often, and VoteHere: A Security Analysis of VoteHere, Philip E. Varner,
Proceedings.
Eurocrypt ‘99