duke, etim bassey
TRANSCRIPT
Biometric-based Voters Identity Management to Combat Impersonation Vulnerability for A Credible E-Voting
Process in Nigeria
Duke, Etim Bassey 25831127
Thesis submitted in partial fulfillment of the requirements for the Award of Master of Science
(M.Sc) Degree in Computer Science at the Mafikeng Campus of the North-West University
Supervisor: Prof. B. M. Esief arienhre Co-Supervisor: Dr. N. Gasela
November, 2015 C.-<;..L tu:
DECLARATION
I declare that this research project on the Biometric-based Voters Identity
Management to Combat Impersonation Vulnerability for A Credible E
V oting Process in Nigeria is my work, and has never been presented for the
award of any degree in any University. All the information used has been dully
acknowledged both in text and in the references.
Signature .... z ..... . Date ....... . ... ... ~;q~o/.'~ .. .
Duke, Etim Bassey
Approval
Signature......... ·······";1 Date ............ 9. . . ... 1-~~··t<vdb Supervisor: Prof. B. M. Esiefarienhre
Department of Computer Science North-West University Mafikeng Campus South Africa.
Signature .. ~·············
Date . . fl 3f:1/ ?:'?.(k? .......... .
Co-Supervisor: Dr. N. Gasela Department of Computer Science North-West University Mafikeng Campus South Africa.
DEDICATION
This work is dedicated to my loving wife and children
ii
ACKNOWLEDGEMENT
Firstly, I would like to thank the Almighty GOD for allowing me to finish this
research in good health and mind.
I am truly indebted and thankful to my supervisor - Prof. B. M. Esiefarienhre
and co-supervisor - Dr. N. Gasela. Thank you for the support, the wisdom you
shared and encouragement throughout the course of this research.
Many thanks, to the members of staff in my department especially my lecturers
Prof. 0 . 0 . Ekabua, Dr. Bassey Isong, Ms Ohaeri and Ms Nochipo for offering
valuable advice. Without you, it would not have been possible for me to finish
this research project.
I owe sincere thanks to my mother, brothers and sisters for their support and
love throughout the course of this year.
Lastly, I would like to thank my wife for the undying love and support
throughout the course of this project.
iii
TABLE OF CONTENTS
TITLE PAGE -------------------------DECLARATION ------------------------DEDICATION 11 ------------------------AC KNOWLEDGE MEN TS lll
TABLE OF CONTENTS Iv LIST OF FIGURES Vll
LIST OF TABLES Vlll
ABSTRACT IX LIST OF ABBREVIATIONS x
Chapter 1
Introduction and Background 1.1 Introduction 1
------------------------1. 2 Background Information 2 1.3 Problem Statement 3 1.4 Research Questions 4 1.5 Research Goals and Objectives 4 1.5.1 Research Goals 5 1.5.2 Research Objectives 5 1.6 Rationale of Study 5 1. 7 Research Methodology 6 1. 7 .1 Literature Survey 6 1.7.2 Framework Analysis and Design 6 1.7.3 Framework Implementation 6 1.8 Research Scope 6 1.9 Research Organization 6
Chapter 2
Review of the Literature 2.0 Chapter Overview ______________________ 8 2.1 Introduction 8 2.2 E-democracy and e-voting 9 2.3 Terminologies 10 2.4 Elections in Nigeria and Challenges 11 2.4.1 Election Process in Nigeria 13 2.4.1.1 Voters Registration 13 2.4.1.2 Actual Voting 14 2.5 Identity Management 16 2.6 Biometric System 17 2.6.1 Properties of Biometrics 18 2.6.2 Biometric Working Process 19 2.7 Fingerprint Identification System 20
iv
2.7.l Fingerprint Matching Algorithms ________________ 22 2.7.2 Performances 23 2.8 Related Works 24 2.9 Chapter Summary 25
Chapter 3
Biometric-based Framework Analysis and Design 3.0 Chapter Overview ______________________ 26 3.1 Introduction 26 3.2 Justification for FIS 26 3.2.1 Desirable Properties of Biometrics 27 3.2.2 Mode of Operation 27 3.2.3 Others 28 3.3 System Requirements and Analysis 28
3.3.1 System Requirement Specification 29 3.3.1.1 System Login 30 3.3.1.2 Voter registration 30 3.3.1.3 Voter identification and authentication 30
3.3.2 System Use Case Analysis and Model 31 3.3.3Use Case Description 32 3.3.4Sequence Diagrams 34 3.4 System Components and Design 35
3.4.1 INEC Central Voters Database Design 36 3.4.2 INEC System Interface 37 3.4.3 INEC Network Connectivity 37
3.5INEC System Framework Design 38 3.6 Chapter Summary 39
Chapter 4
INEC System Implementation 4.1 Chapter Overview 40 4.2Proposed INEC System Overview _________________ 40 4.3The INEC System 41 4.3.1 Technoiogy Used 41 4.3.2 INEC System Access 41 4.3.3INEC System Administrator 42 4.3.4INEC Staff 43 4.3 .4.1 Voter Registration 44 4.3 .4.2 Voter Identification 44 4.3.5Voter 45 4.3.6Voted Personnel and Election Results 47 4.3.6.1 Voted Personnel 48 4.3.6.2 INEC Results 49 4.4 Proposed System Benefits 49 4.5 Limitations 50 4.6 Chapter Summary 50
V
Chapter 5
Summary, Conclusion and Future Work 5.lSummary ________________________ 51 5.2 Conclusion 52 5.3Future Works 52
References 53 --------------------------
Appendix ___________________________ 57
vi
LIST OF FIGURES
Figure 2.1 INEC Voters Registration _________________ 14 Figure 2.2 INEC Voting Process 15 Figure 2.3 Human physiological and behavioral traits 18 Figure 2.4 Biometric System 20 Figure 2.5 Minutia template 21 Figure 2.6 Minutia Based Algorithm [44] 22 Figure 2.7 Pattern Based Algorithm [44] 23 Figure 3 .1 System Actors 31 Figure 3.2 System use Case Model 31 Figure 3.3 INEC Staff Sequence Diagram 35 Figure 3.4 INEC central database schema 37 Figure 3.5 INEC Biometric-based election framework design 38 Figure 3.6 Voter fingerprint authentication architecture 39 Figure 4.1 INEC Election process 40 Figure 4.2 INEC system front page 42 Figure 4.3 Unsuccessful logon page 42 Figure 4.4 Successful logon page 42 Figure 4.5 System admin page 43 Figure 4.6 INEC Staff page 43 Figure 4.7 Voter registration page 44 Figure 4.8 Voter identification page 45 Figure 4.9A Electronic ballot paper 46 Figure 4.9B Electronic ballot paper 46 Figure 4.10 Successful voting 47 Figure 4.11 INEC information printing page 4 7 Figure 4.12 INEC voter register printing page 48 Figure 4.13 INEC Voters Register 48 Figure 4.14 INEC Results printing page 49
vii
LIST OF TABLES
Table2.l Key Terminologies ___________________ 10 Table 3.1 Biometric Systems Evaluation 27 Table 3.2 System FR and NFR 29 Table 3.3 System login 33 Table 3.4 Voters registration 33 Table 3.5 Voters Identification and authentication 34 Table 3.6 Vote for a candidate 34
viii
ABSTRACT
Today, democracy has become a de facto standard of every form of government
in the world, nations and organizations. People are given the power to vote for
candidates of their choice to represent them in offices. These require that
elections are organized in a manner that is unbiased, fair and free of
manipulations. This is because confidence can only be gained and the results
generally accepted if the electorate sees the electoral process as being
transparent, accurate and fair. Although Information and Communication
Technology is being applied during the Nigerian electoral process, the process
is yet to be efficient, transparent and trustworthy. Nigerian elections are marred
with violence, voters' fraud such as rigging, impersonation, multiple voting and
vote count falsification. These are seen as threats to the integrity of the election
process. The major cause is the lack of strong security measures in place to keep
these activities under check. Therefore, in this research, a possible solution is
offer to the challenges faced by the Independent National Electoral Commission
(INEC) today in conducting a credible e-voting process in Nigeria. In this
research work, a framework was designed for managing voters' identity for
credible elections and electronic voting in Nigeria. The objective was to protect
the electoral system integrity by ensuring that an eligible voter has one
registration and vote only once for a candidate in an election. The approach was
by collecting potential voters' information during the voter registration exercise
and the actual identification of voters on Election Day in a real-time mode using
biometric as authentication factor. In addition and as a proof of concept, this
research implemented a web-based system prototype for INEC that demonstrate
ix
the effective operation of our idea. The system was tested and the results
obtained showed an improved and credible electoral process through ICT
application.
X
Acronym
ICT
INEC
FIS
ID
IDm
PVC
WLAN
DREs
LIST OF ABBREV ATIONS
Meaning
Information and Communication Technology
Independent National Electoral Commission
Fingerprint Identification System
Identity
Identity Management
Permanent Voters Card /uUt¾ J Wireless Local Area Network
Direct Recording Electronic Voting Machine
xi
Chapter 1: Introduction and Background
1.1 Introduction
In recent years, democracy has become a de facto standard of every form of government in
the world, nations, and local governments and even in organizations. It has been described as
the healthiest, participatory and most acceptable form of government that encourages
coordination and collaboration between the private and public sectors as well as the citizens
and government. Democracy promotes electoral processes and within the sphere of a
democratic government, elections occur frequently. The function of elections is chiefly to
elect representatives and more infrequently to take decisions about representatives regarding
issues that are specific [ 1]. In other words, elections are formal decision-making processes by
which a population chooses individuals to hold public office [2]. With the proliferation in
infonnation and communication technology (ICT) in the e-world today; elections have taken
a new dimension as they can be electronically monitored where a number of possible
technological applications can be used. One such application is electronic voting (hereafter
referred to as e-voting). E-voting is used to describe several types of voting approaches
which involve both casting of a vote and counting a vote electronically [3]. The approach in
its mode of operations does not involve a new electoral or voting process but rather, a
modification of the existing voting process [3]. In this case, it is geared towards re
engineering the existing manual or traditional electoral process to make it more advanced.
In electoral systems today, the introduction of e-voting has been to enhance the existing
approach with respect to transparency and efficiency especially, when it comes to national
elections [ 4]. This goes with the critical need to organize elections in such a way that is
unbiased, fair and free of manipulations [ 4]. The rationale is that the public can only gain
confidence in the electoral system if it is based upon transparency, accuracy and fairness [5 ,
6, 7]. In many developed nations of the world today such as the US, the UK, France, Brazil,
Israel and Russia, they have witnessed the advantages of e-voting. Though the benefits are
numerous, e-voting also comes with pitfalls. The electoral technology is viewed by many as a
threat to the integrity of elections where new sets of risks, doubts and opportunities for fraud
and failure are created [8]. In other words, they are not as safe, accurate and trustworthy as
they were promised to be [8]. Most of these problems have been experienced in the US
1
elections, especially the year 2000 elections where several security issues, design and
certification flaws, difficulty in auditing or recounting [9, 10, 11, 12], were reported. Though
most of the reported problems have been fixed, it is still considered a serious and complex
problem in a continent like Africa.
In the Nigeria of today, though some elements of ICTs have been incorporated into the
electoral system, the manual process is still in use. However, the greatest challenges are the
issues of frauds and malpractices stemming from rigging and impersonation. These forms of
practices have been seen as undermining the integrity of the elections, often creating an
atmosphere of instability. Though impersonation gives way to rigging, the cause is due to the
inability of the process to effectively manage the identity of voters. These lapses will not only
give room for impersonation, but also threaten the credibility and integrity of the election as
has always being. Given the critical context, it becomes imperative that the identities of
potential voters are effectively managed using a biometrics-based approach to uphold
elections integrity in Nigeria.
1.2 Background Information
With the exponential growth of the Internet, activities on the Internet have expanded to
various areas and sectors and have reached even hard to reach areas of the world . In life, a
person is known to have one name and identity, but the case is not the same on the Internet as
one person can have several identities [13]. Consequently the different identities can be used
by the person for different purposes or services. When people have multiple identities as this,
it becomes a problem as human can control several identities. Thus, a scheme that
differentiates the person for an online identity is indispensable [ 13]. This is the challenge
faced by elections in the African continent today, Nigeria in particular which has been marred
with impersonation which in turn gives room for rigging.
In order to solve the problem and enhance the existing electoral process, effective identity
management of voters is required. Identity Management (IDm) covers the processes and
systems for management and control of identities of individual principals, their
authentication, authorization [ 14, 15] with the objective of increasing security and
productivity while minimising cost and repetitive tasks. IDm constitutes a practice where
features that can uniquely identify individuals in a given setting are managed [ 16]. Today,
there are several ways to identify an individual which are broadly classified (1) by something
2
he knows or memonzes, (2) by something he cames and, (3) by a personal physical
characteristic (17]. All these approaches have their strengths and weaknesses which are some
of the determinant factors for their choice of application.
In particular, the approach which uses personal physical characteristic of humans called
biometrics has been one effective approach of IDm. Today, biometrics has gained
considerable interest and attracted widespread usage such as in immigration control system,
crime investigation by Police etc. Biometrics offers a natural identity management tool that is
characterized by greater security and convenience than traditional methods of personal
recognition (17) which include, name, passwords, PINs, ID Cards, etc. In biometrics,
identification or identity verification of a person is based on the physiological and
behavioural characteristics of the person [ 18, 19]. This is made possible due to the
permanence, uniqueness, and universality of human characteristics (17]. In this case,
biometrics is used to overcome the danger of loss and failure to recall by other methods of
identifications. Biometrics assures that each person has only one identity in the system and
that only one person can access each identity (20]. Common individual biometrics used for
recognition includes finger and palm friction ridges, iris, face, voice, handwriting, hand
shape, and hand vein patterns [ 1 7).
As one of the core objectives of electoral system is to ensure free and fair elections, where
one voter is allowed to register and vote once, it is imperative that employing biometrics into
the system would definitely help protect its integrity. Using biometrics such as fingerprint
instead of identification with names, passwords, PINs, ID Cards, PVCs during the process of
registration and voting in Nigerian elections will go a long way to c3reate an electoral system
that is credible, trustworthy and transparent.
1.3 Problem Statement
Today, ICT has played a critical role in every walk of life and electoral process is not an
exception. The application of ICT in the form of e-voting has been valuable as experienced
by the majority of the developed nations of the world. In the same way, they come with
several challenges which we believe cannot be contained in the Nigerian elections context
especially when it comes to issues such as registration mix-ups, system failures and audit
prevention due to software glitches (9, 10, 12]. In addition, the existing manual electoral
process in Nigeria is marred by malpractices such as voter impersonation which provide
3
room for rigging votes and vote count falsification. In the event of these problems elections
can be disastrous. Consequently, this could lead to situations ranging from national
instability, endless wars resulting to deaths of citizens. Also, in Nigeria, biometrics is
collected during registration locally and not in a real-time mode [27, 46]. In addition, ID
cards or permanent voter cards (PVC) are used as a means of identification on Election Day
while the collected biometrics are sometimes not used.
Given the critical context it becomes imperative that the existing electoral system in Nigeria
has to be reengineered for fitness of purpose such as ensuring the privacy of individual voter
as well as one person having one registration and vote. In addition, other benefits ( efficiency,
speed, and accuracy) can also be derived from the system. This therefore forms the
motivation for this research study.
1.4 Research Questions
In consideration of the above stated problem, this research would be addressing the following
research questions (RQs).
RQl: What existing biometric technology can be applied to manage a credible electoral
process in Nigeria?
This research question is answered in Chapter 3. The basis to explore the different
biometric systems to identify which one is convenient and suitable for use in this
research as the authentication factor.
RQ2: How can we manage the identity of each voter to ensure its privacy?
This research question is also answered in Chapter 3 and Chapter 4. The basis to
identify different information to be collected from voters and how to access them
using biometrics.
RQ3: How can we develop a generic framework for a credible electoral p rocess in Nigeria
that can identify an intending impersonator?
This research question is answered in Chapter 3 and the implementation prototype is
in Chapter 4. The basis to design the overall idea as a blue-print for implementation.
1.5 Research Goal and Objectives
The main goal and objective of this research are as follows:
4
1.5.1 Research Goal
The main goal of this research is to develop a novel framework for managing voters' identity
using a biometric-based approach to combat impersonation in Africa's elections.
1.5.2 Research Objectives
In order to achieve the main goal of this research, the following four objectives will be
carried out:
1) To analyse current or existing biometric-based identity management technology to see
which one is suitable in this context and how it can be applied to ensure voters '
pnvacy;
2) To evaluate existing electoral processes to find out how identity management can be
incorporated effectively and efficiently;
3) To develop a framework for electoral system in Nigeria that incorporate biometric
identification both at registration and actual voting; and
4) To analyse the benefits that can be derived from the systems.
1.6 Rationale of Study
The credibility of any election depends solely on the processes involved, how transparent it
is. Having substantial public confidence in the electoral process and its results is a major
issue [ 4]. In Nigeria today, most people have lost confidence in the traditional election
process due to malpractices such as fraud, ghosts voting or impersonation and chain voting
and multiple voting [12]. The above situations have brought about lack of transparency and
accuracy and have also reduced public confidence and trust in the democratic process. In
addition, the reported flaws and problems associated with e-voting are also the rationale why
aii developing countries are currently rejecting and criticising the voting technology. With the
problems of e-voting and the current challenges facing the traditional electoral system in
Nigeria, there is therefore the need to restructure the traditional electoral system.
This research is therefore seeking to provide lasting solutions to the elections system in
Nigeria. The research work aims to eliminate to the barest minimum, the case of
impersonation and rigging practices, whether acted directly by officials or indirectly by
voters. In achieving this, a biometric-based IDm approach is implemented which can operate
in a real-time mode for both registration and identification on Election Day to thwart
5
impersonation or rigging activities. The objective is to ensure that Nigerian elections can be
run with one man having one registration and one vote.
1.7 Research Methodology
Research method is necessary to provide clarity and transparency in terms of research
reporting methods, procedures in order to responsibly show how data have been collected,
synthesized, analysed and discussed [21]. Therefore, in this research, the following research
methodologies will be used:
1. 7.1 Literature Survey
In this study we carried out a comprehensive literature survey and review of some closely
related literature in the area of biometrics identification and privacy, election processes and
their challenges. The knowledge gained from this review will then provide the current
research with what has been and has not been researched. The researched material would be
acknowledged to provide easy reference for future research.
1. 7. 2 Framework Analysis and Design
The knowledge and information gained from the literature review will be used to formulate a
generic framework for credible elections in Nigeria that will ensure privacy of voters and
ensure that one individual may register and vote once. This is indeed necessary to ensure that
the integrity of the elections is upheld always.
1. 7. 3 Framework Implementation
As a proof of concept for this research work, we shall implement the design framework to
ascertain its suitability in combating electoral security vulnerabilities.
1.8 Research Scope
The scope of this research will be centred on the design. However, implementation shall be
limited to a prototype system. This is due to the time constraint associated with this research.
1.9 Chapter Organization
The remaining part of this research work is organized as follows:
Chapter two is on review of related literature and it looks at what has been done in the
literature in the areas of elections integrity, Nigerian election systems and challenges as well
as biometrics identification system.
6
Chapter three is the biometrics-based framework analysis and design which describes
the system requirements and design components.
Chapter four presents the system evaluation and implementation by g1vmg an
explanation of the system functionalities and their working, while
Chapter five presents the summary, conclusion of the research work.
7
Chapter 2: Literature Review
2.0 Chapter Overview
This Chapter focuses on what has been done so far with specific reference to the areas of the
use of ICT in electoral systems. It starts with an introduction and progresses to biometrics
system that will be deployed to enhance the authenticity and integrity of the elections in
Nigeria. In addition, we discuss the different terminologies and concepts that are of essences
in this research study.
2.1 Introduction
In today's modern society, for people to be served fairly, democracy has become the most
reliable process used by many countries in the world to elect persons into government. With
democracy, people are given the power to choose, elect or vote for candidates of their choice
they consider capable to represent them in public office. This is carried out through the
process of elections which can be manually done in a traditional way or through the use of
ICT tools in the form of e-voting.
In today's e-society, the exponential growth of ICT especially the Internet has been valuable
and produced positive results. The impact of these ICTs has been felt in all walks of life
through e-services and e-practices [5, 22]. Withe-services, e-government which is considered
more democratic, transparent, trustworthy and efficient has emerged [23, 24]. E-government
has been well-known in the enhancement of e-democratic process that has been known for
effectiveness in engaging citizens' support for democratic decision-making processes. It has
also strengthened representative democracy via ICTs tools such as e-voting. The application
of these tools in electoral processes has been commendable as experienced in some
developed countries of the world like the US, the UK, Japan, Brazil, Israel, India, etc.[9, 25].
In order for democracy to function effectively, the issues of building trust and confidence in
the voters is critical to the success and failure of the process. This ensures that the electoral
process is transparent and all participants are allowed to exercise their rights as stipulated in
the constitution [23] . A study shows that there is a decline in levels of voters' participation if
there is a lack of confidence in the freedom and fairness of the elections [ 10, 24]. Hence,
elections which are at the core of a democratic government have to be conducted in an
orderly manner which is free of fraud and malpractices [5]. This research is therefore of the
8
opinion that voters' confidence in electoral processes in Nigeria should be improved and the
integrity upheld. This can be achieved through the use of biometrics technology in both
voters' registration and actual voting on Election Day.
2.2 E-democracy and Voting
Today, most nations in the world that is considered legitimate is one that is democratic.
Democracy is a system of government by all the eligible members of a state through elected
representatives [3]. Due to advances in ICT, today elections can be improved using a number
of possible technological applications that allows it to be done electronically. In this case, it is
called electronic voting or simply e-voting. This has however given birth to electronic
democracy which a new form of democracy that is boosted by e-government [25]. E
democracy is simply the use of ICT tool, network and other related technologies like the
Internet to improve democratic processes within a democratic nation [23, 25]. It involves
activities such as voting, registration, electoral campaigns, communication exchange,
participation, consultation and public opinion polling [3) . The application of ICT in electoral
processes has been quite commendable as it is used to strengthen the democratic processes
and institutions, promote participations, build trust and confidence on the election process
and so on [23, 24).
In the perspective of the e-voting, it is not a new form of electoral process as it is viewed by
some people. It is rather a process that modifies or re-engineers the existing voting process
making it possible to be conducted electronically. In this case, voters can cast their votes
electronically using technologies such as the internet, telephones, interactive digital
television, SMS text messaging and Direct Recording Electronic Voting Machine (DREs) [3].
By e-voting, the ballot paper which is a hardcopy document is replaced with digital ballot
which is electronic thereby making the process paperless. In e-voting, for example in the UK
and US, some of the processes that can be automated electronically are the Voter registration,
ballot boxes, smartcard for voter identification and ballot paper counting [3]:
l NWU· '··1 LJBRARY_
The application of technology in the electoral process especially in developed countries has
been advantageous and has strengthened their democratic system. However, the technology
has also introduced risks and opportunities for fraud and manipulation [26]. Cases such as
vote counting inegularities, software bugs that prevents auditing, design flaws, confusing
inte1faces and so on have been reported mostly from the US [26]. This has however reduced
9
the trust and confidence people have in the system. Therefore, in this research, we believe
that the Nigerian INEC will meet some challenges in handling these types of issues. Instead,
the current system has to be reengineered especially in the identity management of voters
using real-time biometrics-based registration and voters ' identification.
2.3 Terminologies
In this section, we shall discuss the various terminologies that will be used throughout this
study.
Table 2.1: Key Terminologies
Term Definition Authentication It is the establishment of whether a claim is true or not. Biometrics Technology that measures and analyses human body characteristics, such
as DNA, fingerprints, eye retinas and irises, voice patterns, facial patterns and hand measurements, for authentication purposes.
Ballot paper A paper used for voting where names, party and other information about the candidate is written.
Biometric One or more stored biometric samples, biometric templates or biometric reference models attributed to a subject and used for comparison. Biometric sample Analogue or digital representation of biometric characteristics prior to
the feature extraction process, obtained from a biometric. Biometric Stored biometrics features which are compared directly to biometrics template features of a recognition biometric sample. Confidentiality Ability to protect our data from those who are not authorized to view it. Democracy This simple government of the people, by the people and for the good
and benefit of the people. E-voting The application of electronic system to help in casting and counting of
votes in an election. Elections A process by which citizens in a democratic nation, organization or
society choose candidates that they want to represent them in public offices. It includes registration, verification, voting and declaration of results
Fingerprint An impression left by the friction ridges of a human finger and extracted with the aid of an electronic device.
Identification It is the claim of what someone or something is. Integrity ability to prevent our data from being changed in an unauthorized or
undesirable manner. Manual system A system that is manipulated by a human operator and is not done
automatically or electronically. Polling Station A place set aside for voting during elections. Security The degree of resistance to, or protection from potential harm or
vulnerabilities. Vote The process of choosing candidates in an election. Voter A person who is eligible to vote in an election.
10
2.4 Elections in Nigeria and Challenges
Nigeria is currently a democratic nation in Africa where candidates are voted into offices to
represent their people. Nigeria operates a-three-tiers of government: the Local, State and the
Federal [ 45]. Elections take place in each tier of government to elect councillors, chairmen,
and members of the state house of assembly, state governors, and members of the federal
house of representative, the senates and the president [ 45]. All these divisions are based on
effort to ensure that democracy or government is felt at all levels and to assist in managing
the nation effectively. All elections are conducted and monitored by a body called the INEC
which was established by the 1999 constitution [ 45]. The values, mission and vision
statements of INEC can be found at [ 45]. The mission of INEC is to serve as an independent
and effective Election Management Bodies (EMB) committed to the conduct of free, fair and
credible elections for sustainable democracy in Nigeria. The vision is to be one of the best
EMB in the world that meets the aspirations of the Nigerian people and they are guided by
the following values:
Autonomy: INEC shall carry out all its functions independently, free from external control
and influence.
Transparency: INEC shall display openness and transparency in all its activities and in its
relationship with all stakeholders.
Integrity: INEC shall maintain truthfulness and honesty in all its dealings at all times
Credibility: INEC shall ensure that no action or activity is taken in support of any candidate
or political party.
Impartiality: INEC shall ensure the creation of a level playing field for all political actors.
Dedication: INEC shall be committed to providing quality electoral services efficiently and
effectively, guided by best international practice and standards
Equity: INEC shall ensure fairness and justice in dealing with all stakeholders.
Excellence: INEC shall be committed to the promotion of merit and professionalism as the
basis for all its actions.
Team work: INEC shall create a conducive environment that promotes teamwork among its
staff at all levels.
11
INEC have the sole responsibilities of registering voters, political parties, and conduction of
elections and so on.
The Challenges of Electoral Processes in Nigeria according to [50] includes the following:
ethnicity and communal tensions, ethnic and religious divides, injustice and culture of
impunity, economic vulnerabilities, confidence in electoral tribunal, no internal party
democracy, electoral malpractice, media inflammatory statement as well as power sharing
problem. These, for some time now have continued to affect the electoral processes in
Nigeria and currently, are still eating deep into the electoral system. Most Nigerians today,
vote for candidates from their ethnic group while some look at religious affiliations. There
northerners will prefer to vote for a candidate from the northern part of the country while
southerners will equally bring in such sentiments. Whenever candidates and any political
parties are identified with a particular region, state or religious group, sentiment will be
brought into play. This was found in the case of 2011 elections in Nigeria where all voters
from the south rallied round to ensure that Goodluck Jonathan was voted in as the next
president of Nigeria. Thus, electoral violence is triggered by individuals and political groups
to use all available means, like the use of violence to defend their communal honour
Electoral malpractices have also been seen as a serious challenge to Nigeria electoral
processes.
Insecurity in Nigeria cannot be left out as one of the challenges in the electoral processes.
According to [ 50] political assassination, intimidation, ballot snatching, arson, thuggery,
harassment of election observers, militancy and insurgency has always been responsible for
why a very successful electoral processes cannot be completed in Nigeria.
According to [50], cases of inter-communal clashes, political upnsmgs, sharia-induced
unrests and economic sabotage, ethno-based organizations from Afenifere, Arewa, Ohaneze,
Ijaw union became pronounced and that the 2007 election registered repeated violence. The
level of killing and intimidation was high. Candidate for any political office should be ready
for assassination and other unprecedented violence, since Nigeria's April 2007elections,
every other election held in Nigeria records violence, assassination, intimidation as well as
kidnapping.
12
For some years now, the democratic governments in Nigeria have been in principle
considered as stable. A number of people in all the tiers of government have voted and been
voted into offices and replaced as well. However, the process involved in the elections has
been questionable and undemocratic. Elections are often marred by insecurity mostly at the
North East and South South zones of Nigeria, violence, malpractices and voter fraud such as
impersonation, rigging and hijacking. These threaten the democratic system, the election
integrity and the voters' confidence are being degraded. This is made possible because there
are no strong security measures in place to ensure that elections are free and fair. In this case,
it is important that strong security measures supported by ICT tool are in place. The section
that follows discusses the election process in Nigeria.
2.4.1 Election Process in Nigeria
In Nigeria, the election system assumed the traditional-based approach enhanced with little
ICT tools. E-democracy and ICTs application is limited to the communication of information
and services, participation promotion and voters registration. In this case, much has not been
done to protect the integrity of the elections especially during voting. In the Nigerian
elections point of view, though it employs some ICT in its electoral process of voter
registration, relevant tools such as dedicated bandwidth for high speed internet access, very
fast and accurate verification with latent print image removal that can encrypt fingerprint
templates with a multi device connection reader and has high performance with optical
fingerprint sensor. A very high configuration computer system with not less than 4 gigabytes
RAM (Random Access Memory) with Hard Disk Driver (HDD) in terabytes and not less than
3.0GHz speed are not effectively employed during the voters registration and voting which
aim at ensuring the integrity of the process. This makes it cumbersome to keep voter fraud
and malpractice under control. in essence, protecting elections' integrity is to ensure one
registration and one vote for every eligible citizen. The process involved in elections starts
from voter registration, voting on Election Day, collation and counting of results, decision on
the out is made and finally, a winner is declared or announced.
2.4.1.1 Voter Registration
Voter registration is the first step towards achieving successful elections. In this process,
eligible voters ' information is captured for statistical purposes and for identification during
the Election Day. Eligible voter must be a Nigerian citizen who is not less than 18 years as at
13
the time of registration and must have registered in the constituency where he intends to vote
as well as possesses a registration card obtained during voters' registration.
To enhance the authenticity of voters in an attempt to promote one man one vote, recently,
the biometric-based registration has been introduced by INEC. Though, the fingerprints of
potential voters are captured, it still does not protect the integrity of the election for the
reason that the data bases where the finger prints are held are fragmented and are not used on
a real-time mode, thereby giving some people the opportunity to register more than once in
different places [27, 46]. We therefore consider this approach a weak security measure to
protect the integrity of the elections. Given this critical context, it is important that strong
security measures be in place in the form of real-time biometric-based identity management
in order to ensure that each potential voter registers only once irrespective of their location.
Name Date_of_Birth
id_number FINGERPRINT
Sex Town Ward
Local_ Government State_ Origin
Database
INEC REGISTRATION CENTER
.................... ~,~ INE~ration Staff
Electorates
Figure 2.1 INEC Voters registration
As shown in Figure 2.1, as the electorate enters the registration centre, his/her information is
captured by the registration officer and stored in the database that is local and not central. The
information collected from each voter is shown in the database in Figure 2.1.
2.4.J.2 Actual Voting
Voting is what is done on the Election Day aimed at choosing candidates the electorate wants
to represent them. However, for the elections to be transparent and results generally accepted, 14
every voter has to be identified as a valid voter. One effective approach is the biometric
based approach. Unfortunately, in Nigeria today, though biometrics is collected during voter
registration, the biometrics information is not used for identification and authentication on
Election Day [27]. Instead, the manual approach is used where a voter is identified against
their names on the voters' roll. In this case, a voter is allowed to vote if his/her name is found,
otherwise, not allowed. In this study, we consider this approach a weak security measure as it
is difficult to ensure one man one vote. The process involve in the actual voting during
elections is captured in Figure 2.1.
As shown in Figure 2.2, the diagram depicts the voting process during elections in Nigeria.
As the electorate enters the voting station, he/she is identified first. If he is a registered voter,
he/she is given a ballot paper and allowed to vote, otherwise, sent away or apprehended by
security bodies.
In this study, we aim to curb voter fraud in the form of multiple registrations, multiple voting,
vote count falsification and impersonation as they are common-place in Nigerian elections.
The trustworthiness and the integrity of the elections will continue to be compromised if
electoral system is surrounded by irregularities and democracy will fail [3, 12, 41). Thus, an
approach that increases the trustworthiness, is cost-effective and is reusable is needed to
protect the integrity of Nigerian elections.
Bal.ot Paper
Voter ld•ntifi..ci
V rs ' Id ritlfic;;, ion Dosk
(Voter's Card)
Vourtob• ld•ntified
C VOTI G STATI
Voter coi n,g to 11<ot .•
Figure 2.2 INEC Voting process
15
, 1'4 Vlt tJ _ I lLJBRARYJ
~-----~ Br, llol Box
After Vot in,g
INEC A uditoi-s
The new approach is not the introduction of e-voting into the system but the enhancement or
the re-engineering of the traditional approach using biometric-based identification. The
justification for not e-voting is due to the series of irregularities that have been reported about
e-voting such as software flaws, problematic voting machines and so on. We believe that
Nigeria is technologically less advanced and will have difficulty to manage such risks
associated withe-voting.
2.5 Identity Management
With the growth in economic importance of the Internet, activities that are performed online
are increasing in prominence just as is the case with other online activities [13, 28]. In recent
years, online identity management issues have gained considerable prominence. While in
real-life or physical activity a person can have one name to identify him/her, online. An
individual may assume a variety of identities. In this case, different identities can be assumed
by a single person for different services [13]. This however becomes a problem in identifying
uniquely a person who is responsible for certain actions. That is, several identities can be
controlled by a single human being. One effective solution is the proper management of
people's identities.
The uniqueness and distinctness of an individual can be established using individual identity
feature [30, 31]. This is determined by the features owned by the individual which are
temporary or permanent [31]. The concept of identity management (IDm) is basically the
practice of managing the essential features that individuals can be identified uniquely within
a given context [28]. IDm comprises of all the processes, systems and technologies that are
employed in the management and control of entities' identities either in computer or re lated
devices [31]. IDm can take different forms such as access control authorization, through
authentication, entity genuineness verification, and so on [29]. Today several tokens exist that
can be used for individual identity such addresses, mobile phone numbers, date of births,
driving license, social security numbers and so on [29]. The tokens used for identity can be
used for verification activities in traveling, receiving, sending, banking, insurance etc.
16
Though the management of identities on the Internet has attracted considerable attention in
recent years, there are still issues of identity in the real-life situation. One area is the
management of identities in the electoral system practiced by developing countries like
Nigeria. This is a serious issue which has threatened the nation's democracy, reducing
people ' s confidence and trust on elections and their results. Electorates are not effectively
identified thereby providing avenue for frauds, malpractices such as rigging, impersonation
and ghost voting [29]. To solve this problem, biometric-based IDm is proposed. The
justification for this choice is that biometrics has been known for its security and strength and
can help to eliminate the threats and vulnerability posed by other forms of tokens like the
permanent voters card (PVC) which can be lost, stolen, forged or forgotten as they originates
from authentication type dependent on what you know and what you have respectively.
2.6-Biometric System
Today, biometric-based IDm is increasingly being used by organizations, governments and
other agencies for the purposes of verifying identity and enforcement of the law [32].
Biometrics offers a natural identity management tool that is characterized by greater security
and convenience than traditional methods of personal recognition [33]. In biometrics,
identification or identity verification of a person is based on the physiological and
behavioural characteristics of the person [19, 34]. This approach is found advantageous as
every individual has unique traits that cannot be forged, stolen or lost. Biometrics focuses on
unique characteristics that are measurable, hence consisting of properties including
universality, uniqueness, permanence, collectability even though they all may be fit and
convenient for a specific environment [32, 33]. Biometrics assures that each person has only
one identity in the system and that only one person can access each identity [20]. Common
features for individual biometrics used for recognition includes finger and palm friction
ridges, iris, face, voice, handwriting, hand shape, DNA and hand vein patterns [33]. (see
Figure 2.3)
17
Biometrics
Behavioral Physiological
Signature ~ ft ' .....___D_NA _ _____,
Voice Hand
Keystroke - Iris
Fingerprint
Face
Figure 2.3 . Human physiological and behavioural traits
Biometrics technology exists today that is used to automate the recognition of individuals
using biological and behavioural traits as shown in Figure 2.3. The technology is utilized
today because of its ability to minimise errors made by users during the identification
process. It is also able to increase both user satisfaction and automatic control for security.
However, the main concern when using biometric technology for authenticating users is to
provide storage for the captured biometric feature in a secured manner [34]. In addition,
while biometrics usage has been praised in tenns of efficiency and scalability, several
challenges in the form of loss of privacy, and the potential for fraud and abuse have been
reported [32].
2.6.1 Properties of Biometrics
Desirable properties of human physiological and behavioural features chosen for
authentication as biometrics are universality, uniqueness, permanence and collectability [32,
35, 48]. Other characteristics such as performance, acceptability and circumvention are
regarded as the qualities attributed to biometric systems [35, 48]. The characteristics are
discussed as follows:
18
1) Universality means that the characteristics should be owned by every individual.
2) Uniqueness means that every individual should have a different characteristic.
3) Permanence means that the characteristics should not show any variation that may be
caused by the ageing process.
4) Collectability means that the characteristic should be able to be captured and stored.
5) Performance means achievable and acceptable identification accuracy, resource
requirements and environmental factor that affect identification accuracy.
6) Acceptability means the degree to which people are willing to accept it as a
biomehics.
7) Circumvention means how easy it is to carry out fraudulent act on the system.
As shown in Figure 2.3, fingerprints have been one of the biomehics used for identification
and authentication for quite some time now. They are used for verification purposes wherein
they are matched with the identity that the user is claiming to be. The factors that make
fingerprint based systems to be more considerable for use is the fact that the devices used to
capture the fingerprints are not expensive and are not frustrating since they are not huge, the
computing hardware they use are fast and the rate and speed it takes to recognize is not too
long in a way that a user can find it not usable. Based on this factor, in this study, fingerprints
will be used as an authentication factor.
2.6.2 Biometric Working Process
The process involved in the application of biometrics 1s twofold: enrolment and
authentication or verification as shown in Figure 2.4 [33, 35]. In the enrolment stage,
biomehics data is collected from persons or individuals and stored in the database together
with their identity. The captured biomehics data is subject to processing in order to extract
only the significant and distinctive features which are the only features to be stored and the
raw data are cast-off [33, 35]. In using biometrics systems, what is needed is a scanner, the
software that will be used in encoding the information about a user into digital data for
comparison purposes and also an encrypted database that will be used for storing captured
data. Identification process using this method is quick, harmless and eliminates identity theft
[20].
19
ENROLLMENT
Present B1ome nc Ca pture Process
NO MATCH
Compare
AUTHENTI CA TION
MATCH Capture Process
Figure 2.4 Biometric system
On the other hand, during the course of the authentication or verification, currently captured
biometric data collected from individuals are compared against the ones stored in the
database for authentication purposes. This is then captured as shown in Figure 2.4.
In general, biometrics has two applications: identification and authentication. In addition,
biometrics systems have heen used for managing attendance as well as identification. These
two forms of application directly corresponds to the security issues facing INEC today. In
this study, we aim at utilizing these capabilities to protect the integrity of our elections in
Nigeria by ensuring that one man has one registration and vote.
2.7 Fingerprint Identification System
In this study, we have adopted the use of fingerprints as an authentication factor to be used in
the process of curbing election malpractices such as impersonation and other forms of fraud .
Law enforcement agencies and others have successfully used fingerprint matching
technology for over a century now [19, 32, 42]. The scientific foundation for using
fingerprints as a method for identification for a person was documented by Henry Faulds,
Francis Galton, and Edward Henry, among others [ 42]. For the reason that all other biometric
traits as shown in Figure 2.3 do not exhibit the characteristic of extreme uniqueness
associated with fingerprint, the fingerprint is considered the most dominant [ 42, 43] .
20
A fingerprint recognition system provides the two basic functionalities of verification and
identification. In verification, an input fingerprint is compared to the "enrolled" fingerprint of
a specific user to ascertain a match or mismatch (this is referred to as 1:1 match). In
identification, the system first maintains a database of fingerprints against which it compares
an input fingerprint to determine a match (this is referred to as 1: N match). The process is
captured in Figure 2.4. The operational principle of an automated Fingerprint Identification
System (FIS) is divided into three functional modules namely: sensor, feature extractor, and
matcher.
Enrolment: As shown in Figure 2.5, during the enrolment phase, the sensor scans the user's
fingerprint as a user places his or her finger on the scanner and converts it into a digital
rmage.
Minutia extractor: The image taken in the enrolment phase is processed by the minutiae
extractor to identify specific details known as minutia points that are used to distinguish
aifferent users. Locations where friction ridges end abruptly or where a ridge branches into
two or more ridges as shown in Figure 2.5 are known as minutia points [ 42, 43]. This
minutiae information is stored along with the user's demographic information as a template
in the enrolment database.
Figure 2.5 Minutia template [43)
Matching: During the identification phase (matching), the user touches the same sensor,
generating a new fingerprint image called a query print. Minutiae are extracted as explained
earlier and the results are compared by the matcher module to the stored minutia templates in
the enrolment database to find the number of common minutia points. In the process, the
matcher is able to determine the number of pairs of matching minutiae that is two minutia
points that have similar location and directions.
21
2.7.1 Fingerprint Matching Algorithms
In this section we discuss two main algorithms commonly used to recognize fingerprints:
minutia based and pattern based matching. The difference between these algorithms is based
on their method of evaluating fingerprint images [ 44].
Minutia Matching: In a fingerprint, there are a number of ridges and valleys - ridges are the
upper skin layer segments of the finger while valleys are the lower segments. The ridges
constitute what is called minutia points [ 43, 44]. The minutia matching algorithm simply
analyses the points at which the fingerprints split, intersect or end. Figure 2.4 represents the
three phases involved in the fingerprint identification process as discussed earlier using the
minutia extraction algorithm.
Pre-processing Minutia Extraction Template
(33, 11 , 4, 1) (10011001)
(25, 18, 2, 0) (10101001) .. (18, 13, 0, 1) (10010011)
(13, 27, 2, 0) 1111 (11010100)
(75, 4, 8, 0) (10100110)
Figure 2.6 Minutia Based Algorithm [ 44]
Pattern Matching: Pattern matching algorithm in contrast to minutia matching takes into
account the overall fingerprint characteristics, not just individual points. This makes it less
prone to difficulties of recognizing a finger with varying fingerprint quality [ 44]. Basically,
this algorithm identifies fingerprints through the graphical comparison of fingerprint image,
as shown in Figure 2.7.
22
Pre-processing Minutia Extraction Template
(10011001)
.. (10101001)
(10010011)
(11010100)
(10100110)
Figure 2.7 Pattern Based Algorithm [44]
2.7.2 Performance
A fingerprint matcher can make two types of errors: a false match and a false non-match [ 43,
44]. A false match is one in which the matcher declares a match between images from two
different fingers. This type of error is sometimes statistically referred to as false acceptance
rate (FAR) and a false non-match, in which it does not identify images from the same finger
as a match. This is also called false rejection rate (FRR).
The classification strength of a biometric algorithm is determined by these two statistical
measures. "A system's fa lse match rate (FMR) and false non-match rate (FNMR) depend on
the operating threshold and are dependent operational threshold set [ 42]. In summarizing the
above challenge, [44] further maintained that FAR and FRR are diametrically opposed,
suggesting that increasing FAR will lower FRR and vice-versa. FIS performance is measured
in terms of its false positive identification rate (FPIR) and false negative identification rate
(FNIR). A false positive identification occurs when the system finds a hit for a query fin
gerprint that is not enrolled in the system. A false negative identification occurs when it finds
no hit or a wrong hit for a query fingerprint enrolled in the system. The relationship between
these rates is defined by FPIR = 1 - (1 - FMRt, where N is the number of users enrolled in
the system. Hence, as the number of enrolled users grows, the fingerprint matcher's FMR
needs to be extremely low for the identification system to be effective [ 42].
23
2.8 Related Works
In this section, we provide several works that have been carried out which concerns the
integrity of election system and the applications of biometric system.
A study carried out by Jones [36] shows that the voting system provided by e-voting does not
pledge that the vote is cast by an authentic person or one person, one vote. In addition, this
type of situation can give way to foul practices in the electoral process like chain voting,
multiple voting, ghosts voting or impersonation. In another study by Simons [ 1 O] , it was
stressed that having a voting system like an e-voting system cannot bring about
trustworthiness and the integrity of the elections can be threatened and compromised [26].
Also in a press release on e-voting [24], it was emphasized that the voting system can bring
about failures or corruption of democracy. Furthermore, it was stressed that if the democracy
is compromised by corrupt practices, the people inversely will also be corrupt. The study by
[36, 37, 38, 39] also reiterated that for any election to be completely conducted in a manner
that no room is made for doubt and opportunities for fraud and failures the entire systems has
to be made more transparent, trustworthy, accurate and reusable. lL,:~i,J In an attempt to reengineer the traditional electoral systems in Africa since e-voting cannot be
practiced due to the risks associated with it, several approaches have been proposed. One of
such approach is the proposal by Isong et al [ 12, 41]. In their studies they proposed an
approach to ensure that one man has one registration and vote through real-time registration
and identification of voters on Election Day. [12, 41] Proposed the use ofRFID-based Voters
Card and biometrics in the South African elections.
In the area of biometrics, large scale biometric-based IDm system, the fingerprint in
paiiicular, have found application in immigration control of several countries, vehicle
licensing offices for vehicles and driver's license, ministry of transportation, social security
departments, health ministry, [19, 32].
However, this research aims at providing a solution to the elections problems in Nigeria,
especially in the aspect of registration and identification. In this case, the major goal is to
design and implement system prototype that will assist in automating voters registration and
24
identification in a real-time mode to ensure that one person votes only once in an election and
is the authentic person without impersonation.
2.9 Chapter Summary
In this Chapter, we have discussed the various concepts and what has been done so far in the
literature. We have presented the election system in Nigeria and the challenges thereof. We
have also discussed biometrics system and have chosen fingerprints to be used as an
authentication factor. Also presented are related studies, key terminologies and identity
management issues. In the next Chapter, the analysis and design of the system will be
discussed.
25
Chapter 3: Biometric-based Framework Analysis and Design
3.0 Chapter Overview This Chapter focuses on the framework analysis and design of the system which is based on
biometric system. It starts with an introduction and progresses to a justification of using
fingerprint as authentication factor, requirements analysis and the design which includes the
components identification and architecture. The objective here is to analyse and design an
approach that will be used to meet the overall goal of this research.
3.1 Introduction
An election is considered free and fair if the electorate has confidence in it, the process is
transparent, trustworthy and the result is generally acceptable as the people's will. This is the
situation we want the election system in Nigeria to be. As discussed in Chapter 2, currently
the election process in Nigeria does not pledge that the person who cast the vote is an
authentic voter. This is due to the weak security measures that are in place which in turns
have given room for impersonation, rigging and other forms of malpractice.
Therefore, this Chapter 3 will specify and design an approach to assist INEC in combating
these threats that are gradually eating up Nigeria nascent democracy. In this case, we have
chosen the use of biometrics, fingerprints in particular, to help protect the integrity of the
system ranging from voter registration to actual voting in the capacity of identification and
authentication. The intuitive belief is that if voters are in real-time identified in both
registration and actual voting, it will go a long way to uphold elections integrity, not only in
Nigeria but in all nations where it is adopted and as well boost citizens confidence in the
election system.
3.2 Justification for Fingerprint Identification System
In today's e-society, identification and authentication problems have been considered
challenging [ 47]. As we have witnessed in a world today that is complex, increasingly
interconnected electronically and geographically mobile, identifying individuals accurately is
increasingly becoming important in the same way it becomes difficult to identify an
individual [ 47]. However, the importance associated with accurate identification is that it
26
could work as a deterrence in crime commission and fraud, protect resource that are critical
and so on [ 47].
Of the several approaches to curb this situation the biometrics-based approach is considered
the best. There are several biometric systems with each having its own strengths and
weaknesses in terms of security, cost, usage, etc. [ 4 7, 48]. Among the different biometric
traits captured in Figure 2.3 of Chapter 2, this study has adopted the fingerprint as a feature to
be used in identifying individual as authentic voters during elections. The justification for this
choice is its desirable properties and mode of operation.
3.2.1 Desirable properties of Biometrics
We chose the fingerprint to be used in this research based on the satisfaction of the essential
properties of any human physiological and behavioural features to be consider as biometric
system as discussed in Section 2.6.1 of Chapter 2. We used the assessment scale of low,
medium and high to evaluate each known biometrics system.
Table 3.1: Biometric systems evaluation
Biometric Univer- Unique- Perma- Collec- Perfor- Accep- Circum-sality ness nence tability mance tability vention
Human Medium Low Low medium Low High Low Voice Finger Medium High High Medium High Medium High print Face High Low Medium High Low High Low
Iris High High High Medium High Low High
DNA High High High Low High Low Low
Signature Low Low Low High Low High Low
Hand Medium Medium Medium High Medium Medium Medium Geometry
As shown on Table 3.1, we have chosen fingerprint based on its strengths in satisfying the
desirable properties. This is in line with the evaluation studies carried out by [ 4 7, 49]. With
these strengths, we believed it will be advantageous to employ it in the real-time
identification of voters.
3.2.2 Mode of Operations
Another factor that prompts our choice of fingerprint is due to the mode of its operations
which is also applicable to other biometric systems. These are the enrolment and the
verification or authentication process. Firstly, the process of enrolment corresponds to the
27
voter registration where potential voter's information 1s captured into the database for
identification purposes.
Secondly, the verification or authentication process corresponds to the actual identification of
voters against information on voters register before they are allowed to vote. In this research
since the biometrics process is synonymous to elections activities of registration and
identification for voting, it will become an added advantage to deploy them in elections to
uphold its integrity.
3.2.3 Others
Other essential factors that justify our choice of fingerprint are factors such as portable and
low-cost fingerprint capture devices, support for real-time identification and fast computing
hardware, its speed and recognition rate, ease-of-use and its security reliability [ 47, 49].
3.3 System Requirements and Analysis
In a software project, requirements constitute a critical building block of every system that is
to be developed for quality. In addition, for a better and efficient design for onward
development, there is a need to specify the basic and necessary requirements of the system.
Requirements elicitation and analysis are two important activities aimed at gathering and
analysing the requirements from the point-of-view of validity, consistency, and feasibility. As
we stated above, the elicitation method we applied is the observation approach and the source
is mainly the personal knowledge, INEC Officials and related stakeholders.
While concentrating on the detailed analysis of the requirements of the proposed system, use
cases description and other related diagrams will equally be used and the step by step
approach to achieve the objectives in this section will be as follows:
1) Identify and specify the system functionalities
2) Establish the role of different system model of the user
3) Use cases model description
4) Interaction diagrams analysis
This approach will be followed to achieve comprehensible requirements that can easily be
transformed to the proposed system design.
28
3.3.1 System Requirement Specification
In this section we will specify the requirements to be achieved by the proposed system. This
is j.mportant because they form the fust task for designing and developing the system.
Though, there are several requirements that the system needs to satisfy in order to function as
expected, in this research we will only specify the requirements that satisfy the overall goal of
this work which is indicated by prioritising and the order is from 1 to 5. 1 is represented as
the lowest priority while it moves to 5 as the highest.
To satisfy the overall goal in this research work, the following basic system requirements are
expected to be satisfied by the proposed system. Table 3.2 shows the basic functional
requirements (FR) and non-functional requirements (NFR) as well as their priority.
Table 3.2 system FR and NFR
Id Requirements priority
-FUNCTIONAL
FRI It shall grant access to VALID users 4
FRl.l Each user shall be authenticated before being granted access to the system 4
FR2 The system shall allow the system administrator to create and view user 5 accounts.
FR3 The system shall allow INEC officials to register voters once 1
FR4 It shall accept biometrics (fingerprint) for authentication 1
FR5 It shall allow INEC officials add, delete and update voter information 2
FR6 It shall be able to identify and authenticate registered voters based on 1 fingerprint on a real-time
FR7 The system shall create attendance registers of voters for auditing 3
FR8 Each VALID user shall be granted a privilege to view the attendance register 5
NON-FUNCTIONAL
NFRl The system shall be easily accessible from the web 1
NFR2 The system shall be secure 1
NFR3 The system response time shall be very minimal 1
NFR4 The system shall consume a few resources as possible (space and time) I
As shown on Table 3.2, for FR, FR2, RF4 and FR6 has the highest priority because they deal
with identification and authentication which are the core objectives of this research. RF3, and
29
RF4 one voter, one registration while RF4 and RF6 will implement one voter, one vote. This
is necessary to protect elections ' integrity.
In this study, only the basic requirements that reflect the objective of this work will be
analysed. In this case, requirements such as system access, voters' registration and
identification requirements will be analysed in terms of their description and justification.
The functionalities expected of the system are to grant access, register, identify and
authenticate voter, search, and update, create and maintain a database and so on.
3.3.1.1 System Login
Only authorized users shall be given access to the system. Valid users are the INEC staff and
system administrator.
Requirement Name: Login
Description: Feature that enables only authorized user to have access to the system.
Justification: Only authorized users that have valid credential can access the system.
3.3.1.2 Voter Registration
Functionalities to achieve effective registration of voters:
Requirement Name: Check Registration Status
~ NWU _ _l luoRARIJ ~ . -·
Description: It checks if the voter has already registered through biometric authentication.
Justification: One voter, one registration.
Requirement Name: Register Voter
Description: To register voter if not already registered
Justification: For a voter to participate in election, he/she must be registered.
Requirement Name: Update/Delete Voter
Description: To modify voter's information
Justification: Voters database has to be regularly maintained
3.3.1.3 Voter Identification and Authentication
The functionalities to authenticate a voter in order to vote:
Requirement Name: Identify Voter
Description: To check if a voter is actually registered and is the authentic voter.
Justification: Only registered voter is allowed to vote and do so once.
30
In the section that follows, we shall identify the actors and their roles using the use cases
analysis for comprehension effectiveness.
3.3.2 System Use Case Analysis and Model
This section shows the use case of the system which is applied to enhance the analysis and
modeling of the proposed system. In this case, system model of user is identified with their
interactions with the system. The system actors are shown in Figure 3 .1
Voter INEC Staff System A.dmin istrait<>r
Figure 3.1 System Model of the User
INEC System
Vote
r--------. 1
INEC System Access I I
Login
: System ~-··--·····
· ··· · ···-······--- -· ········ ·· ·······----·----------- ---·-------------- ·
Figure 3.2 system use case model
31
The roles of each actor are stated below:
A. Voter:
The role of the voter is:
1. Vote for a candidate
B. !NEC Staff:
The roles of the election officials are:
1. Register voters
11. Update/Delete Voter
lll. Identify Voter
IV. Print voters' register
V. Print election results
C. System Administrator:
The administrator roles ar-e:
1. Create User's Account
11. View users
n1. Create and maintain database.
3.3.3 Use Case Description
This section provides detailed description of the process involved in the use case analysis of
the requirements specified above. Table 3.3 gives a description of the system access; Table
3.4 gives a description of the voter registration process while Table 3.5 provides description
for voter identification and authentication process. Each use case table provides the name, the
actor, pre-condition, main scenarios and alternative scenarios. The descriptions are as
follows:
32
A. System Login
Table 3.3 System login
USE CASE ID Ucl Use Case Login Name Created By Duke, B. I Last Updated By I Duke, B Date Created 10/ 11/2014 I Last Revision date I 1911112014 Actor(s) Voter, INEC Staff, System Administrator Pre-condition The users should have valid user id and password to have access to the system
Main 1. To have access to the system, the voter, INEC staff or the admin must first Scenarios login
2. For a successful login (Voter) , a page which contains the ballot papers to cast votes is displayed
.., For a successful login (INEC staff), a page is displayed to perform voter .:, ,
registration or identification 4. for successful login (Admin), a page is displayed to create user account,
create database, view, print, etc. Alternative 1. unsuccessful login Scenarios • system inform of incorrect credentials
• step 1 in the main flow 2. not a valid or authorize user
B. Registration of voters
Table 3.4 Voters registration
USE CASE ID Uc2 Use Case Register Voter Name Created Bv Duke, B. I Last Updated Bv I Duke, B. Date Created 10/1 1/2014 I Last Revision date I 1911112014 Actor INEC Staff Pre-condition The staff have to first use the fingerprint of the voter to check the voter registration
status Main 1. To register a voter, the INEC Staff must first login Scenarios 2. If given access, he/she must first authenticate to check if voter has already
registered or not. 3. If no match, the official must capture the voter ' s information: ame,
ID._Number, Sex, Date_of_Birth, Town, Ward, Local_Government, State, Photo, Blood_group and Fingerprint
4. A voter is issued with a proof of registration, if necessary Alternative #status: if there is a match Scenarios I. Registration is denied
ii. The voter is issued proof of registration
33
C. Identification and Authentication
Table 3.5 Voters Identification and authentication
USE CASE ID Ucl Use Case Identify voter Name Created By Duke, B. I Last Updated By I Duke, B. Date Created 10/11 /2014 I Last Revision date I 1911112014 Actor INEC Staff Pre-condition The staff must first authenticate a voter
Main 1. To identify a voter, the official must first login Scenarios 2. If given access, he/she must perform fingerprint authentication on the voter
3. if he/she is a VALID voter and have not voted before, he/she is allowed to vote
4. after voting, the official registers the vote
Alternative 1. if not a valid voter, he/she is sent away Scenarios 2. if voted already, voting is denied OR voter sent away OR get arrested
D. Actual voting
Table 3.6 Vote for a candidate
USE CASE ID Ucl Use Case Vote Name Created By Duke, B. I Last Updated By I Duke, B. Date Created 10/ 11/2014 I Last Revision date I 19/1 1/2014 Actor Voter Pre-condition The staff must first authenticate a voter to check if registered or already voted
Main 1. To vote in an election, the voter, the official must authenticate the voter Scenarios using fingerprint
2. If the voter is a regi stered voter and has not voted before, he/she must first login
3. If given access, he/she is allowed to vote using the electronic ballot paper 4. After voting, the register is automatically created 5. the user logout successfull y
Alternative 1. if not a valid voter, he/she is sent away Scenarios 2. if voted already, voting is denied OR voter sent away OR get arrested
3.3.4 Sequence Diagrams
This section provides the sequence diagram which shows how INEC staff achieves the
objective of voters' registration and identification in the proposed INEC system. This is
captured in Figure 3.3.
34
CSTAFF
Login I
authenticate
Logged in or wrong acknowledge
oassword I I
Register Voters ~
store captured information
Capture "vOters info if not acknowledae the storaae
..--- i C, ♦ .:.. ..-~rt I I
,....._ Identify Voters
compare \.IC>ter finaerorint for a match
Voter allow to "vOte if acknowledge match or not
registered, otherwise - -not a l lowed
I T I Logout I
D ____ l_o-=g'-o_u_t_ s_ u _c _c _e_s_s_fu_ l __ _.l~I CJ
Figure 3.3 INEC Staff sequence diagram
As shown in Figure 3.3, for an INEC officer to have access to the system, he/she must first
submit a valid usemame and password otherwise he/she will not be allowed access. In the
event of a successful login, he/she will be authorized to perform the tasks of registering
voters during voter registration exercise or identify voters for voting on Election Day.
3.4 System Components and Design
In this section, we will start by identifying the various components and sub-components that
will be used to design the proposed system for effective implementation. The components
identified in this section will together act to meet the objective of combating impersonation
vulnerability during voter registration and voting. Without much detail, it is simply an
implicit transformation of the above stated requirements for onward implementation in the
Chapter that follows. Given the proposed system as discussed in this research, the
components that are of importance to realize our objectives are as follow:
35
1. INEC central voters' database where all registered voters' information is stored for
future use, updates, etc. on a real-time basis.
11. Fingerprint capturing device for obtaining the voters' biometrics (fingerprint) for the
purpose of authentication during voter registration and actual voting on Election Day.
n1. Network connectivity which will cover the entire country that will assist in the real
time registration and identification of voters.
1v. INEC mobile computer system.
These identified components will be discussed one after the other, highlighting their
requirements for better operation.
3.4.1 INEC Central Voters Database Design
Database will play a crucial role in the success of this proposed system. In order to
effectively and efficiently achieve the overall goal stated in this research, a central voters
database is required to store, retrieve and update voter information on a real-time basis. This
requires that the INEC maintain a relational database of all registered voters information.
That is, a relational database management system (RDBMS). As shown in Figure 3.4 is a
database schema created using SQL in particular, MySQL as the RDBMS. The business
rules that guide the creation of the schema are as follows:
1) Election has many voters
2) Each voter registers ONLY once
3) Each registered voter have to vote once
4) All INEC staff have to have one and only one account
1--- NWU- . I LIBRARYJ
The information to be captured for each voter is shown in Figure 3.4. The information needs
to be collected on a real-time mode. In this case, a voter can be identified and authenticated
using the fingerprint as input. This is simply the primary key of the database.
36
Vat•
ld_N~ irt(2 ~ Lat__ um: 111rc r[3 Fint__Num: 11rtha ·,C
Daa_olBirlb:: m!e Sc.: .. rctur Fq~_prir:it 'lll'Cl"ar~ m1e: .. !'rN~l)) To. · ,.rc!ur( \\rd: .. rct...-{ L« IL Go,,-i: \ll'tna( sw,_of_Or\Jm: .. rcu (3!l) Blood_G p: 'lllrclllr(
INEC_Slaf Us . _Acoouri
Vat• _ldentfi.caiio
Ti.int,.-: · ;;
U&t_ um: lll"C. ~ij Finl_Namt: •• rct..-(.?l}
'-----<------=-=--t .Dm_of.]3irtb:d,o
Regshtion
ld_Nmbr. iru(2()) Lat_,.~ um: \SChar{W} Fint~ 11n1: lllrma(~ Dafe_o{_Birtb: d,;ite
« 111rct:ar{11) Fqer_prirt: 111rcu{3!l} fflJe'. lli lCl'la"{3!)) Tc,,rn: wt:l'llr{W)
Wad: -..ctar{W} L«aLCicM: 111rdla(~ Statt_of_Oricin: 111iclla-{3!l) Blco _G10 ,P: 111rclur{t0}
c;: •char{t 1}
Fq.-_prirt: 'IIIICIIA'
mp: .. reu(3!l) Ta.mc\ll'c r{W} \\m: \ll'Ch r{W) L«ll_ Oovt '!llrd.a Siatt_d _Oriljo: 'lllrcblr :Blood_ G10 p: 'lllrella j
Figure 3.4 INEC central database schema
3.4.2 INEC System Interface
With the nature of the system, m order to simplify the visibility of voter's identity, we
propose the use of a mobile or a portable PC with the following configurations: 40 RAM,
5000b HDD, 2.8Hz, with at least a 40 wireless connection capabilities and a webcam. The
recommended computer has an-installed software with the required interface which can be
used to carry out all the tasks shown in Figure 3.2. In this case, INEC staff should be able to
login, register, search, identify print, display, and update voters' information.
3.4.3 INEC Network Connectivity
Due to the real-time mode of operation, a secure INEC network infrastructure has to be in
place with a good and strong coverage of the entire nation. The network is expected to be fast
and reliable in order to preserve quality and timely election. In this case, it requires that there
be a fast network connection between the central voter database and the INEC registration
and voting stations to ensure fast storage and retrieval of voter's informat ion during the
exercises. In this research, the wireless LAN (WLAN) is recommended for network
connection.
37
3.5 INEC System Framework Design
In this section, we present a biometric-based framework for identity management in the
Nigerian elections. This is shown in Figure 3.5. The framework is designed to help build a
credible election in the country which would help to ensure free and fair, transparent,
trustworthy elections by ensuring that one voter has only one registration and one vote.
Voter
REGISTRATION
Registrat ion Center
INEC COMPUTER
Voting Station
IDENTIFICATION
Other Info
AUTHENTICATION PROCESS CENTRAL DATABASE
Yes
Figure 3.5 INEC Biometric-based election framework design
As shown in Figure 3.5, the operation of the system is twofold: registration and identification
for onward voting.
Registration: During the registration exercise, each eligible voter is registered and the
necessary information as shown in Figure 3.4 are collated and stored in the INEC central
database in real-time basis. However, before each other is registered INEC staff must
determine if the voter has registered or not. In this case, he or she must be authenticated using
the fingerprint capturing device. The process involved is shown in Figure 3.6. This involves
capturing, processing and querying the database to find a match with the fingerprint image
already stored. If there is a match, the person is denied a second registration, otherwise he or
she is registered. 38
Query Feedback ()
resent fingerprint Registration
esent fing rint ~---~
Identification
SQL Generator
SOL queries
Figure 3.6 voter fingerprint authentication architecture
RDBMS
( Registration J
Identification: Identification of voters is conducted on Election Day. For every registered
voter to vote in an election, he or she must first be identified against registered information
stored in the database. This is done through authentication using the fingerprint capturing
device which operates in a real-time mode. It will also involve capturing, processing and
querying of the database to find a match with the fingerprint image data stored. If there is a
match, the person is allowed to vote, otherwise he or she does not get registered and is denied
the opportunity to vote.
With the operation of the election system in this manner, it is therefore possible to prevent or
to thwart all forms of malpractices such as rigging and impersonation or ghost voting. This
wi ll in tum go a long way to protect the elections' integrity and amassing peoples' confidence
in the system.
3.6 Chapter Summary
In this Chapter, we have provided a comprehensive analysis of the proposed system and the
major system components and their design specifications. All the components are required to
help build a credible election system in Nigeria. In the next chapter we shall show the
implementation of a system prototype and give explanation of their interfaces.
39
Chapter 4: INEC System Implementation
4.1 Chapter Overview
In this Chapter, we focus on the prototype implementation of the INEC system. It begins with
an overview of the system operation and then progresses to the explanation of the interface
functionalities offered by the system. In addition, the Chapter discusses the benefits of the
system. In a nutshell, the objective is to demonstrate how the proposed system can help INEC
to produce free and fair elections by protecting its integrity.
4 2 Proposed INEC System Overview
This presents an overview of the entire election process that is expected of INEC in order to
eliminate all forms of election malpractices from both voter registration to the actual voting
on Election Day. The overview is developed from the framework shown in Figure 3.9 of
Chapter 3. We captured this in Figure 4.1.
INEC Voter Registration Station
Voter Identification
I I
I I
I I
I I
I I
I I
I
I I
I I
I
-
I I I I I I I I I I I I I I I
INEC Polling Station
Figure 4.1 INEC election process
Voting
INE C Network
INEC Database Server
Figure 4.1 shows INEC election process during voter registration exercise and actual voting
on Election Day. The process starts with registration of voters where their personal
information considered vital including a fingerprint image is collected and stored onto the
40
INEC central database on a real-time mode. In the same vem, on Election Day, each
registered voter is first identified against their vital information stored in the database using
the fmgerprint as an authentication feature. The overall objective is to ensure that each voter
has one registration and one vote.
4.3 The INEC System
This section presents the system prototype developed for INEC election processes to ensure
security (confidentiality and integrity), efficiency and transparency. The system is simply a
prototype that demonstrates the operations of INEC towards credible e-voting. We discuss
them as follows:
4.3.1 Technology Used
To ensure quality of the system and to meet the overall goal that underpins this study, the
technologies used in the development of the system are Java programming language, MySQL
for the database using W AMP server and the NetBeans integrated development environment
(IDE). The system runs on windows operating systems from win7 to 8 and it is web-based.
4.3.2 INEC System Access
As shown in Figure 3 .1 of Chapter 3, three entities or participants are required to interact with
the system: the voters, INEC staff and the system admin. However, before each participant
can use the system, he/she must logon to the system for access to be granted. Only the system
admin and INEC staff have to login using the process of submitting valid usemame and
passwords. On the other hand, voters must first be identified using fingerprint authentication
before he/she is allowed to login for actual voting using their id_number as usemame and
surname as password.
To use the system, the first page that must first pop up is captured in Figure 4.2 . Then, the
user can click on the button NEXT in order to see the login page interface. If valid credentials
are submitted, access is granted, otherwise it is not granted. See Figure 4.3 and 4.4
respectively.
41
Figure 4.2 INEC system front page
Figure 4.3unsuccessful logon page
Figure 4.4 Successful logon page
4.3.3 INEC System Administrator
The system administrator, as already shown on Figure 3.2 of Chapter 3, has the
responsibilities of creating and viewing accounts of all the system users. In addition, the
admin is responsible for maintaining the INEC system and database. For the admin login into
the system, the page shown in Figure 4.5 is displayed.
42
ID>oaI nat~ ~
JI!!!!!_ ....., ~-~--~-~-~~.____,
O=IRKUJ~ ~E~"-",,""'°"='°=,--,1-=-=:'c"---=--..._~~c;;•"",=---',l::~,"'°"'="''c---i Q 1omnacsaoll!
ittlUll •I ~ ~
tftlll
CUil
Figure 4.5 system admin page
With the interface shown in Figure 4.5, the admin can perform the tasks of creating accounts,
view users, save users, delete users, clear, update and print user information. He/she can also
maintain INEC database such as restoring, formatting, and so on.
4.3.4 INEC Staff
INEC staff are employees of INEC, having the responsibilities for voter registration, voter
identification and printing of voter registers and election results. In order to carry out these
tasks, the INEC staff must first logon to the page shown in Figure 4.6.
- .;. INDEPENDENT
2014/ 11 /30 Sun 4: 13:33 .\\I
Figure 4.6 lNEC staff page
We shall present these responsibilities one after the other as follows: 43
4.3.4.1 Voter registration
Voters ' registration is the first exercise m the INEC election process. In this exercise,
potential voter information is collected and stored into the database for the purposes of future
identification and subsequent voting. In order to capture voter information, the INEC staff
must first click on the button REGISTRATION to get to the page shown in Figure 4.7 .
.;. INDEPENDENT
• A
~ 2014/11 /30 Sun 4:43:21 A\1 ~
lfilllll!al l)_JM.. J FRSL LAST_ .. l lO'MI IWE WMQ_ GeCL 0,1.TL . Ml« I I.CICA... , a.ocL fNIL Rf:Q_
•111 \Ii.fl \ICkUl A.iilll Cfeu_ 1001_ UH.I 15'0-.. N,2.. .I& 11111- .w•u .E:()_ .-.n ()w_s._ --- Ml IWI-.. 1141 ~ 0--ttozo .. IU'SET l"OF£ ""' Oeu_ 1ri1t-,-L Mil.£ 1n1-_ -.X 0tl.d., • Hl2fL tfil60 AWO Clib:III" Crou .. 1iOO RW... 1m- Q1 l(M t-11111- .1..U LM ~ ~ •- J.:o W,iU 1Wl- iBOI SON 8-1211L ~ ..04- NA Cr,u_ .liCa4l.... ffW.. 1H2-.. JIO'- AlJJ I• lllkL DU(( -ZCOO ~ Ot,u_ hie WU 1'5lk "5- 8olll ,,S.
"11 L TISST At'4 Cab:. o,;u_ ~ FIW-.. 1i~- .. l... 1>t.i 8-r.;nL 0!00t£ .HI W Croll- .... ;, L M,lf.f 1~- ~ 0tul1i Jfr
Figure 4.7 voter registration page
With the form shown on Figure 4.7, INEC staff have the responsibilities of entering, storing,
clearing, capture photographs and capture fingerprint images of the voter on a real-time basis.
The information that is required to be collected is shown in Figure 3.4 of Chapter 3.
However, to meet the overall goal of one man, one registration, the voter must first be
authenticated using the fingerprint to verify if he/she has already registered. If a match is
found, for registration, against the information stored on the INEC database, he/she is sent
away, proving that the voter is already registered. Otherwise, he/she is registered by the
INEC staff.
4. 3.4. 2 Voter identification
On Election Day, all registered voters are required to vote for candidates of their choice.
However, due to cases of election malpractices such as multiple voting, chain voting,
impersonation, etc. in INEC elections, voters need to be identified and documented first
before they are allowed to vote. Though in the existing practice, only physical identification
44
is done and is difficult to identify malpractices. We therefore, aim to solve this problem by
using biometrics authentication.
Given our system, as the voter tum up for voting, he/she is first authenticated to verify that
they are registered and have not voted earlier either in the same polling station or another
one. The interface shown on Figure 4.8 offers this capability.
l )JL flRST_j LAST_,_ TOWtl jSTA.TE WN<!J_ 1COJ;L °"TE.. MA.GE jLOCA... Bl.00.~ IFNGL RE.CL
11111- .wilES .((XL Adm CfoSL ACida.. M,ll,£ 1911+_ ~ NJ 0-"1ll... ATII N«)N_ ~ CrosL O!Md.... FtlM.... 1!11S-_ [lf2- Otiucll I. 11020_ ll,I.SS_ KlPE Nit Cfou_ Ntoa - WU 1991·- !605- Ot1U111 >&-11020._ l'fwW..... AM.IDI Cllaba'C,011....Abo FEW.... 1991·- ~ 8ol::I 8-11111_ AJCIE LY!r.l Cal&Mr C,011_ Abo WilE 1Hk l!Oe- hid 8-92111_ MNlCT JOt,S_ ~ Clou_ Ada4a- FDlo\.. 1992·- 11@3- ADI ►
ll().liL DUCE f,JJXXJ Cllab# C,Ou_ 8oft WU IVII).._ 1812.... 8ot:I .ta• 9' 1\L TESSY ~ Caabar CloSL AdaClt.. FORM 1~ - 1113- >Ii e-15111- OK0NE Jt,KI M Cnlss_ Mfgt _ MALE lgfS._ [IOL ~ M•
Pil::;t 4 0f 4 ilWOll~ ;' I 9 - - I + ooi>.
Figure 4.8 Voter Identification Page
Figure 4.8 presents the page used in identifying voters as registered voters on the database of
registered voters. The authentication factor is the fingerprint but in this demonstration, we
used the voter id_ number in place of fingerprint. When once there is a match with the
information in INEC database, the information shown on the form will displayed and the
voter is allowed to vote by automatically enabling the button VOTE. If there is no match, the
form remains blank and the voter is denied voting and the button VOTE remains disable. The
overall objective in this case is to ensure one man, one vote.
4.3.5 Voter
The voter is the registered individual who is eligible to vote in an election. On Election Day,
the voter must first be identified and authenticated before he/she can vote. With our system,
PVC is not allowed. Instead, as the voter is verified as shown in Figure 4.8, the button VOTE
is enabled and he/she can then login onto the e-voting and is allowed using the id_number
and surname as usemame and passwords respectively when once the button is clicked. The
login page is still the page shown in Figure 4.4.
45
When once he/she is granted access, the page shown in Figure 4.9A and Bis displayed .
.;. INDEPENDENT
2014/11 /30 Sun 4:56:45 A\1
0 • \J - LI "' - M""-'-c,...i-..C. -·· ..,,.
■ -- U <ff "" c..i.,...,..,.., ......
l~ u • --
Figure 4.9A Electronic Ballot Paper
.;. INDEPENDENT
2014/ 11/30 Sun 4:57:6 A\t
Figure 4.9B Electronic Ballot Paper
Figure 4.9A and B are the electronic ballot papers which contains all the registered political
parties quaiified to contest the election. In this case, the voters can cast their vote by clicking
on the political party' s logo of their choice. As he/she votes, the vote is registered
automatically against the party with the voter information such as state, local government,
electoral ward, and so on. The name and the id_number are excluded to preserve voters'
anonymity. When the voter votes, an acknowledgement is seen, showing that he/she voted
successfully (see Figure 4.10)
46
n • INDEPENDENT
2014/11 /30 Sun 4:58: 17 A\1
Figure 4.10 Successful Voting
With this system, a voter can vote in all elections such as federal, state, local government and
wards. In addition, as the voter login and vote, a voters register is created of all who have
voted this register can be accessed at all levels of government. The voter will be logged out
after voting and will not be granted access anymore for another voting.
4.3.6 Voted Personnel and Election Results 1--- NWU j LJBRARYJ
One of the most essential tasks of the INEC staff is the printing of voters' registers and
election results when needed. As shown in Figure 4.6, once the INEC staff click on the button
VOTED PERSONNEL, the page shown in Figure 4.11 will display. In this page, voters '
register can be created and election results printed .
.;. INDEPENDENT
2014/ 11/30 Sun 4:54:49 :\\1
Figure 4.11 INEC Information Printing Page
47
4.3.6.1 Voted Personnel
One of the problems INEC faces in their elections is the falsification of vote counts. That is
inflating vote values even more than the numbers of voters who voted. In this case, our
system provide solution to this problem by permitting vote audit. Here, voters who
participated in an election can be counted against the number of votes claimed and the
register be printed as well either in federal , state, local government or wards (see Figure
4.12).
.;. INDEPENDENT
2014/11 /30 Sun 5:19:27 A\I
--- I"'°"-..., , TO'M£ , STAil , .. "' - --..... "' ,.. er.,~
"" , ... la Owabll
""" - ... --~- - Cm~ Crnsbs - "' Cllilt.ar O.tbtt
'""" ... - --.... ... c..ie.- ~-?WY "' Call~ cm,Aiwtr """'£ ,_
"' --
Figure 4.12 JNEC voter register printing page
When once a selection criteria is chosen, the register can be printed. For instance, Figure 4.13
shows the pdf generated register of voters in Cross River State during a presidential election.
F!RDfAAL filCT10NS R6'0!U B.!!:ll'fllfTB>:5170.lrlJ
Di&.TE PRlNTfD: lOU-11-'30
~by U.SHW.E. XAVI 0911 1123W>l2
NOTf Tt9$ REPORT IS FOR OFflCf:: USE ON:n
Figure 4.13 JNEC voter register
48
4.3.6.2 !NEC results
After actual voting, election results can be printed out of the system for public viewing by the
appropriate authorities. The results are shown against each political party that participated in
the elections, as shown in Figure 4.14.
M.mJC/llllfll!JO_ ~ 2014-IHII M1ncldC11lifts1CJ0L ~ 201>11·20 1'!dCo11fss""•- ACl!l 2014-1~20 1'!'1Co1Jm Fl\'~IL ICfN 2014-11-:IO ,,,"" f« °""""1 1/) 2014-1~20 llanct f«Otmoaaq 1/) 201>11-:IO Mk>! DtmocralcClllif_ /OC 201>1~20 Iron Dtmocnlc Clllif_ /OC 201>11-:IO lmnPtOlills!lm IPA 201~1~20 lmn PIOllifl!lm IPA 201~11-20 !il ffiOGRfSlMSCO_ liC 2014-1~20 !il ffiOGRfSlMS CO_ liC 201>11-:IO Al~ts1R1Gml/L JIG>. 201~1~20 MPrGJtSU.1sGlaldJ&... N'GA 201>11-20 Ci:ffl1P<!,Jb,J'o\' CPP 201H~20 Cie .. POIIWIIII' CPP 201,11-20 Dtmocralc l!Ollifsll\'li'P 2014-1~20 DtmoailtPl'll!s Pat/ li'P 201, 11-20 KlEP!IWlfllEllOC__ C 2014-1~20 Hl£1Ell1EHT OOIOCIL C 201,11-20 Kan Pq l'J' 2014-\HQ Klrafo\f l'J' 201,11-20 lll«IFI\' L' 2014-1~20 Laix>Jr Pq L' 201,11-20 1111' ~~ SM P•IIIIL lff'P 2014-\HI i111' ~"1IISM F10llif_ lff'P 201,11-20 NalooiCoolomPI\' NJ> Hal«illCO.Sdmll\' NJ> 20!>11-20 NIWlliOia F!Ollifl Pl\' lffP Hlwt.lgoil l tOlillslll' lffP 201>11-20 PIO!Hf«-c.. IC0 PtOlill f«-CL IC0 201• 1~20
' """' - WO,_ 11111 P101111Ct:IIOOlkiio,i_ 11111 201>11-:IO
PIOIHSOt<>coakFII' Pill' PfOIIKOt:IIOOlklo\f Pill' 201>11-:IO s,;,, p !IL PPA essM P ,,..__ PPA 201>11-:IO
PAGfl()f~ O~\O~JS "..i E :;: ~ ---+--+ OB
Figure 4.14 JNEC Results Printing Page
As shown in Figure 4.14, election results can be monitored even as voting progresses. This
could be advantageous for INEC since election results are currently counted manually, this
takes several days to complete and not safe as it gives an opportunity room for rigging.
4.4 Proposed System Benefits
The system proposed in this research would offer lots of benefits if practically adopted for
implementation by INEC for use in their elections. The benefits are as follows:
1) This system protects the integrity of the electoral system as it ensures that a voter does
not have multiple registration and can vote only once through the use of biometric
49
technology in a real-time mode. In this case, all forms of election malpractices such as
multiple voting is eliminated,
2) Falsification of results is eliminated as the system can account for all voters vote in an
election.
3) Time, cost and resources are conserved as vote counting is done automatically. The
ballot papers are collated as physical evidence.
4) The creation of a central database can be used by other sectors of the economy for
developmental projects,
5) The implementation of this system can bring about national development in terms of
ICT as network coverage will be in every comer of the country.
4.5 Limitations
Though this system is geared towards re-engineering the existing traditional electoral
system practiced by INEC which aim at protecting the election integrity, there are also
several issues that will limit its operations. These include:
1) The security of the system is of great concern especially since it is a web-based
system. Given sophisticated cybersecurity threats that exist today, they could
affect the system operation adversely such as hacking, denial of service, etc.
2) The unacceptability of the system by politicians could be another limitation.
Considering the operation of the system, it is possible that Nigerian politicians
will not endorse the system since it will prevent them from rigging and other
forms of malpractices.
3) Maintaining the INEC network that will cover the entire country could affect the
adoption and implementation of the system, especially as it requires the
availability of electricity considering the challenges of electricity in the country.
These are some of the factors that could affect the operations of the system. However, if these
are the problems, strong measures can be taken to ensure they are not allowed to occur.
4.6 Chapter Summary
In this chapter, we have presented an overview of the system as well as the interfaces and the
functionalities offered by the INEC system prototype implemented in this research. We have
also highlighted the benefits and limitations of the system.
50
Chapter 5: Summary, Conclusion and Future Works
5.1 Summary
In order for democracy to function effectively confidence and trust in the electoral system is
very important. This requires having processes that are transparent and all participants are
allowed to exercise their rights as stated in the constitution. The fact remains that if voters
lack confidence in the freedom and fairness of the elections, their participation level could
decline. In this case, elections have to be conducted in an orderly manner which is free of
voter fraud and malpractice. However, the opposite is the case in Nigerian elections. This
research therefore, proposes a solution to the existing problems.
In this research, we have presented the technique and tool that can be used to protect election
integrity in Nigerian INEC. To achieve this, three research questions: RQl, RQ2 and RQ3
were asked in order to find acceptable and lasting solution to the existing election challenges.
RQl addressed the issues of a suitable security technology that will be used to protect
elections' integrity and voters ' identity. Here, our choice goes to the biometric system,
fingerprint in particular. The choice of this authentication factor was based on a number of
criteria such as mode of operation, satisfaction of desirable properties of biometrics and other
factors such as cost, security strengths, support for real-time identification etc.
RQ2 addresses how voters ' identity can be managed effectively. In this case, we proposed an
approach which involves the collection of voter's information including fingerprint and
which uses the fingerprint as an authentication feature to ensure that one individual has only
one registration and vote. In this approach, a voter' s identity can only be confirmed by the
voter only. RQ3 addresses the biometrics-based framework design that allows for credible
elections in Nigeria. Here, we designed a fingerprint-based authentication framework that
will protect elections integrity starting from voter registration to the actual voting. In this
case, voter registration is done in a real-time basis, using the fingerprint to ensure that every
voter registers once. Accordingly, on Election Day, every voter must be identified on a real
time basis using the fingerprint as an authentication feature. In this case, only registered
voters are allowed to vote and vote only once.
As a means of re-engineering the existing traditional electoral system of INEC, a system
prototype was implemented that offers all the functionalities needed to meet the overall goal
51
of this research. In addition, the system offers an e-voting functionality with electronic ballot
papers that allows voters to vote electronically.
5.2 Conclusion
Having a credible election system should be a priority of every democratic government.
Though Nigerian elections have suffered a series of malpractice incidents which have brought
about corruption, the believe is that if strong security measures are put in place both the voter
registration and authentication during actual voting, the existing challenges faced by INEC
will be a thing of the past.
In this research, we have designed and implemented a biometrics-based electoral system that
can help INEC uphold electoral integrity. The system offers a number of benefits which are:
1. Ensuring one man has one registration and one vote
11. Protecting and managing voters ' identities
111. Eliminating resource and time wastage
1v. Promoting reusability by ensuring that information gathered are stored for future.
Considering these benefits, ·we conclude that if INEC is to conduct election in the manner
discussed in this research, it will go a long way to protect elections integrity and make it
attractive for adoption by other democratic countries in Africa.
5.3 Future Work
The system designed and implemented in this research is a prototype. The future work should
go in-depth and gather more quality requirements that will assist in the implementation of a
complete system that has all the functionalities needed. Once a completed system is
implemented, that can be presented to the INEC body for adoption and recommendations.
Additionally, we shall address the security of the system and any other factor that may affect
its smooth operations. It is also recommended that future works should endeavour to go
beyond prototype and we intend to use a distributed and parallel system to implement the
biometric samples collected.
52
References
[1] Held, D. Models of Democracy. Cambridge: Policy Press, 1996
[2] Ballinger, C. & Coleman, S. Elections and the Internet Some Issues Considered, Hansard
Society, 2001
[3] Xenakis, A. and Macintosh, A., E-electoral administration: organizational lessons learned
from the deployment of e-voting in the UK. ACM International Conference Proceeding
Series, Digital Government Research Center, volume 89, page 191-197. 2005
[4] Obeten, O.E. and Isong, B.E: Reengineering the Traditional Electoral Process via Real
Time Registration and e-identification of Voters: An Approach for Developing Countries.
Canadian Journal on Data Information and Knowledge Engineering Vol. 2 No. 3, June
2011
[ 5] Gronlund, A. Democracy in an IT-framed society. Communications of the ACM, January
2001 , Vol.44
[6] Bertrand Haas, ""'Engineering Better Voting Systems", DocEng'06, ACM, Amsterdam,
The Netherlands, October 10--13 2006, p-56-58
[7] Xenakis, A. and Macintosh, A.: Using Knowledge management to improve Transparency
in E-voting, KMGov 2003, pp. 274-284, 2003.
[8] Wagner, D: Risks of e-voting, Communications of the ACM, Vol. 50 Issue 11, ,
November 2007
[9] Dill, D. L: Electronic Voting: An Overview of the Problems, Computer Science, Stanford
University, 2004.
[10] Simons, B: Electronic voting systems: the good, the bad, and the stupid,
Communications of the ACM, October 2004, Vol. 2 Issue 7
[11] Gaines, J: Democracy's downfall: is the computing technology for electronic voting
secure and reliable enough for national use? Communications of the ACM, December
2006, Vol.36 Issue
[12] B. Isong, 0 . Ekabua and M . Mbodila: Towards One Person, One Vote via Real-Time
Voter's Registration and Identification
[13] Han, B. et al. BioID: Biometric-Based Identity Management. ISPEC 2010, LNCS
6047,pp.241-250,2010.
53
[14) Justus, I.B. "Identity Management Series - Role- and Rule-Basing Part 1:
Introduction". THE SECURITY CATALYST helping people effectively communicate
value. Michael Santarcangelo, 18 June 2010
[15) Waters, J.K. "The ABCs of Identity Management". CSO. IDG Enterprise, 23 May
2012.
[16) Barisch, M. Security and privacy enablers for future identity management systems.
Future Network and Mobile Summit, 2010, page 1, 2010
[17) Wayman, J.L. Biometrics in Identity Management Systems. IEEE Computer Society,
pp. 1540-7993, vol.08, 2008
[18) Prabhakar, S., Pankanti, S. and. Jain, A.K. "Biometric Recognition: Security and
Privacy Concerns," IEEE Security & Privacy, vol. 1, no. 2, 2003, pp. 33-42.
[19) Wayman, J.L. (Ed.), National Biometric Test Center - Collected Works Version 1.3,
http://www. ecc. unh. edu/biometric/biomet/public _ docs/nbtccw _TEST. pdf, 2 000,
requested April 2014
[20) Watson, A. "Biometrics: Easy to Steal, Hard to Regain Identity," Nature, vol. 449,
2007, p. 535 .
[21) Creswell, J.W.: Research Design: Qualitative, Quantitative, and Mixed Methods
Approaches, 4th Edition, 2013 ISBN-13: 978-1452226101
[22) Welch, E. W and Hinnant, C.C., "Internet Use, Transparency, and Interactivity
Effects on Trust in Government" Proceedings of the 36th Hawaii International
Conference on System Sciences (HICSS '03) IEEE, 2003
[23) Yanqing, G."Analysis on How to Enhance E-Democracy through E-Government",
Proceedings of 2011 IEEE International Conference on Management and Service Science
(MASS), August, 2011
[24) Norris, P. Deeping Democracy through E-Governance, Harvard University. The other
e-participation-related article commissioned by the UN as an input into their World
Public Sector Report, May 2003
[25) E-Democracy: Putting Down Global Roots, Janet Caldow, IBM Institute for
Electronic Government, January 2004
[26) Macintosh, A. Characterizing e-participation in policy making. In the Proceedings of
the 37th Annual Hawaii International Conference on System Sciences, USA, 2004
[27) INEC Biometric Voter Registration. http://www.osundefender.org/?p=84402 Access
date (16/07/2014)
54
[28] Jesse Leskinen: Evaluation Criteria for Future Identity Management. IEEE 11th
International Conference on Trust, Security and Privacy in Computing and
Communications (TrustCom), pp. 801-806, 2012
[29] Thompson, C. and Thompson, D: Identity management. Internet Computing, IEEE,
11(3): 82-85, may-june 2007
[30] L. Jean Camp: Digital Identity, IEEE Technology and Society Magazine, Fall 2004
[31] Dabrowski, M: Modular reference framework architecture for Identity Management.
ICCS 2008. 11th IEEE Singapore International Conference on Communication Systems,
pp. 743 - 749, 2008
[32] Siraj A.Shaikh, JosephR.Rabaiotti: Characteristic trade-offs in designing large-scale
biometric-based identity management systems. Journal of Network and Computer
Applications 33 (2010) 342-351
[33] J. L. Wayman, "Biometrics m Identity Management Systems" . IEEE Computer
Society, pp. 1540-7993, vol. 08, 2008.
[34] S. Prabhakar, S. Pankanti, and A. K. Jain, "Biometric Recognition: Security and
Privacy Concerns," IEEE Security & Privacy, vol. 1, no. 2, 2003, pp. 33--42.
[35] Jain, A.K. , Bolle, R. and Pankanti, S.: BIOMETRICS: Personal Identification in
Networked Society. Kluwer Academic Publishers, New York, 2002, pp. 1-42
[36] Douglas W. Jones, "Chain Voting", Threat Analyses & Papers, NIST, Aug 26, 2005
http://vote.nist.gov/threats/papers/Chain Voting.pd[ (16/04/14)
[37] Anthony D. F ., Andrew P., Emmett S. , and Vladimir V. "Small vote Manipulations
Can Swing Elections: Considering the effects and implications of changing only a single
vote per machine", COMMUNICATIONS OF THE ACM, October 2004, Vol 47, No. 10,
pp. 43-45
[38] Benjamin B. Bederson, Bongshin Lee, Robert M. Sherman, Paul S. Hermson, Richard
G. Niemi, "Electronic Voting System Usability Issues", CHI 2003, ACM, Ft. Lauderdale,
Florida, USA, April 5- 10, 2003, pp. 145-152.
[39] Chris A . and Ralph M. , "E-Voting and Computer Science: Teaching About the Risks
of Electronic Voting Technology", ITiCSE'05, ACM, Monte de Caparica, Portugal, June
27-29, 2005, pp. 227-231.
[ 40] Arthur M., David M., Joseph L. and Arnold U ., "Privacy Issues in an Electronic
Voting Machine", WPES '04, ACM, Washington, DC, USA , October 28, 2004, pp. 33-
34.
55 ' ' NWU-,\.l lfRRARY
[41) Isong Bassey and Ndwamato Netshipise: "Extending £-Democracy to Enhance Voter
Registration and Identification : South Africa Elections Perspective" International Journal
of Computer Science & Engineering Technology (IJCSET), India. Vol. 4 No. 01. Jan
2013, pp. 35-43
[ 42] Jain et al. On latent of fingerprint enhancement. Proc. SPIE 7667, Biometric
Technology for Human Identification VII, 766707 (April 14,201 O);
doi:10.1117/12.851411
[43] Nagar, A., Nandakumar, K. and Jain, A.K. A hybrid biometric cryptosystem for
securing fingerprint minutiae templates, Pattern Recognition Letters 31 (2010) 733-741
[ 44] Fingertec, T. Fingerprint technology white paper, 2005,
http: //www.fingertec.com/download/tips/whitepaper-01.pdf (22/10/2014)
[ 45] Independent Electoral Commission of Nigeria:
http://www.inecnigeria.org/?page _id= 14 Access date 28/9/2014
[ 46] INEC Voters Registration: http: //www.m2sys.com/biometric-fingerprint-software-
case-studies-nigerian-voter-registration/ Access date (20/07/2014)
[ 47) Jain, A.K. , Bolle, R. and Pankanti, S.: BIOMETRICS: Personal Identification in
Networked Society. Kluwer Academic Publishers, New York, 2002, pp. 1- 42
[ 48) R. Clarke, "Human identification in information systems: Management challenges
and public policy issues," Information Technology & People, Vol. 7, No. 4, pp. 6-37,
1994.
[49) O'Gorman, L. Fingerprint Verification : BIOMETRICS : Personal Identification m
Networked Society. Kluwer Academic Publishers, New York, 2002, pp. 43-45
[50] Nnamani, Desmond Okechukwu: Journal of Good Governance and Sustainable
Development in Africa (JGGSDA), Vol. 2, No 3, December, 2014. Website:
http://www.rcmss.com. ISSN: 2354-158X (Online) ISSN: 2346-724X (Print) 2014,
2(3):78-99.
56
Appendix
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools I Templates * and open the template in the editor. */
package proto;
/**
* * @author DUKE */
import java.sql. *; import javax.swing. *; public class javaconnect {
Connection conn=null; public static Connection ConnecrDb() {
try {
Class. forN ame(" com.mysq l.j dbc.Driver"); Connection conn =
(Connection)DriverManager.getConnection("jdbc:mysql: //localhost:3306/prototype","app","a pp");
}
/*
return conn; } catch (ClassNotFoundException I SQLException e) {
J OptionP ane. show MessageDialog( null, e);
} }
return null;
57
* To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools I Templates * and open the template in the editor. */
package proto;
import static java.lang.Thread.sleep; import j ava. util. Calendar; import j ava. util. Gregorian Calendar; import java.util.logging.Level; import j ava. util.logging.Logger;
/**
* * @author DUKE */
public class welcome extends javax.swing.JFrame {
/** * Creates new form welcome */
public welcome() { initComponents(); currentDate() ;
} public void currentDate() {
Thread clock; clock = new Thread() {
public void run() { for(;;) {
Calendar cal= new GregorianCalendar() ; int month= cal.get(Calendar.MONTH); int year= cal.get(Calendar.YEAR); int day= cal.get(Calendar.DA Y _OF_ MONTH);
int days= cal.get(Calendar.DA Y _OF_ WEEK); if( days== 1) jLabel9 .setText(year+"/"+(month+ 1 )+"/"+day+" "+"Sun"); else if( days==2) j Label9 .setT ext(year+" /"+( month+ 1 )+ "/"+day+" "+"Mon"); else if(days==3) jLabel9.setText(year+"/"+(month+ 1 )+"/"+day+" "+"Tue"); else if(days==4) jLabel9.setText(year+"/"+(month+l)+"/"+day+" "+"Wed"); else if( days==5) jLabel9 .setText(year+"/"+(month+ 1 )+"/"+day+" "+"Thur"); else if( days==6) jLabel9.setText(year+"/"+(month+ 1)+"/"+day+" "+"Fri"); else if(days==7) jLabel9 .setText(year+"/"+(month+ 1 )+"/"+day+" "+"Sat");
58
int second= cal.get(Calendar.SECOND); int minite= cal.get(Calendar.MINUTE); int hour= cal.get(Calendar.HOUR); if(hour==0) {
hour=l2;} int n=cal.get(Calendar.AM _PM); if(n==0)
jLabell 0.setText(hour+" : "+(minite )+": "+second+" AM"); else
};
jLabell0.setText(hour+":"+(minite)+":"+second+" PM");
try { sleep(l 000) ;
} catch (InterruptedException ex) { Logger.getLogger(admin.class.getName()).log(Level.SEVERE, null, ex);
} }
}
clock.start(); }I** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. *I
@Suppress W amings( "unchecked") II <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() {
jPanell = new javax.swing.JPanel(); jLabell = new javax.swing.JLabel(); jLabell 0 = new j avax.swing.JLabel(); jLabel9 = new javax.swing.JLabel(); jButtonl = new javax.swing.JButton();
setDefaultCloseOperationUavax.swing.WindowConstants.DO _NOTHING_ ON_ CLOSE); setUndecorated(true ); setResizab 1 e( false) ;
jPanell.setBackground(new java.awt.Color(0, 51 , 51));
jLabell .setBackground(new java.awt.Color(0, 0, 0)); jLabell.setFont(new java.awt.Font("Times New Roman", 1, 36)); II NOI18N jLabell .setForeground(new java.awt.Color(255 , 255, 255)); jLabel 1.seticon(new
javax.swing.Imageicon(getClass().getResource("lproto/logo.png"))); II NOI18N
59
jLabell0.setBackground(new java.awt.Color(0, 0, 0)); jLabell0.setFont(new java.awt.Font("Times New Roman", 1, 36)); // NOI18N jLabell0.setForeground(new java.awt.Color(255, 255, 255));
jLabel9.setBackground(new java.awt.Color(0, 0, 0)); jLabel9.setFont(new java.awt.Font("Times New Roman", 1, 36)); // NOl18N jLabel9.setForeground(new java.awt.Color(255 , 255, 255));
jButtonl .setText("NEXT"); jButtonl .add.ActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonlActionPerformed(evt);
} } );
javax.swing.GroupLayout jPanel 1 Layout = new javax.swing.GroupLayout(jPanel 1 ); jPanel 1.setLayout(jPanell Layout); jPanel 1 Layout. setHorizontalGroup(
jPanel 1 Layout. createParallelGroup(j avax. swing. Group Layout.Alignment.LEADING) .addGroup(jPanel 1 Layout.createSequentialGroup()
.addGroup(jPanell Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADI NG)
.addGroup(jP anel 1 Layout. createSequential Group() .addGap(50, 50, 50) .addComponent(jLabel9, javax.swing. Group Layout.PREFERRED_ SIZE, 301 ,
javax.swing.GroupLayout.PREFERRED _ SIZE) .addGap(37, 37, 37) .addComponent(jLabell 0, javax. swing.GroupLayout.PREFERRED _ SIZE,
223 , javax.swing.GroupLayout.PREFERRED _ SIZE)) . addGroup(j Panel 1 Layout.createSequential Group()
.addGap(l 79, 179, 179)
.addComponent(jLabel 1)) . addGroup(j avax. swing. Group Layout.Alignment. TRAILING,
jPanel 1 Layout.createSequentialGroup() . addContainerGap() .addComponent(jButtonl , javax. swing.GroupLayout.PREFERRED _ SIZE,
109, javax.swing.GroupLayout.PREFERRED _ SIZE) .addGap(218, 218, 218)))
.addContainerGap(29, Short.MAX_ V AUJE)) ); jPanel 1 Layout.setVerticalGroup(
jPanel 1 Layout. createParallelGroup(j avax. swing. GroupLayout.Alignment. LEADING) . addGroup(j avax. swing. Group Layout.Alignment. TRAILING,
jPanel 1 Layout.createSequentialGroup() .addContainerGap(83, Short.MAX_ VALUE) .addComponent(jLabel 1) .addGap(44, 44, 44)
60
.addGroup(jPanellLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADI NG)
.addComponent(jLabel9, j avax.swing. GroupLayout.PREFERRED _ SIZE, 53, javax.swing.GroupLayout.PREFERRED _ SIZE)
.addComponent(jLabell 0, javax.swing.GroupLayout.PREFERRED _ SIZE, 53, javax.swing.GroupLayout.PREFERRED _ SIZE))
.addGap(35, 35, 35)
.addComponent(jButtonl , javax.swing.GroupLayout.PREFERRED _ SIZE, 32, javax.swing.GroupLayout.PREFERRED _ SIZE)
.addGap(48, 48 , 48)) );
javax.swing.GroupLayout layout= new javax.swing.GroupLayout(getContentPane()); getContentPane(). setLayout(la yout); layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup()
.addComponent(jPanel 1, javax.swing. Group Layout.PREFERRED_ SIZE, javax.swing.GroupLayout.DEFAUL T _ SIZE, javax.swing.GroupLayout.PREFERRED _ SIZE)
.addGap(0, 0, Sho11.MAX_ VALUE)) ); layout. set Vertical Group(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanell, javax.swing.GroupLayout.DEF AULT_ SIZE,
javax.swing. GroupLayout.DEF A ULT_ SIZE, javax.swing.GroupLayout.PREFERRED _ SIZE)
);
pack(); setLocationRelativeTo(null);
}// </editor-fold>
private void jButtonl ActionPerformed(java.awt.event.ActionEvent evt) {
new login().setVisible(true); this.dispose(); // TODO add your handling code here:
}
/** * @param args the command line arguments */
public static void main(String args[]) { /* Set the Nimbus look and feel*/ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code ( optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and
feel.
61
* For details see http: //download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.htrnl
*/ try {
for (javax.swing.UIManager.LookAndFeellnfo info : j avax. swing. UIManager. getlnstalledLookAndF eels()) {
if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break;
} }
} catch (ClassNotFoundException ex) {
j ava. util. logging.Logger. getLo gger( welcome. class. getN ame() ). log(j ava. util.logging.Level. SE VERE, null, ex);
} catch (InstantiationException ex) {
j ava. util. logging. Logger. getLogger( welcome. class. getN ame()). log(j ava. util .logging.Level. SE VERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(welcome.class.getName()).log(java.util. logging.Level.SE VERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
j ava. util. logging.Logger. getLogger( welcome. class. getN ame() ). log(j ava. util.logging.Level. SE VERE, null, ex);
}
} //</editor-fold>
/* Create and display the form*/ java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
} } );
}
new welcome().setVisible(true );
// Variables declaration - do not modify private javax.swing.JButton jButtonl; private javax.swing.JLabel jLabell ; private javax.swing.JLabel jLabell O; private j avax. swing.JLabel j Label9; private javax.swing.JPanel jPanel 1; // End of variables declaration
62
I* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools I Templates * and open the template in the editor. */
package proto;
import com.sun.glass.events.KeyEvent; import j ava.awt.HeadlessException; import j ava. awt. event.Window Adapter; import j ava. awt. event. Window Event; import java.io.File; import java.io.IOException; import java.sql. Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import j ava. util. Calendar; import j ava. util. Gregorian Calendar; import j ava. util.logging.Level; import java. util.logging.Logger; import javax.swing. *; import j avax. swing. UIManager;
/**
* * @author DUKE *I
public class login extends javax.swing.JFrame {
/** * Creates new form welcome */
public login() { addWindow Listener(new Window Adapter() {
@Override public void windowClosing(WindowEvent we){
Object[] options= {"YES","NO"}; final JOptionPane optionPane = new JOptionPane(); int n = JOptionPane.showOptionDialog(rootPane,
"Do you really want to exit" + "?", "A Safety Question", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, options,
63
options[l]); if(n==0) System.exit(0);
}
} ); initComponents(); currentDate();
conn=j avaconnect. ConnecrDb(); }
Connection conn=null; ResultSet rs=null; PreparedStatement pst=null; String l="LOGGED_IN";
public void currentDate() { Thread clock;
clock = new Thread() { public void run() {
for(; ;){ Calendar cal= new GregorianCalendar(); int month= cal.get(Calendar.MONTH); int year= cal.get(Calendar.YEAR); int day= cal.get(Calendar.DA Y _OF_ MONTH);
int days= cal.get(Calendar.DA Y _OF_ WEEK); if( days== 1) jLabel9.setText(year+"/"+(month+ 1)+"/"+day+" "+"Sun"); else if(days=2) jLabel9 .setText(year+"/"+(month+ 1 )+"/"+day+" "+"Mon"); else if( days==3) jLabel9.setText(year+"/"+(month+ 1 )+"/"+day+" "+"Tue"); else if(days==4) jLabel9 .setText(year+"/"+(month+ 1 )+"/"+day+" "+"Wed"); else if(days==5) jLabel9 .setText(year+"/"+(month+ 1 )+"/"+day+" "+"Thur"); else if( days==6) jLabel9.setText(year+"/"+(month+ 1)+"/"+day+" "+"Fri"); else if( days==7) jLabel9.setText(year+"/"+(month+ 1 )+"/"+day+" "+"Sat"); int second= cal.get(Calendar.SECOND); int rninite= cal.get(Calendar.MINUTE); int hour= cal.get(Calendar.HOUR); int n=cal.get(Calendar.AM _PM); if(hour==0) {
hour=12;} if(n==0)
jLabell 0.setText(hour+": "+(minite )+": "+second+" AM");
64
}
else jLabell 0.setText(hour+": "+(minite )+": "+second+" PM");
try { sleep(l 000);
} catch (IntenuptedException ex) { Logger.getLogger(login.class.getName()).log(Level.SEVERE, null, ex);
} }
}; clock.start();
}
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */
@Suppress W arnings("unchecked ") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() {
jPanel2 = new javax.swing.JPanel(); jLabel9 = new javax.swing.JLabel(); jLabell0 = new javax.swing.JLabel(); jButton8 = new javax.swing.JButton(); jDesktopPanel = new javax.swing.JDesktopPane(); jLabell = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jTextFieldl = new javax.swing.JTextField(); jPasswordFieldl = new javax.swing.JPasswordField(); jButtonl = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jLabel3 = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants .DO _NOTHING_ ON_ CLOSE); setF ocusable( false);
setModalExclusionType(java.awt.Dialog.ModalExclusionType.APPLICATION_EXCLUDE );
setUndecorated(true ); setResizable(false ); addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) { formMouseClicked( evt);
65
} } );
jPanel2.setBackground(new java.awt.Color(0, 51, 51)); jPanel2.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) { jPanel2MouseClicked( evt);
} } );
jLabel9.setBackground(new java.awt.Color(255, 255, 255)); jLabel9.setFont(new java.awt.Font("Times New Roman", 1, 72)); II NOI18N jLabel9.setForeground(new java.awt.Color(255, 255, 255));
jLabell0.setBackground(new java.awt.Color(255, 255, 255)); jLabell0.setFont(new java.awt.Font("Times New Roman", 1, 72)); II NOI1 SN jLabell0.setForeground(new java.awt.Color(255 , 255, 255));
jButton8.setFont(new java.awt.Font("Tahoma", 1, 11)); II NOI18N jButton8. setT ext("EXIT"); jButton8. addActionListener( new j ava.awt. event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) { jButton8ActionPerformed( evt);
} } );
jDesktopPanel .setBackground(new java.awt.Color(255, 255, 255)); jDesktopPane 1. setBorder(j avax. swing. BorderF actory. createTitledBorder(null,
"LOGGIN", javax.swing.border.TitledBorder.DEF AULT _JUSTIFICATION, javax.swing.border.TitledBorder.TOP, new java.awt.Font("Agency FB", 1, 24), new java.awt.Color(0, 0, 0))); II NOll SN
jLabell.setBackground(new java.awt.Color(255, 255, 255)); jLabell .setFont(new j ava.awt.Font("Dialog", 1, 18)); I I NOll SN jLabell.setText("USERNAME");
jLabel2.setBackground(new java.awt.Color(255, 255, 255)); jLabel2.setFont(new java.awt.Font("Dialog", 1, 18)); II NOll SN jLabel2.setText("P ASSWORD");
jTextFieldl .setBackground(new java.awt.Color(204, 204, 204)) ; jTextFieldl.setFont(new java.awt.Font("Dialog", 1, 18)); II NOI18N jTextFieldl .addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) { jTextFieldlMouseClicked(evt);
} } ); jTextFieldl .addKeyListener(new java.awt .event.KeyAdapter() {
public void keyTyped(java.awt.event.KeyEvent evt) {
66
} );
jTextF ield 1 Key Typed( evt ); }
jPasswordFieldl .setBackground(new java.awt.Color(204, 204, 204)); jPasswordFieldl .setFont(new java.awt.Font("Dialog", 1, 18)); // NOII 8N jPasswordFieldl .addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) { jPasswordField 1 MouseClicked( evt);
} } ); jPasswordField 1.addKeyListener(new j ava.awt.event.Key Adapter() {
public void keyPressed(java.awt.event.KeyEvent evt) { jPasswordFieldlKeyPressed(evt);
} });
jButtonl .setBackground(new java.awt.Color(255, 255, 255)); jButtonl.setFont(new java.awt.Font("Dialog", 1, 11)); // NOI18N jButtonl.setText("LOG IN") ; jButton 1. addActionListener( new j ava. awt. event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonlActionPerformed(evt);
} } );
jButton2.setText("FORGOTTEN PASSWORD"); j Button2. addActionListener(new j ava. awt. event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed( evt);
} } );
javax.swing.GroupLayoutjDesktopPanelLayout = new j avax. swing. GroupLayout(jDesktopPane 1);
jDesktopPane 1.setLayout(jDesktopPane 1 Layout); j Desktop Pane 1 Layout.setHorizontal Group(
jDesktopPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jDesktopPanelLayout.createSequentialGroup()
.addGap(132, 132, 132)
.addGroup(jDesktopPane 1 Layout. createParallel Group(j avax.swing. Group Layout.Alignment. LEADING, false)
.addGroup(jDesktopPanelLayout.createSequentialGroup() .addComponent(jButton 1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
73 , Short.MAX_VALUE) .addComponent(jButton2))
67
.addGroup(jDesktopPanelLayout.createSequentialGroup()
.addGroup(jDesktopPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment. LEADING, false)
. addComponent(j Label2 , j avax. swing. GroupLayout.D EF A ULT SIZE, javax.swing.GroupLayout.DEFAUL T _ SIZE, Short.MAX_ VALUE)
.addComponent(jLabel 1, javax.swing.GroupLayout.DEF AULT_ SIZE, javax.swing.GroupLayout.DEFAUL T _ SIZE, Short.MAX_ VALUE))
.addGap(34, 34, 34)
.addGroup(jDesktopPane 1 Layout. createParallel Group(j avax. swing. GroupLayout.Alignment. LEADING, false)
.addComponent(jTextFieldl)
.addComponent(jPasswordFieldl, javax.swing.GroupLayout.DEFAUL T _ SIZE, 155, Short.MAX_ VALUE))))
.addContainerGap(125, Short.MAX_ VALUE)) ); jDesktopPane l Layout.set Vertical Group(
jDesktopPane 1 Layout.createParallel Group(j avax. swing. GroupLayout.Alignment.LEAD ING) . addGroup(jDesktopPane 1 Layout. createSequential Group()
.addGap(80, 80, 80)
. addGroup(jDesktopPane 1 Layout. createParallel Group(j avax. swing. Group Layout.Alignment. BASELINE)
.addComponent(jLabel 1)
.addComponent(jTextField 1, j avax.swing. GroupLayout.PREFERRED _ SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED _ SIZE))
.addGap(36, 36, 36)
. addGroup(jDesktopP ane 1 Layout. createParallel Group(j avax. swing. Group Layout.Alignment. BASELINE)
.addComponent(jLabel2)
.addComponent(jPasswordField 1, javax.swing. Group Layout.PREFERRED_ SIZE, j avax.swing. GroupLayout.DEF A ULT_ SIZE, javax.swing. Group Layout.PREFERRED_ SIZE))
.addGap(47, 47, 47)
.addGroup(jDesktopPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment. BASELINE)
.addComponent(jButtonl)
.addComponent(jButton2)) .addContainerGap(48, Short.MAX_ VALUE))
); jDesktopPanel .setLayer(jLabell,javax.swing.JLayeredPane.DEFAULT_LAYER); jDesktopPanel .setLayer(jLabel2, javax.swing.JLayeredPane.DEFAULT _LAYER); jDesktopPanel.setLayer(jTextFieldl , javax.swing.JLayeredPane.DEFAULT_LAYER);
68
jDesktopPane 1.setLayer(jPasswordField 1, javax.swing.JLayeredPane.DEF AULT_ LA YER);
jDesktopPanel.setLayer(jButtonl,javax.swing.JLayeredPane.DEFAULT_LAYER); jDesktopPanel .setLayer(jButton2, javax.swing.JLayeredPane.DEFAULT _LA YER);
jLabel3 .setlcon(new javax.swing.Imageicon(getClass().getResource("/proto/logo.png"))); // NOI18N
j avax.swing. GroupLayout jPanel2Layout = new j avax.swing. GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignrnent.TRAILING) .addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEF AULT_ SIZE, Short.MAX_ VALUE)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignrnent.TRAILI NG)
.addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jButton8) .addGap( 42, 42, 42))
.addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jDesktopPane 1,
javax.swing.GroupLayout.PREFERRED _ SIZE, javax.swing.GroupLayout.DEF AULT_ SIZE, javax.swing.GroupLayout.PREFERRED _ SIZE)
.addGap(388, 388, 388)))) .addGroup(javax.swing.GroupLayout.Alignment.LEADING,
jPanel2Layout.createSequentialGroup()
. addGroup(jP anel2Layout.createParallel Group(j avax.swing. Group Layout.Alignment. TRAIL! NG)
. addGroup(j avax. swing. GroupLayout.Alignrnent.LEAD ING, jPanel2Layout.createSequentialGroup()
.addGap(142, 142, 142)
.addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED _ SIZE, 525, j avax.swing. GroupLayout.PREFERRED _ SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel 10, j avax.swing. GroupLayout.PREFERRED _ SIZE, 527,javax.swing.GroupLayout.PREFERRED_SIZE))
. addGroup(j avax. swing. Group La yout.Alignrnent.LEAD ING, jPanel2Layout.createSequentialGroup()
.addGap(544, 544, 544)
.addComponent(jLabel3))) .addGap(0, 164, Short.MAX_ VALUE))
); jPanel2Layout.setVe11icalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignrnent.LEADING) .addGroup(jPanel2Layout.createSequentialGroup()
69
.addGap(22, 22, 22)
.addComponent(jLabel3)
.addPreferredGap(j avax. swing.LayoutStyle. ComponentPlacement.RELA TED, 87, Short.MAX_ VALUE)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADI NG)
. addComponent(jLabel9, j avax. swing. Group Layout.PREFERRED_ SIZE, 105, javax.swing.GroupLayout.PREFERRED _ SIZE)
.addComponent(jLabell 0, javax.swing.GroupLayout.PREFERRED _ SIZE, 105, javax.swing. GroupLayout.PREFERRED _SIZE))
.addGap(46, 46, 46)
.addComponent(jDesktopPanel , javax.swing.GroupLayout.PREFERRED _ SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, j avax.swing. GroupLayout.PREFERRED _ SIZE)
.addGap(23, 23 , 23)
.addComponent(jButton8)
.addGap(29, 29, 29)) );
javax.swing.GroupLayout layout= new javax.swing.GroupLayout(getContentPane()); getContentPane(). setLa yout(layout); layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel2, javax.swing.GroupLayout.DEF AULT_ SIZE,
javax.swing.GrnupLayout.DEFAULT_SIZE, Short.MAX_ VALUE) ); layout. set Vertical Group(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel2, javax. swing. GroupLayout.DEF A ULT_ SIZE,
j avax.swing. GroupLayout.DEF A ULT_ SIZE, Short.MAX_ VALUE) );
pack() ; }// </editor-fold>
private void formMouseClicked(java.awt.event.MouseEvent evt) { II TODO add your handling code here:
}
private void jButton8ActionPerformed(java.awt.event.ActionEvent evt) { Object[] options= {"YES","NO"}; final JOptionPane optionPane = new JOptionPane(); int n = JOptionPane.showOptionDialog(rootPane,
"Do you really want to exit " + "?", "A Safety Question", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION _ MESSAGE,
70
null, options, options[l]);
if(n==0) System.exit(0); II TODO add your handling code here:
}
private void jTextFieldl MouseClickedUava.awt.event.MouseEvent evt) { jTextFieldl .setText(""); I I TODO add your handling code here:
}
private void jPasswordFieldlMouseClickedUava.awt.event.MouseEvent evt) { jPasswordFieldl.setText(""); II TODO add your handling code here:
}
private void jTextFieldl KeyTypedUava.awt.event.KeyEvent evt) { char c=evt.getKeyCharQ;
if(!(Character.isDigit( c ))) { evt. consumeO; getToolkitQ.beep();
} II TODO add your handling code here: }
private void jButtonl ActionPerformedUava.awt.event.ActionEvent evt) { Calendar cal= new GregorianCalendar(); int month= cal.get(Calendar.MONTH); int year= cal.get(Calendar.YEAR); int day= cal.get(Calendar.DA Y _OF_ MONTH); int second= cal.get(Calendar.SECOND); int minite= cal.get(Calendar.MINUTE); int hour= cal.get(Calendar.HOUR); String tim=hour+":"+minite+":"+second; String dat=year+"l"+(month+ l)+"l"+day;
String sql="select USERNAME,PASSWORD,USER_TYPE,LAST_NAME,FIRST_NAME,IMAGE from users where USERNAME=? and PASSWORD=?"; String emp=jTextFieldl .getText(); String pass=jPasswordFieldl .getText(); String job=null; String name=null; String lname=null; String pname=null; String fname=null; byte[] person=null ; int count=0;
String sta="LOGGED _IN"; try {
pst=conn. prepareStatement( sq l);
71
pst.setString(l , jTextFieldl .getText()); pst.setString(2, jPasswordFieldl .getText()); rs=pst. executeQuery();
}
while(rs.next()) {
person=rs.getBytes("IMAGE"); name=rs.getString("USERNAME "); lname=rs.getString("LAST NAME"); pname=rs.getString("P ASSWORD"); fname=rs.getString("FIRST_NAME");
job=rs.getString("USER _ TYPE"); count=count+ 1 ;
if( count== 1) { switch (job) {
case "ADMIN": JOptionPane.showMessageDialog(null, "Usemame and password is correct
","Loggin Users",JOptionPane.INFORMATION_MESSAGE); String Sql="insert into ' loggedusers ' ('USERNAME' , 'DATE_LOGIN' ,
'TIME_LOGGED_IN', ' PASSWORD', ' IMAGE', ' USER_TYPE' ,LAST_NAME,FIRST_NAME,LOGS) value(?,?,?,?,?,?,?,?,?) 11
;
try { pst=conn. prepareStatement(Sql); pst.setString(l, emp ); pst.setString(2, dat); pst.setString(3, tim); pst.setString( 4, pass); pst.setBytes(5, person); pst.setString( 6, job); pst.setString(7, lname ); pst.setString(8, fname ); pst.setString(9, l); pst.execute();
} catch (SQLException e) { J OptionPane. show MessageDialog( null, e);
} new admin().setVisible(true); this.dispose();
break; case "CLERK":
JOptionPane.showMessageDialog(null, "Usemame and password is correct ", "Loggin Users" ,JOptionPane.INFORMA TION _ MESSAGE);
String SQl="insert into 'loggedusers' ('USERNAME' , 'DATE_ LOGIN', 'TIME_LOGGED_IN', 'PASSWORD', ' IMAGE', 'USER_TYPE',LAST_NAME,FIRST_NAME,LOGS) value(?,?,?,?,?,?,?,?,?) 11
;
try { pst=conn. prepareStatement(SQ 1); pst.setString(l, emp); pst.setString(2, dat);
72
pst.setString(3, tim); pst.setString(4, pass); pst.setBytes(5, person); pst.setString(6, job); pst.setString(7, lname); pst.setString(8, fname ); pst.setString(9, l); pst. execute0;
} catch (SQLException e) { J OptionPane. show MessageDialog( null, e);
} new clerk().setVisible(true ); this.dispose0;
} }
break;
else if( count==O) JOptionPane.showMessageDialog(null, "Usemame and password is incorrect ","Loggin
Users" ,JOptionPane.INFORMA TION _ MESSAGE); } catch (HeadlessException I SQLException e) {
J OptionP ane. show MessageDialog( null, e); } II TODO add your handling code here: }
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
JOptionPane.showMessageDialog(null, "Please Contact your system Admin ","Loggin Users",JOptionPane.INFORMATION_MESSAGE);/1 TODO add your handling code here:
}
private voidjPanel2MouseClicked(java.awt.event.MouseEvent evt) { I I TODO add your handling code here:
}
private void jPasswordFieldlKeyPressed(java.awt.event.KeyEvent evt) { if( evt.getKeyCode()==KeyEvent. VK _ ENTER) {
Calendar cal= new GregorianCalendar(); int month= cal.get(Calendar.MONTH); int year= cal.get(Calendar.YEAR); int day= cal.get(Calendar.DA Y _OF_ MONTH); int second= cal.get(Calendar.SECOND); int rninite= cal.get(Calendar.MINUTE); int hour= cal.get(Calendar.HOUR); String tim=hour+" : "+minite+": "+second; String dat=year+"l"+(month+ l)+"l"+day;
73
String sql="select USERNAME,P AS SWORD, USER_ TYPE,LAST _ NAME,FIRST _ NAME,IMAGE from users where USERNAME=? and PASSWORD=?"; String emp=jTextFieldl .getText(); String pass=jPasswordFieldl .getText() ; String job=null; String name=null; String lname=null; String pname=null; String fname=null; byte[] person=null; int count=0;
try { pst=conn. prepareStatement( sq 1); pst.setString(l , jTextFieldl .getText()); pst.setString(2, jPasswordFieldl .getText()); rs=pst.executeQuery();
}
while(rs.next()) {
person=rs.getBytes("IMAGE"); name=rs.getString("USERNAME"); lname=rs.getString("LAST_NAME"); pname=rs.getString("PASSWORD"); fname=rs.getString("FIRST _ NAME");
job=rs.getString("USER _ TYPE"); count=count+ 1 ;
if( count== 1) { switch Gob) {
case "ADMIN": JOptionPane.showMessageDialog(null, "Usemame and password is correct
","Loggin Users",JOptionPane.INFORMATION_MESSAGE); String Sql="insert into 'loggedusers'('USERNAME' , 'DATE_LOGIN',
'TIME_LOGGED_IN', ··PASSWORD', ' IMAGE', 'USER_TYPE',LAST_NAME,FIRST_NAME,LOGS) value(?,?,?,?,?,?,?,?,?) 11
;
try { pst=conn.prepareStatement(Sql); pst.setString(l, emp ); pst.setString(2, dat); pst.setString(3, tim); pst.setString( 4, pass); pst.setBytes(5, person); pst.setString( 6, job); pst.setString(7, lname); pst.setString(8, fname ); pst.setString(9, l); pst.execute();
74
} catch (SQLException e) { JOptionPane.showMessageDialog(null, e );
} new admin().setVisible(true ); this.dispose(); break;
case "CLERK": JOptionPane.showMessageDialog(null, "Usemame and password is correct
","Loggin Users",JOptionPane.INFORMATION_MESSAGE); String SQl="insert into 'loggedusers'('USERNAME', 'DATE_LOGIN' ,
'TIME_LOGGED_IN' , 'PASSWORD' , ' IMAGE', 'USER_TYPE',LAST_NAME,FIRST_NAME,LOGS) value(?,?,?,?,?,?,?,?,?) 11
;
try { pst=conn.prepareStatement(SQl); pst.setString(l , emp); pst.setString(2, <lat); pst.setString(3, tirn); pst.setString( 4, pass); pst.setBytes(5, person); pst.setString(6, job); pst.setString(7, lname ); pst.setString(8, fname ); pst.setString(9, l) ; pst.execute();
} catch (SQLException e) { J OptionP ane. show MessageDialog( null, e);
} new clerk() .setVisible(true ); this.dispose();
} }
break;
else if( count==0) { String sqL="select * from information where ID_NUMBER=? and LAST_NAME=?";
try { pst=conn.prepareStatement(sqL); pst.setString(l , jTextFieldl .getText()); pst.setString(2, jPasswordField 1.getText()); rs=pst. executeQuery(); String gov=null; String town=null; String state=null; String ward=null;
while(rs.next()) {
person=rs.getBytes("IMAGE"); name=rs.getString("ID _ NUMBER"); lname=rs.getString("LAST _ NAME");
75
}
fname=rs.getString("FIRST _NAME"); gov=rs.getString("LOCAL _ GOV"); town=rs.getString("TOWN"); state=rs.getString("STATE"); ward=rs.getString("W ARD_ NO");
job="VOTER"; count=count+ 1 ;
if( count== 1) { if (job== "VOTER") {
if(national()==0) { JOptionPane.showMessageDialog(null, "Usemame and password is correct
","Loggin Users",JOptionPane.INFORMATION_MESSAGE); String Sql="insert into ' loggedusers'('USERNAME', 'DATE_LOGIN',
'TIME_LOGGED_IN' , ' PASSWORD', 'IMAGE' , 'USER_ TYPE' ,LAST _NAME,FIRST _ NAME,LOGS,' LOCAL_ GOV', ' TOWN', ' STATE',' WARD_ NO') value(?,?,?,?,?,?,?,?,?,?,?,?,?)";
try { pst=conn. prepareStatement(Sq 1); pst.setString(l, emp ); pst.setString(2, <lat); pst.setString(3, tim) ; pst.setString(4, lname); pst.setBytes(5, person); pst.setString(6, job); pst.setString(7, lname); pst.setString(8, fname ); pst.setString(9, l); pst.setString(l0, gov); pst.setString(l 1, town); pst.setString( 12, state); pst.setString(13, ward); pst.execute();
} catch (SQLException e) { JOptionPane.showMessageDialog(null, e );
} new voters().setVisible(true);
this.dispose() ;} else
JOptionPane.showMessageDialog(null, "Personel Already Voted ","Loggin Personel",JOptionPane.INFORMATION_MESSAGE);
} else JOptionPane.showMessageDialog(null, "Usemame and password is incorrect
"+"\n"+"Voter Is Not Registered","Loggin Users" ,JOptionPane.INFORMA TION _MESSAGE);
}
76
} catch (HeadlessException I SQLException e) {
JOptionPane.show MessageDialog(null, e ); }
} } catch (HeadlessException I SQLException e) {
JOptionPane. show MessageDialog( null, e); }
} / / TODO add your handling code here: }
public int national() { int count=0; String coon=null;
String SQl="select * FROM 'loggedusers' WHERE 'USERNAME'=? AND ' LAST_NAME'=? AND 'LOGS'='LOGGED_OUT"';
}
try { pst=conn.prepareStatement(SQl);
pst.setString(l, jTextFieldl .getText()); pst.setString(2, jPasswordFieldl .getText());
rs=pst.executeQuery();
while(rs.next()) { count+=l ; }
} catch(SQLException e) { JOptionPane.show MessageDialog(null, e ); //return null; } return count;
/** * @param args the command line arguments *I
public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code ( optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and
feel. * For details see
http: //download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html *I
try { for (javax.swing.UIManager.LookAndFeellnfo info:
j avax. swing. UIManager. getlnstalledLookAndF eels()) { /*if ("Nimbus".equals(info.getName())) {
j avax.swing. UIManager. setLookAndF eel( info. getClassN ame());
77
}
break;
}*/ UIManager.setLookAndFeel("com.jtattoo.plaf.mint.MintLookAndFeel");
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(admin.class.getName()).log(java.util.logging.Level.SEV ERE, nuli, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(admin.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(admin.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(admin.class.getName()).log(java.util.logging.Level.SEV ERE, null, ex);
}
}
/* Create and display the form*/ java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
}
} } );
new login().setVisible(true );
I I Variables declaration - do not modify private javax.swing.JButton jButtonl; private javax.swing.JButton jButton2; private javax.swing.JButton jButton8; private javax.swing.JDesktopPane jDesktopPane 1; private javax.swing.JLabel jLabel 1; private javax.swing.JLabel jLabel 1 O; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel9; private javax.swing.JPanel jPanel2; private javax.swing.JPasswordField jPasswordFieldl; private javax.swing.JTextField jTextFieldl; // End of variables declaration
78