Vijay Kumar Mps

Embed Size (px)

Citation preview

  • 7/28/2019 Vijay Kumar Mps

    1/111

    Hong Kong Institute of Vocational Education (Tsing Yi)Department of Multimedia and Internet Technology

    Higher Diploma inMultimedia and lnternet Applications

    (41381)

    Final Year Project Report

    Apply Multi-Biometrics Recognition Systems forIntelligent House Management

    By

    Chan Ka Lun, PeaeTsang Man Piu

    Academic Year 2005/06

    Supervised by Mr. MK Lam

  • 7/28/2019 Vijay Kumar Mps

    2/111

    i

    ABSTRACT

    This final year project describes the design and development of applying the

    biometrics technology with facial recognition and fingerprint recognition system.

    Several commonly used applications for our biometric system are reviewed in this

    report.

    Details of the design criteria of both hardware and software principles of operation as

    well as the testing and verification of the system are presented. Further development

    of project is also proposed and recommended.

    This project is to develop and built up a biometrics system for intelligent house and

    clubhouse. As biometrics is a popular and safety technology, the project applies thistechnology to improve the security level and easy for management.

  • 7/28/2019 Vijay Kumar Mps

    3/111

    ii

    TABLE OF CONTENTS

    page

    ABSTRACT i

    TABLE OF CONTENTS ii

    LIST OF FIGURES v

    LIST OF TABLES viii

    LIST OF APPENDICES ix

    Chapter 1 Introduct ion 1

    1.1 Overview 1

    1.2 Background Information 1

    1.3 Structure of the Final Year Project Report 1

    Chapter 2 Literature Review 32.1 Introduction 3

    2.2 Introduction to Biometrics Technologies 3

    2.2.1 What is Biometrics? 32.2.2 History of Biometrics 3

    2.2.3 How does it work? 4

    2.2.4 Applications in Biometrics 6

    2.2.5 Template size of each Biometrics Technology 7

    2.3 Examples of biometrics system in my life 7

    2.4 Examples of biometrics system layout 8

    2.5 Examples of hardware design 10

    2.6 Examples of software interface design 11

    2.7 Summary 12

    Chapter 3 Development Methodology forMulti-Biometrics Recognition System 13

    3.1 Introduction 13

    3.2 Design Consideration of Hardware System 13

    3.3 Design Consideration of Software 17

    3.4 Graphics Design and Layout 17

    3.5 Structure of Database Design 19

  • 7/28/2019 Vijay Kumar Mps

    4/111

    iii

    Chapter 4 Details of the Multi-Biometrics Recognition

    System 20

    4.1 Overview 20

    4.2 Workflow of Recognition System 214.3 Function of Recognition System 22

    4.3.1 Function of Administration tools 22

    4.3.2 Function of Building security system 23

    4.3.3 Function of Clubhouse system 23

    4.4 Hardware of Recognition System 24

    4.5 Development Software use 25

    4.6 Software needs and setup 26

    4.7 Database Structure 28

    4.7.1 Relational between tables 28

    4.7.2 Householder 29

    4.7.3 Householder Log 29

    4.7.4 Visitor 30

    4.7.5 Building 30

    4.7.6 Floor and Flat 31

    4.7.7 Clubhouse 31

    4.8 Graphics Design and Layout 32

    4.8.1 Administration Tools layout design 32

    4.8.2 Building security system layout design 34

    4.8.3 Clubhouse system layout design 35

    Chapter 5 Evaluation of Multi-Biometrics Recognition

    Systems 38

    5.1 Overview 38

    5.2 Principle of Biometric Enrolment and Verification 38

    5.3 Summary 38

    Chapter 6 Appl ication Procedure of Multi-Biometrics

    Recognit ion Systems 39

    6.1 Administration tools 39

    6.1.1 Add new householder 39

    6.1.2 Edit householder 43

    6.1.3 Delete householder 45

    6.1.4 Householder entry log 46

    6.1.5 Visitor entry log 476.2 Building Security System 49

  • 7/28/2019 Vijay Kumar Mps

    5/111

    iv

    6.2.1 Householder mode 49

    6.2.2 Visitor mode 51

    6.3 Clubhouse system 54

    6.3.1 Clubhouse login and logout system 54

    6.3.2 Clubhouse payroll system 57

    Chapter 7 Verif ication of the Multi-Biometrics

    Recognit ion Systems 59

    7.1 Overview 59

    7.2 Verification of Result 59

    7.3 Summary 59

    Chapter 8 Conclusion and Further Development 60

    8.1 Overview 608.2 Contribution of Final Year Project 60

    8.3 Discussion on the Project Limitation 60

    8.4 Further Proposal 61

    References 62

    Appendices 64

    Appendix A: Team member workload 64

    Appendix B: Project plan 65

    Appendix C: Programming code 66

  • 7/28/2019 Vijay Kumar Mps

    6/111

    v

    LIST OF FIGURES

    page

    Fig. 2.1 Biometric identification and encrypted data system 8

    Fig. 2.2 Biometric access control system (Exys Security system) 8

    Fig. 2.3 Country entry and exit control system 8

    Fig. 2.4 Hand geometry control system 9

    Fig. 2.5 Biometric experiment system 9

    Fig. 2.6 Presse Fotos ekey fingerprint system 10

    Fig. 2.7 Biometric reader clocking system 10

    Fig. 2.8 Office access control system 10

    Fig. 2.9 Windows lcqon recognition system 11Fig. 2.10 Breaker facial searching system 11

    Fig. 2.11 Biometric Patient Tracking System 11

    Fig. 2.12 fingerID system with biometrics in USA 11

    Fig. 3.1 Types of fingerprint 13

    Fig. 3.2 Optical Fingerprint Sensors 14

    Fig. 3.3 Surface Pressure Sensor 14

    Fig. 3.4 Capacitive Sensors 14

    Fig. 3.5 Facial geometry example 15Fig. 3.6 Correct recognition example 15

    Fig. 3.7 Facial recognition in airport 16

    Fig. 3.8 First Visitor mode layout 17

    Fig. 3.9 Second Visitor mode layout 18

    Fig. 3.10 Clubhouse mode layout 18

    Fig. 3.11 Database schema of Biometrics System 19

    Fig. 4.1 Structure of System 20

    Fig. 4.2 Workflow of Building security system 21

    Fig. 4.3 Workflow of Clubhouse system 22

    Fig. 4.4 Marcomedia Flash 25

    Fig. 4.5 Adobe Photoshop 25

    Fig. 4.6 Visual Basic 6.0 25

    Fig. 4.7 Create MySQL user 26

    Fig. 4.8 Restore the backup file 27

    Fig. 4.9 Permission of the folder 27

    Fig. 4.10 Folder of householder and visitor 28

    Fig. 4.11 Database Structure of Systems 28

  • 7/28/2019 Vijay Kumar Mps

    7/111

    vi

    Fig. 4.12 Main page of Administration Tools 32

    Fig. 4.13 Database Management of Householder 32

    Fig. 4.14 Entry Log of Householder 33

    Fig. 4.15 Entry Log of Visitor 33

    Fig. 4.16 Selection mode of building security system 34

    Fig. 4.17 Householder mode of building security system 34

    Fig. 4.18 Visitor mode of building security system 35

    Fig. 4.19 Language Selection mode of clubhouse system 35

    Fig. 4.20 Selection mode of clubhouse system 36

    Fig. 4.21 Login mode of clubhouse system 36

    Fig. 4.22 Choose facilities mode of clubhouse system 37

    Fig. 4.23 Logout mode of clubhouse system 37

    Fig. 6.1 Select Database Management 39Fig. 6.2 Click the Add New button 39

    Fig. 6.3 Add user windows 40

    Fig. 6.4 Procedure of face enrollment 40

    Fig. 6.5 Successful message of face enrollment 41

    Fig. 6.6 Successful message of add new householder 41

    Fig. 6.7 Error message of add new householder 42

    Fig. 6.8 New householder in the list 42

    Fig. 6.9 Click the Edit button 43Fig. 6.10 Enroll new face 43

    Fig. 6.11 Successful message of face enrollment 44

    Fig. 6.12 Successful message of update householder 44

    Fig. 6.13 Delete the householder 45

    Fig. 6.14 Confirm to delete householder 45

    Fig. 6.15 Select Entry Log of householder 46

    Fig. 6.16 Query of Householder Entry Log 46

    Fig. 6.17 Result of Householder Entry Log 47

    Fig. 6.18 Select Entry Log of visitor 47

    Fig. 6.19 Query of Visitor Entry Log 48

    Fig. 6.20 Show the photo of visitor 48

    Fig. 6.21 Mode selection of Building Security System 49

    Fig. 6.22 Procedure of identify the householder 49

    Fig. 6.23 Error message when cannot identify the householder 50

    Fig. 6.24 Householder identify complete 50

    Fig. 6.25 Mode selection of Building Security System 51

    Fig. 6.26 Procedure of enter the floor and flat 51

  • 7/28/2019 Vijay Kumar Mps

    8/111

    vii

    Fig. 6.27 Error message of enter wrong floor 52

    Fig. 6.28 Procedure of face capture 52

    Fig. 6.29 Procedure of fingerprint capture 53

    Fig. 6.30 Visitor register complete 53

    Fig. 6.31 Step 1 of process clubhouse system 54

    Fig. 6.32 Step 2 of process clubhouse system 54

    Fig. 6.33 Step 3 of process clubhouse system 55

    Fig. 6.34 Step 4 of process clubhouse system 55

    Fig. 6.35 Step 5 of process clubhouse system 56

    Fig. 6.36 Step 6 of process clubhouse system 56

    Fig. 6.37 Step 1 of process clubhouse payroll system 57

    Fig. 6.38 Step 2 of process of clubhouse payroll system 57

    Fig. 6.39 Step 3 of process of clubhouse payroll system 58

  • 7/28/2019 Vijay Kumar Mps

    9/111

    viii

    LIST OF TABLES

    page

    Table 2.1 Template size of each Biometrics Technology 7

    Table 4.1 Database structure of householder 29

    Table 4.2 Database structure of householder log 29

    Table 4.3 Database structure of visitor 30

    Table 4.4 Database structure of building 30

    Table 4.5 Database structure of floor and flat 31

    Table 4.6 Database structure of clubhouse 31

    Table 7.1 FRR rate of facial recognition 59

    Table 7.2 FAR rate of facial recognition 59

  • 7/28/2019 Vijay Kumar Mps

    10/111

    ix

    LIST OF APPENDICES

    page

    Appendix A Team member workload 64

    Appendix B Project plan 65

    Appendix C Programming code 66

  • 7/28/2019 Vijay Kumar Mps

    11/111

    1

    Chapter 1 Introduct ion

    1.1 Overview

    Nowadays, Biometrics becomes important in our life. Since it has a high security andconvenient, so that people use Biometrics technology on anything. Such as, door

    access control, border control, banking, identify people, intelligent house, etc. The

    application is very diverse and their capacity of development is very large.

    The intelligent house becomes popular for the past few years. It can provide a safety

    and comfortable to the householder. But the security is very important, it must be

    identify the house holder accurately and prevent the system to make a mistake for

    identification. So that, we need to build a system like the security to make a identity

    and monitoring the security of building.

    1.2 Background Information

    In fact, Hong Kong building security is decreased. The thief is increased to make the

    people safety to be damaged. So, we must improve the building security and the

    management. By the way, when we come back to our building, we may use words of

    password or the key to open the building door. That is so trouble and inconvenience.

    Biometrics technologies can help us to improve the security and easy to management.

    So, we may use the biometrics technologies to maintain our final year project.

    1.3 Structure of the Final Year Project Report

    The remainder of this report is divided into Seven Chapters. They are as follows: -

    Chapter 2 covers the literature review on the designresearch of biometrics system.

    We find a lot of the information and image from Internet.

    Chapter 3 discusses on the design criteriaof hardware system, software, layout anddatabase

    Chapter 4 presents the details of the components of the hardware software, workflow

    and database about our system.

    Chapter 5 describes the performance evaluation of the developed system about the

    principle of biometric enrolment and verification.

    Chapter 6 and 7 describe the enrolment and verification procedure of how to captureand record of our recognition system.

  • 7/28/2019 Vijay Kumar Mps

    12/111

    2

    Chapter 8 concludes the report and out lines the contributions of the project. The

    limitations were highlighted and suggestions are made for further development to

    improve the system.

  • 7/28/2019 Vijay Kumar Mps

    13/111

    3

    Chapter 2 Literature Review

    2.1 Introduction

    That part is literature review. It means we will show you all our research before ourproject starting. And the research should be about example of biometric system,

    layout of the hardware system, layout of the software interface, etc. We will show you

    all of our research for the final year project.

    2.2 Introduction to Biometrics Technologies

    2.2.1 What is Biometrics?

    The term biometrics refers to the emerging field of technology devoted to the

    identification of individuals using biological traits or behaviours [1] . In practice, thismeans capturing an image of a unique feature of an individual such as a fingerprint,

    hand, eye or face, and comparing it with a template captured previously. For ease of

    explanation this has been over-simplified, but in essence this is biometric technology

    works.

    Human Recognition Systems works with 4 key biometric technologies:

    z Iris Recognition

    z Hand Recognition

    z Fingerprint Recognition

    z Facial Recognition

    2.2.2 History of Biometrics

    1800s identification largely relied upon "photographic memory" [2] . This was changed

    in 1883 when Alphonse Bertillon, a clerk in the Paris police prefecture, introduced

    physical measurement system (which came to bear his name: bertillonage) Bertillon

    based his system on the claim that measurement of adult bones does not changethroughout life. Measurements in his system included: height, length, and breadth of

    the head, the length of different fingers, the length of forearms, etc (Bertillon

    estimated that the odds of duplicate records were 286,435,456 to 1 if 14 traits were

    used.

    After this, the police used finger printing, which was developed by Richard Edward

    Henry of Scotland Yard, instead. Essentially reverting to the same methods used by

  • 7/28/2019 Vijay Kumar Mps

    14/111

    4

    the Chinese for years. However the idea of biometrics as a field of study with useful

    identification applications, was there and interest in it has grown.

    Personal Identification Numbers (PINs) were one of the first methods used for

    identification. There are also methods that involve passwords and physical tokens e.g.

    smart cards. There are a number of problems associated with this kind of

    identification. People forget passwords, lose tokens, reuse passwords, write them

    down, tokens can get stolen. The recognition of the above does not mean the

    identification of the person providing it - they could be presented by anybody. With the

    advent of e-commerce brings increased pressure on IT managers to provide partners

    and customers with means of identification to access corporate networks. This results

    in a deluge of passwords and means of access, which are often forgotten, misused or

    lost. With the increased population accessing these networks the risk of attacks onthe networks is increased. Companies are turning to Biometric Systems to bring

    tighter security to their computer networks.

    Today we have the technology to realize the aims, and to refine the accuracy of

    biometric identification, and therefore the possibility of making it a viable field. Soon

    biogenetics technology will be used in every house hold and it is getting increasingly

    more and safer to use biometric technologies in order to better our life.

    2.2.3 How does it work?

    False Reject Rates:

    For most applications, letting the good guys in is just as important as keeping the bad

    guys out [3] . The probability that a biometric device won't recognize a good guy is

    called the "False Reject Rate."

    The False Reject Rates quoted for current biometric systems range from 0.00066% to

    1.0%.

    A low False Reject Rate is very important for most applications, since users will

    become extremely frustrated if they're denied access by a device that has previously

    recognized them.

  • 7/28/2019 Vijay Kumar Mps

    15/111

    5

    There has a example may be helpful.

    A company with 100 employees has a biometric device at its front door. Each

    employee uses the door four times a day, yielding 400 transactions per day.

    A False Reject Rate of 1.0% predicts that every day, four good guys (1% of 400) will

    be denied access. Over a five-day week, that means 20 problems. Reducing the

    False Reject Rate to 0.1% results in just two problems per week.

    A low False Reject Rate is very important for most applications, since users will

    become extremely frustrated if they're denied access by a device that has previously

    recognized them. As mentioned previously, the combination of a low False Reject

    Rate plus a simple keypad code provides virtually unbreakable security.

    Equal Error Rates:

    Error curves give a graphical representation of a biometric device's "personality." The

    point where false accept and false reject curves cross is called the "Equal Error

    Rate." The Equal Error Rate provides a good indicator of the unit's performance. The

    smaller the Equal Error Rate, the better.

    Valid ity of Test Data:

    Testing biometrics is difficult, because of the extremely low error rates involved. To

    attain any confidence in the statistical results, thousands of transactions must be

    examined.

    Some error rates cited by manufacturers are based on theoretical calculations. Other

    rates are obtained from actual field testing. Field data are usually more reliable. In the

    case of False Reject rates, only field test data can be considered accurate, since

    biometric devices require human interaction. For example, if the device is hard to use,

    false reject rates will tend to rise. A change in the user's biometric profile could also

    cause a false reject (a finger is missing, for example).

    None of these conditions can be accurately quantified by purely theoretical

    calculations. On the other hand, False Accept Rates can be calculated with

    reasonable accuracy from cross-comparison of templates in large template

    databases.

  • 7/28/2019 Vijay Kumar Mps

    16/111

    6

    Currently, most field test error rates have been generated by various biometric

    manufacturers using end-user data. Tests have also been conducted by independent

    laboratories such as the U.S. Department of Energy's Sandia National Laboratories.

    The most recent test released by Sandia was performed in 1991.

    It's important to remember that error rates are statistical: they are derived from a

    series of transactions by a population of users. In general, the larger the population

    and the greater the number of transactions, the greater the confidence level in the

    accuracy of the results.

    If the error rate is reported at 1:100,000, and only 100 transactions were included in

    the study, the confidence level in the results should be very low. If the same error ratewas reported for 1 million transactions, the confidence level would be much higher.

    The magnitude of the reported results affects the size of the sample required for a

    reasonable confidence level. If the reported error rate is 1:10, then a sample of 100

    transactions may provide a sufficient confidence level. Conversely, a 100-transaction

    sample would be too small if the error rate was reported as 1:100,000.

    2.2.4 Applications in Biometrics

    There are 9 biometrics applications: [4]

    z Physical Access Control

    z Logical Access Control

    z J ustice/Law Enforcement

    z Time and Attendance

    z Border Control/Airports

    z HIPAA

    z Financial/Transactionalz Integrators/Resellers

    z Safes, Door Locks

  • 7/28/2019 Vijay Kumar Mps

    17/111

    7

    2.2.5 Template size of each Biometrics Technology

    Biometrics Technology Template size per record

    Iris 256 Bytes

    Fingerprint 512-1000 Bytes

    Facial >512 Bytes

    Hand Geometry 9 Bytes

    Table 2.1 Template size of each Biometrics Technology

    2.3 Examples of biometrics system in my lifeLaw Enforcement

    The law enforcement community is perhaps the largest biometrics user group.

    Police forces thought the world use AFIS technology to process criminal

    suspect, match finger images and bring guilty criminals to justices. A number

    of biometrics vendors are earning significant revenues in this area.

    Banking

    Bank has been evaluating a range of biometrics technologies for many years.

    Automated Teller Machines (ATMs) and transaction at the point of scale are

    particularly vulnerable to fraud and can be secured by biometrics. Other

    emerging markets such as telephone banking and internet bank must also be

    totally secure for bankers alike.

  • 7/28/2019 Vijay Kumar Mps

    18/111

    8

    2.4 Examples of biometrics system layout

    We researched that the following figures are the examples of the biometrics system.

    Fig. 2.1 Biometric identification and encrypted data system [5]

    Fig. 2.2 Biometric access control system (Exys Security system) [6]

    Fig. 2.3 Country entry and exit control system [7]

  • 7/28/2019 Vijay Kumar Mps

    19/111

    9

    Fig. 2.4 Hand geometry control system [8]

    Fig. 2.5 Biometric experiment system [9]

  • 7/28/2019 Vijay Kumar Mps

    20/111

    10

    2.5 Examples of hardware design

    We may show you our research of hardware. The following figures are below.

    Fig. 2.6 Presse Fotos ekey fingerprint system [10]

    Fig. 2.7 Biometric reader clocking system [11]

    Fig. 2.8 Office access control system[12]

  • 7/28/2019 Vijay Kumar Mps

    21/111

    11

    2.6 Examples of software interface design

    The following figures are our research of the biometrics software interface examples.

    Fig. 2.9 Windows lcqon recognition system [13]

    Fig. 2.10 Breaker facial searching system [14]

    Fig. 2.11 Biometric Patient Tracking System [15]

    Fig. 2.12 fingerID system with biometrics in USA [16]

  • 7/28/2019 Vijay Kumar Mps

    22/111

    12

    2.7 Summary

    After the research that, we find many about the information of biometrics and many

    different kinds of the biometrics system. In fact, there were many technologies were

    used the biometrics technology. It is the truth and it must be more popular in thefuture. Now a day, many old systems are displaced by the biometric system. For

    example: access control system, payroll system, banking system, etc.

    During the project development, the biometric hardware is used. There are TiFace

    system, U are U fingerprint system. TiFace system enables to capture and enrol

    users face. U are U fingerprint system is use to capture and enrol users fingerprint.

    So, we have to use the biometric in the future life.

  • 7/28/2019 Vijay Kumar Mps

    23/111

    13

    Chapter 3 Development Methodology for Multi-Biometrics

    Recognition System

    3.1 Introduction

    In this part, we will tell you about our first development methodology. What kinds of

    hardware did we use. Why we use that hardware. What kinds of software did we use.

    Why we use that software. And we also post our first layout design in that part. We will

    all tell you the answer

    3.2 Design Consideration of Hardware System

    Fingerprint recognition represents the oldest method of biometric identification. Its

    history is going back as far as at least 2200 BC. The use of fingerprints as a personal

    code has a long tradition and was already used by the Assyrians, the Babylonians,the Chinese and the J apanese. Since 1897, dactyloscopy (synonym for

    non-computer-based fingerprint identification) has been used for criminal

    identification. A fingerprint consists of ridges (lines across fingerprints) and valleys

    (spaces between ridges). The pattern of the ridges and valleys is unique for each

    individual. [17]

    There are two major methods of fingerprint matching: Minutiae matching and global

    pattern matching. The first approach analyses ridge bifurcations and endings, the

    second method represents a more macroscopic approach. The last approach

    considers the flow of ridges in terms of, for example, arches, loops and whorls. As the

    equal-error-rate is low, therefore fingerprint recognition is very accurate. The prices of

    such systems compared to other biometric systems are quite low and the user

    acceptance is very high. The strength of fingerprint identification is, that it can be

    deployed in a varied range of environments.

    Fig. 3.1 Types of fingerprint [18]

  • 7/28/2019 Vijay Kumar Mps

    24/111

    14

    There are 6 types of sensors for fingerprint recognition:

    z Optical Fingerprint Sensors

    z Themalelectric Sensors

    z Capacitive Sensors

    z E-Field Sensors

    z Touchless Sensors

    z Surface Pressure Sensor

    Fig. 3.2 Optical Fingerprint Sensors [19] Fig. 3.3 Surface Pressure Sensor [20]

    Fig. 3.4 Capacitive Sensors [21]

    The template size varies from 100 bytes to 1500 Bytes depending on the algorithm

    and the quality of a fingerprint. Nevertheless, very rarely there are fingerprints without

    any minutiae-points that leads to a failure to enroll (FER = Failure to Enroll Rate). It is

    also difficult to extract the minutiae points accurately when the fingerprint has got a

    low quality.

  • 7/28/2019 Vijay Kumar Mps

    25/111

    15

    Introduction of facial recognition

    Facial recognition systems are built on computer programs that analyze images of

    human faces for the purpose of identifying them. The programs take a facial image,

    measure characteristics such as the distance between the eyes, the length of thenose, and the angle of the jaw, and create a unique file called a "template." Using

    templates, the software then compares that image with another image and produces

    a score that measures how similar the images are to each other. Typical sources of

    images for use in facial recognition include video camera signals and pre-existing

    photos such as those in driver's license databases. [22]

    Computers can do increasingly amazing things, but they are not magic. If human

    beings often can't identify the subject of a photograph, why should computers be ableto do it any more reliably? The human brain is highly adapted for recognizing faces -

    infants, for example, remember faces better than other patterns, and prefer to look at

    them over other patterns. The human brain is also far better than computers at

    compensating for changes in lighting and angle. The fact is that faces are highly

    complex patterns that often differ in only subtle ways, and that it can be impossible for

    man or machine to match images when there are differences in lighting, camera, or

    camera angle, let alone changes in the appearance of the face itself.

    Fig. 3.5 Facial geometry example [23] Fig. 3.6 Correct recognition example [24]

  • 7/28/2019 Vijay Kumar Mps

    26/111

    16

    All of this makes face recognition ideal for high traffic areas open to the general public,

    such as:

    z Airports and railway stations

    z Casinos

    z Cashpoints

    z Stadiums

    z Public transportation

    z Financial institutions

    z Government offices

    z Businesses of all kinds

    Fig. 3.7 Facial recognition in airport [25]

  • 7/28/2019 Vijay Kumar Mps

    27/111

    17

    3.3 Design Consideration of Software

    We choose macromedia flash and adobe Photoshop for our design software.

    Why we use that two software for design development?

    It is because macromedia flash is so powerful. It can be used actionscript for many

    different of animation. Although, it is easy to use and popular in the design area.

    The second point is we dont want to have a static and boring interface. So, we

    decided to use flash animation to replace of static picture interface. It can attract the

    people to use our system and make the system more interest.

    In the internet, many people used that two software. It is the brand name power and

    that software is really good for design.

    On the other hand, Photoshop can help us for tuning the photo color, light, size, effect,

    etc. It also can help us to make the picture be good.

    3.4 Graphics Design and Layout

    Fig. 3.8 First Visitor mode layout

  • 7/28/2019 Vijay Kumar Mps

    28/111

    18

    Fig. 3.9 Second Visitor mode layout

    Fig. 3.10 Clubhouse mode layout

    .

  • 7/28/2019 Vijay Kumar Mps

    29/111

    19

    3.5 Structure of Database Design

    The following Fig. 3.11 is our first development of database structure design.

    It only consists of 4 tables: tblHouseHolder, tblBuilding, tblVisitoryymmdd and

    tblFloorFlat. That is our first developed schema.

    Fig. 3.11 Database schema of Biometrics System

  • 7/28/2019 Vijay Kumar Mps

    30/111

    20

    Chapter 4 Details of the Multi-Biometrics Recognition System

    4.1 Overview

    In this part, we finished to discuss and develop all the kinds of tool should we use. We

    will use two hardware for the system. It should be Face recognition and fingerprint

    hardware. And we will tell you the function of our biometric system. It has three

    different parts of the recognition system, please refer to Fig. 4.1.

    Finally, we choose the software, hardware and the final layout. We will show you all

    the things in the following.

    Fig. 4.1 Structure of System

  • 7/28/2019 Vijay Kumar Mps

    31/111

    21

    4.2 Workflow of Recognition System

    The following two figures 4.2 & 4.3 are our workflow of the building security system

    and clubhouse system.

    Entry

    Select Mode

    Facial Recognition

    Check database &identify

    Open door

    Input Floor andFlat

    Enroll Face

    Enroll Fingerprint

    Open door

    Visitor

    Vaild

    Invaild

    Householder

    Fig. 4.2 Workflow of Building security system

  • 7/28/2019 Vijay Kumar Mps

    32/111

    22

    Entry

    SelectLogin/Logout

    Login mode

    Store login timeto database

    Facialrecognize

    Checkdatabase

    Invaild

    Logout mode

    Facialrecognize

    Checkdatabase

    Store logout timeto database

    Invaild

    Login

    Logout

    vaildvaild

    Fig. 4.3 Workflow of Clubhouse system

    4.3 Function of Recognition System

    There are three parts of our recognition system. It consists of Administration Tools,

    Building security system and Clubhouse system.

    4.3.1 Function of Administ ration Tools

    Actually, householder and visitor also need to enroll fast when they want to use the

    biometric system. We make an enrolment to analysis this problem. Householder can

    come to our office to use the householder enrolment system.

    They only need to put their face in front of the camera. Their face record will store to

    our database for verify used. They also need to type their information (e.g. name,

  • 7/28/2019 Vijay Kumar Mps

    33/111

    23

    gender, and floor no., flat no., etc.) to our database used. It is used for comparison.

    4.3.2 Function of Building security system

    We design that householder mode is for householder using. They are no need to

    remember the word of password for house entry. It is because the entry password

    always changed a time. The householder may forget the password or remember the

    wrong one.

    So, Householder mode system can help person easily for entry. They only put their

    face in front of camera. If they are our householders then the door will open

    automatically by our system.

    Nowadays, people visit to their friend house. They must write down their personalinformation (e.g. name, id, gender, visit reason, visit room no.) in the building entry

    control. It is because the building needs to protect their householder safety and giving

    record. It may make the visitor inconvenient.

    So, we make a visitor mode for visitor using. It can help visitor more convenient,

    Visitor only put their face in front of camera and fingerprint to record their personal

    data. That should be fast and more convenient than the paper record.

    4.3.3 Function of Clubhouse system

    Clubhouse is to be more popular to the new building. Householders can use their own

    clubhouse facilities. When they used the clubhouse facilities, they need to make a

    paper rent. That is not convenient and trouble.

    So, we make a clubhouse biometric system for householder using. They only open

    our system and put their face in front of the camera. Our system will record their login

    time. Otherwise, when they want to logout and leave that they also use our system to

    record their logout time. They can use our clubhouse easily.

    When you finished your playing from clubhouse, you need to pay the free to the

    clubhouse using. We make a payroll system for clubhouse payment. Householder

    only put their face in front of camera. Our database will search your clubhouse login

    time and logout time used for calculate the price. When you know the price that you

    only pay the money to our staff. He will help you to finish the payment process.

  • 7/28/2019 Vijay Kumar Mps

    34/111

    24

    4.4 Hardware of Recognition System

    We choose facial recognition and fingerprint for our system used Facial recognition

    systems are computer-based security systems that are able to automatically detect

    and identify human faces. These systems depend on a recognition algorithm. The

    first step for a facial recognition system is to recognize a human face and extract it fro

    the rest of the scene. Next, the system measures nodal points on the face, such as

    the distance between the eyes, the shape of the cheekbones and other

    distinguishable features. Facial recognition is a good biometric system and it is too

    convenience and user-friendly. So that, we use facial recognition for our system used.

    For the fingerprint reason, we found that following good points:

    z More securable than passwords by intercepting use and approach ofUnauthorized people whose identification is not registered.

    z Free from inconvenience to upgrade and remember passwords and the company

    z It can save much cost to manage passwords.

    z Fast and exact perception with high technology of finger print identification.

    z Adopted dsp system that is to calculate moving direction and distance without

    Password by the image perceiving sensor.

    z No roller and soft movement thanks to less rubbing resistance.

    zFinally, fingerprint is easy too use, user-friendly and too cheap in the kinds ofbiometrics devices.

  • 7/28/2019 Vijay Kumar Mps

    35/111

    25

    4.5 Development Software use

    Macromedia Flash

    Fig. 4.4 Marcomedia Flash [26]

    Adobe Photoshop

    Fig. 4.5 Adobe Photoshop [27]

    These two design tools are very powerful and easy to use. It can help us to analysis

    all the design problems. And we can make many different effects by that two software.

    It is very popular and great. So that, we used the tools for our interface layout design.

    Programming tools

    Fig. 4.6 Visual Basic 6.0 [28]

    Visual Basic 6.0. It is very easy to learn. It seen that very simple and comfortable for

    user programming. Finally, it also is a popular programming tool in the common

    program company.

  • 7/28/2019 Vijay Kumar Mps

    36/111

    26

    4.6 Software needs and setup

    The basic software needs to install of the system are below:

    z Flash Player 8.0

    z TiFace Runtime

    z TiFace SmartGate SDK

    z Futronic Fingerprint SDK

    The server and driver of the system needs are below:

    z MySQL Server 4.0.x

    z MySQL ODBC 3.51 Driver

    For easy to manage the database, we suggest to install these software are below:

    z MySQL Administratorz MySQL Query Browser

    Now, I will show you how to create new database account and restore the table in

    database form sql backup file.

    Step1. Use MySQL Administrator to create a new account. The MySQL user and

    password also is ive. Then, click Apply changes. The user will be created.

    Fig. 4.7 Create MySQL user

  • 7/28/2019 Vijay Kumar Mps

    37/111

    27

    Step2. Open the sql backup file to restore the table needs in the database. It will

    create the schema ive_fyp automatically.

    Fig. 4.8 Restore the backup file

    Next, I will show how to share the folder. This folder is used to store householder and

    visitors template and photo.

    Step1. Create a folder userdata in your any local drive. E.g.: C drive.

    Step2. Share this folder and set the permission of Everyone to Full control.

    Fig. 4.9 Permission of the folder

  • 7/28/2019 Vijay Kumar Mps

    38/111

    28

    Step3. Create two folders householder and visitor in the userdata folder.

    Fig. 4.10 Folder of householder and visitor

    Then, I will show you how to change the server ip of the system connect.

    Step1. Open the config.ini file in the same level of folder.

    Step2. Modify the IP and enter the correct server IP. For example, you MySQL

    servers IP is 192.168.0.1. So, you should enter the serverIP=192.168.0.1.

    And the template file and photo also store in this server. Important: If your

    MySQL server is setup on localhost, you must enter 127.0.0.1.

    4.7 Database structure

    4.7.1 Relational between tables

    Fig. 4.11 Database Structure of Systems

  • 7/28/2019 Vijay Kumar Mps

    39/111

    29

    4.7.2 Householder

    Table: fyp_tblHouseHolder

    Description: Store the detail of householder

    Key Field Name Data Type Description

    9 intHolderID INT(5) HouseHolders ID

    chrHolderName VARCHAR(255) HouseHolders Name

    chrGender CHAR(1) HouseHolders Gender

    datBirth DATE HouseHolder Birthday

    chrHKID VARCHAR(11) HouseHolders HKID Number

    datRegDate DATE Register Date

    chrUserData VARCHAR(64) Template Filename of Face Enroll

    intBuildingID INT(2) Building ID

    intFFID INT(3) Floor and Flat ID

    Table 4.1 Database structure of householder

    4.7.3 Householder Log

    Table: fyp_tblHolderLog

    Description: Store the log of householder login

    Key Field Name Data Type Description

    9 intLogID INT(8) Log ID

    intHolderID INT(5) Householders ID

    datInTime DATETIME Login Date and Time

    Table 4.2 Database structure of householder log

  • 7/28/2019 Vijay Kumar Mps

    40/111

    30

    4.7.4 Visitor

    Table: fyp_tblVisitor

    Description: Store the detail and log of visitor

    Key Field Name Data Type Description

    9 intVisitorID INT(8) Visitors ID

    chrFaceData VARCHAR(64) Template Filename of Face Enroll

    chrFingerData VARCHAR(64) Template Filename of Fingerprint

    Enroll

    datEntry DATETIME Entry Date and Time

    intBuildingID INT(2) Building ID of Visitor visit

    intFFID INT(3) Floor and Flat ID of Visitor visit

    Table 4.3 Database structure of visitor

    4.7.5 Building

    Table: fyp_tblBuildingDescription: Store the name of building

    Key Field Name Data Type Description

    9 intBuildingID INT(2) Building ID

    chrBuildingName VARCHAR(255) Building Name

    Table 4.4 Database structure of building

  • 7/28/2019 Vijay Kumar Mps

    41/111

    31

    4.7.6 Floor and Flat

    Table: fyp_tblFloorFlat

    Description: Store the floor and flat

    Key Field Name Data Type Description

    9 intFFID INT(3) Floor and Flat ID

    chrFloor CHAR(2) Floor Number

    chrFlat CHAR(1) Flat Character

    Table 4.5 Database structure of floor and flat

    4.7.7 Clubhouse

    Table: fyp_tblClubLog

    Description: Store the log of householder using clubhouse

    Key Field Name Data Type Description

    9 intLogID INT Log ID

    intHolderID INT(5) Householders ID

    datInTime DATETIME Login Date and Time

    datOutTime DATETIME Logout Date and Time

    intPrice INT(5) Price of using clubhouse

    Table 4.6 Database structure of clubhouse

  • 7/28/2019 Vijay Kumar Mps

    42/111

    32

    4.8 Graphics Design and Layout

    4.8.1 Administ ration Tools layout design

    Fig. 4.12 Main page of Administration Tools

    1. Menu bar

    Fig. 4.13 Database Management of Householder

    1. Query search 2. List of the householder

    3. Add new householder 4. Edit selected householder

    5. Delete selected householder 6. Refresh the List of householder

  • 7/28/2019 Vijay Kumar Mps

    43/111

    33

    Fig. 4.14 Entry Log of Householder

    1. List of entry log 2. Query search

    Fig. 4.15 Entry Log of Visitor

    1. List of Entry Log 2. Query search

    3. Photo of the visitor

  • 7/28/2019 Vijay Kumar Mps

    44/111

    34

    4.8.2 Building security system layout design

    Fig. 4.16 Selection mode of building security system

    1. Date and Time 2. Mode selection button

    Fig. 4.17 Householder mode of building security system

    1. Date and Time 2. Camera box

    3. Message box 4. Exit button

  • 7/28/2019 Vijay Kumar Mps

    45/111

    35

    Fig. 4.18 Visitor mode of building security system

    1. Date and Time 2. Display of floor and flat

    3. Message box 4. Number and character keypad

    5. Exit button

    4.8.3 Clubhouse system layout

    Fig. 4.19 Language Selection mode of clubhouse system

    1. Mode selection button

  • 7/28/2019 Vijay Kumar Mps

    46/111

    36

    Fig. 4.20 Selection mode of clubhouse system

    1. Mode selection button

    Fig. 4.21 Login mode of clubhouse system

    1. Camera box 2. Message box

    3. Login button

  • 7/28/2019 Vijay Kumar Mps

    47/111

    37

    Fig. 4.22 Choose facilities mode of clubhouse system

    1. Camera box 2. Message box

    3. Login button 4. Facilities button

    Fig. 4.23 Logout mode of clubhouse system

    1. Camera box 2. Message box

    3. Logout button

  • 7/28/2019 Vijay Kumar Mps

    48/111

    38

    Chapter 5 Evaluation of Multi-Biometrics Recognit ion Systems

    5.1 Overview

    We would like to tell you our biometric system. Its all of good points in the popular

    area. And we also have any short points for future improvement.

    5.2 Principle of Biometric Enrolment and Verification

    For the good side, people no need to remember the word of password for entry to

    their building. They no need to use any key or find other people to help them open the

    door. Our biometric system can easy to help people only put their face in front of the

    camera for open the door. It seen that it is very convenience, comfortable and

    user-friendly to our customer.

    For the bad side, when a householder sometime wears glasses, sometime not wear

    glasses. Our facial recognition system may verify failed for their glasses or cap.

    It is because our system is followed the capture face data to compare the persons

    face. If the person wear glasses or cap, it may verify failed.

    On the other hand, if the area has not enough light. It also may distort the verify %.

    It is because if the area has not enough light, then the camera can not capture the

    face data fully and immediately.

    5.3 Summary

    In fact, all of the technology also has good and bad points. Facial recognition system

    also has that two points. But Biometric system really can help people to make the

    world convenience and more easy.

    So that, biometric system also can help human to analysis many problems. We may

    improve the biometric technology as soon as possible. It is because it may be the

    future one of the main technology.

  • 7/28/2019 Vijay Kumar Mps

    49/111

    39

    Chapter 6 Appl ication Procedure of Multi-Biometrics Recognition

    Systems

    6.1 Administ ration Tools

    6.1.1 Add new householder

    Step1. Select Householder -> Database Management in menu bar.

    Fig. 6.1 Select Database Management

    Step2. Click the Add New button.

    Fig. 6.2 Click the Add New button

  • 7/28/2019 Vijay Kumar Mps

    50/111

    40

    Step3. The Add user windows will appear. Enter the detail of householder.

    Fig. 6.3 Add user windows

    Step4. Click the Start button to open the camera and click Enroll button to make a

    face enrollment.

    Fig. 6.4 Procedure of face enrollment

  • 7/28/2019 Vijay Kumar Mps

    51/111

    41

    Step5. The successful message will be appear when the face enrollment success.

    Fig. 6.5 Successful message of face enrollment

    Step6. Click the Save button after enroll the face and enter the detail. The tools will

    add new householder in database and show the successful message.

    Fig. 6.6 Successful message of add new householder

  • 7/28/2019 Vijay Kumar Mps

    52/111

    42

    Step7. If you do not enroll the face before click the Save button, the tools will show

    the error message and tell you enroll the face.

    Fig. 6.7 Error message of add new householder

    Step8. The tools will show you the new householder in the list.

    Fig. 6.8 New householder in the list

  • 7/28/2019 Vijay Kumar Mps

    53/111

    43

    6.1.2 Edit householder

    Step1. Select the householder you want to edit in the list, and then click Edit

    button.

    Fig. 6.9 Click the Edit button

    Step2. Click the Start button to open the camera and click Enroll button to make

    a new face enrollment.

    Fig. 6.10 Enroll new face

  • 7/28/2019 Vijay Kumar Mps

    54/111

    44

    Step3. The successful message will be appear when the face enrollment success.

    Fig. 6.11 Successful message of face enrollment

    Step4. Click the Save button after enroll the face and modify the detail. The tools

    will update householder in database and show the successful message.

    Fig. 6.12 Successful message of update householder

  • 7/28/2019 Vijay Kumar Mps

    55/111

    45

    6.1.3 Delete householder

    Step1. Select the householder in the list and click Delete button.

    Fig. 6.13 Delete the householder

    Step2. The tools will ask you confirm to delete.

    Fig. 6.14 Confirm to delete householder

  • 7/28/2019 Vijay Kumar Mps

    56/111

    46

    6.1.4 Householder entry log

    Step1. Select Householder -> Entry Log in menu bar.

    Fig. 6.15 Select Entry Log of householder

    Step2. Enter the householder ID or name and select the range of date to search the

    log.

    Fig. 6.16 Query of Householder Entry Log

  • 7/28/2019 Vijay Kumar Mps

    57/111

    47

    Step3. The tools will show the result.

    Fig. 6.17 Result of Householder Entry Log

    6.1.5 Visi tor entry log

    Step1. Select Visitor -> Entry Log in menu bar.

    Fig. 6.18 Select Entry Log of visitor

  • 7/28/2019 Vijay Kumar Mps

    58/111

    48

    Step2. Select the date and building

    Fig. 6.19 Query of Visitor Entry Log

    Step3. You can select the visitor in the list and it will show the photo of visitor.

    Fig. 6.20 Show the photo of visitor

  • 7/28/2019 Vijay Kumar Mps

    59/111

    49

    6.2 Bui lding Security System

    6.2.1 Householder Mode

    Step1. Press the Householder button.

    Fig. 6.21 Mode selection of Building Security System

    Step2. The systems will identify after 3 seconds automatically. No needs enter anybutton.

    Fig. 6.22 Procedure of identify the householder

  • 7/28/2019 Vijay Kumar Mps

    60/111

    50

    Step3. If the systems cannot identify you, it will show the error message and identify

    after 3 seconds again.

    Fig. 6.23 Error message when cannot identify the householder

    Step4. If success to identify, the systems will show your name and show you the

    success message. The door will be open.

    Fig. 6.24 Householder identify complete

  • 7/28/2019 Vijay Kumar Mps

    61/111

    51

    6.2.2 Visitor Mode

    Step1. Press the Visitor button.

    Fig. 6.25 Mode selection of Building Security System

    Step2. Enter the floor and flat you want to go. Then, press the Enter button. Also,

    you can the Clear button when you enter wrong floor and flat.

    Fig. 6.26 Procedure of enter the floor and flat

  • 7/28/2019 Vijay Kumar Mps

    62/111

    52

    Step3. Our floor range is 1 to 15. If you enter large than 15, you will get the error

    message and enter the correct floor.

    Fig. 6.27 Error message of enter wrong floor

    Step4. Press the button to capture your face when you are ready in front of the

    camera. After press the button, the systems will countdown 3 seconds tocapture automatically.

    Fig. 6.28 Procedure of face capture

  • 7/28/2019 Vijay Kumar Mps

    63/111

    53

    Step5. Put your any finger on the fingerprint device to capture your finger. It needs to

    capture 3 times.

    Fig. 6.29 Procedure of fingerprint capture

    Step6. After face and fingerprint capture, the systems will save your data in

    database and open the door.

    Fig. 6.30 Visitor register complete

  • 7/28/2019 Vijay Kumar Mps

    64/111

    54

    6.3 Clubhouse system

    6.3.1 Process of clubhouse login and logout system

    Step1. You can see the selection page. When you want to login clubhouse, you

    can press the button

    Fig. 6.31 Step 1 of process clubhouse system

    Step2. The login page is opened. You can see the monitor and message. In this

    moment, you need to put your face in front of the camera.

    Fig. 6.32 Step 2 of process clubhouse system

  • 7/28/2019 Vijay Kumar Mps

    65/111

    55

    Step3. When you are our householder, our database will find your face data. The

    system will let you pass the login process and click the login button for

    verifies.

    Fig. 6.33 Step 3 of process clubhouse system

    Step4. When you login successful, our database should store your login time record.

    Fig. 6.34 Step 4 of process clubhouse system

  • 7/28/2019 Vijay Kumar Mps

    66/111

    56

    Step5. When you want to leave our clubhouse, you must logout our system. It is as

    same as login part. You also put on your face in front of the camera. Our

    database will record your logout time automatically.

    Fig. 6.35 Step 5 of process clubhouse system

    Step6. When you logout successful, our database should store your logout time

    record.

    Fig. 6.36 Step 6 of process clubhouse system

  • 7/28/2019 Vijay Kumar Mps

    67/111

    57

    6.3.2 Process of clubhouse payroll system

    Step1. When you pay the clubhouse free, you may go to our clubhouse payroll

    system.

    Fig. 6.37 Step 1 of process clubhouse payroll system

    Step2. You also put your face in front of our camera. Our database will search your

    login and logout time for calculates the price for clubhouse payment.

    Fig. 6.38 Step 2 of process of clubhouse payroll system

  • 7/28/2019 Vijay Kumar Mps

    68/111

    58

    Step3. When you pay the money to our staff, our database should store your

    payment record.

    Fig. 6.39 Step 3 of process of clubhouse payroll system

  • 7/28/2019 Vijay Kumar Mps

    69/111

    59

    Chapter 7 Verification of the Multi-Biometrics Recognition

    Systems

    7.1 Overview

    In this part, we would like to represent our systems verification result of facial

    recognition. We will test it 20 times to get the result of its FAR and FRR. It cans test

    the reliable and accuracy of the system.

    7.2 Verification of Result

    FAR and FRR of Facial recognition:

    No. of correct

    acceptance (a)

    No. of false rejection

    (b)

    False Rejection Rate (FRR)

    b / (a + b)

    15 5 0.25Table 7.1 FRR rate of facial recognition

    No. of correct rejection

    (a)

    No. of false

    acceptance (b)

    False Acceptance Rate (FAR)

    b / (a + b)

    20 0 0

    Table 7.2 FAR rate of facial recognition

    7.3 SummaryTo summarize, the FRR of facial recognition is a little bit high. It is 0.25%. Sometimes,

    it cannot verify properly. It is because the light, glasses, cap may affect the system to

    verify. Although the FRR is a little bit high, the FAR is 0. It shows that the system have

    a high reliable. And the system have a high accuracy to verify the user.

  • 7/28/2019 Vijay Kumar Mps

    70/111

    60

    Chapter 8 Conclusions and Further Development

    8.1 Overview

    Base on the important of biometrics technology, it is popular and user-friendly todisplace many older technologies and systems in the future technology development.

    8.2 Contribution of Final Year Project

    The achievements and contributions of this project can be summarizes as follows:-

    We are developed the three parts of the recognition system. There are Administration

    Tools, Building Security System and Clubhouse System. It is ready to apply in the

    building. This recognition is convenience and safety for security management. Wealso need to improve our technology, security and method for biometrics system built

    up process and developed any great ideas.

    They are no need to remember the word of password for house entry. It is because

    the entry password always changed a time. The householder may forget the

    password or remember the wrong one. Now, they only use their face to make an entry

    and no need to bring smartcard and remember the password.

    8.3 Discussion on the Project Limitation

    When a person sometime wears glasses, sometime not wear glasses. Our facial

    recognition system may verify failed for their glasses or cap. It is because our system

    is followed the capture face data to compare the persons face. So, the person enrolls

    the face record that he has no wear any glasses or anything on his face. If the person

    wears glasses or cap to verify, it may verify failed.

    On the other hand, if the area has not enough light or in a dark area. It also may

    distort the verify %. It may verify failed. It is because if the area has not enough light,

    then the camera cannot capture the face data fully and immediately.

  • 7/28/2019 Vijay Kumar Mps

    71/111

    61

    8.4 Further Proposal

    After this project, we have other further ideas. The further ideas are below:-

    z Administration Tools can generate the report of householder or visitor.

    z Add Chinese interface of the building security system.

    z Send the email or signal to householder when visitor come.

    z Payroll monthly statement for members.

    z Car entry and exit recognition system for car park

    Use face recognition to identify the householder and open the gate

    Record the entry and exit log for security

    The householder no need to bring the car park card for entry used

  • 7/28/2019 Vijay Kumar Mps

    72/111

    62

    References

    [1] Introduction of Biometrics

    http://www.hrsltd.com/identification_technology/biometrics.htm

    [2] History of Biometrics

    http://library.thinkquest.org/TQ0313041/scrottyhistory.htm

    [3] How does it work?

    http://www.findbiometrics.com/Pages/guide2.html

    [4] Applications in Biometrics

    http://www.findbiometrics.com/index.html#applications

    [5] Fig. 2.1 Biometric identification and encrypted data system

    http://www.pressi.com/gb/image/61510.html

    [6] Fig. 2.2 Biometric access control system (Exys Security system)http://www.exys.co.za/resume.html

    [7] Fig. 2.3 Country entry and exit control system

    http://www.komotv.com/news/story.asp?ID=17825

    [8] Fig. 2.4 Hand geometry control system

    http://www.inspectech.us/Securitysolutions_biometric.cfm

    [9] Fig. 2.5 Biometric experiment system

    http://www.intellisystem.it/eventi/TIMcatania2003/Tim2003.htm

    [10] Fig. 2.6 Presse Fotos ekey fingerprint systemhttp://www.ekey.at/presse/fotos.asp

    [11] Fig. 2.7 Biometric reader clocking system

    http://www.tensor.co.uk/english/biometric-clocking-system.htm

    [12] Fig. 2.8 Office access control system

    http://www.clarinetsys.com/en/kiosk.htm

    [13] Fig. 2.9 Windows lcqon recognition system

    http://www.acroprint.com/acroprintstore/Solutions/biometrics-faq.aspx

    [14] Fig. 2.10 Breaker facial searching system

    http://www.asia-soft.com/frs/en/projects/obraz/

    [15] Fig. 2.11 Biometric Patient Tracking System

    http://www.questbiometrics.com/biometrics-timekeeper-software.html

    [16] Fig. 2.12 fingerID system with biometrics in USA

    http://msnbc.msn.com/id/3999879

    [17] Introduction of fingerprint recognition

    http://www.bergdata.com/downloads/Introduction%20to%20Fingerprint.pdf

    [18] Fig. 3.1 Types of fingerprint

  • 7/28/2019 Vijay Kumar Mps

    73/111

    63

    [19] Fig. 3.2 Optical Fingerprint Sensors

    http://www.bergdata.com/downloads/Introduction%20to%20Fingerprint.pdf

    [20] Fig. 3.3 Surface Pressure Sensor

    http://www.bergdata.com/downloads/Introduction%20to%20Fingerprint.pdf

    [21] Fig. 3.4 Capacitive Sensors

    http://www.bergdata.com/downloads/Introduction%20to%20Fingerprint.pdf

    [22] Introduction of facial recognition

    http://www.findbiometrics.com/Pages/face_articles/face_2.html

    http://www.c-vis.com/htd/frt.html[23] Fig. 3.5 Facial geometry example

    http://www.c-vis.com/htd/frt.html

    [24] Fig. 3.6 Correct recognition example

    http://www.c-vis.com/htd/frt.html[25] Fig. 3.7 Facial recognition in airport

    http://www.c-vis.com/htd/frt.html

    [26] Fig. 4.1 Marcomedia Flash

    http://www.adobe.com/products/flash/flashpro/

    [27] Fig. 4.2 Adobe Photoshop

    http://www.adobe.com/products/photoshop/

    [28] Fig. 4.3 Visual Basic 6.0

    http://msdn.microsoft.com/vbrun/Tutorial and example of VB and MySQL

    http://www.vbmysql.com

    Tutorial of embedded Flash in VB6

    http://www.adobe.com/devnet/flash/articles/flash_vb.pdf

    http://www.vbcode.com

  • 7/28/2019 Vijay Kumar Mps

    74/111

    64

    Appendices

    Appendix A: Team member workload

    Chan Ka Lun, Peae (leader)

    z Design interface of Householder mode

    z Design interface of Visitor mode

    z Design interface of enrolment mode

    z Design interface of administrator mode

    z Programming of Householder mode

    z Programming of Visitor mode

    z Programming of enrolment mode

    z Programming of administrator modez Build up database system

    Tsang Man Piu

    z Design interface of Clubhouse login system

    z Design interface of Clubhouse payroll system

    z Programming of Clubhouse login system

    z Programming of Clubhouse payroll system

  • 7/28/2019 Vijay Kumar Mps

    75/111

    65

    Appendix B: Project plan

    PROJECT PLAN

    Course : 41381/3AStudent Name : Chan Ka Lun, Tsang Man PiuProject Title : Apply Multi-Biometrics Recognition Systems for Intelligent

    House ManagementProject Supervisor : Mr. MK LamDate : 7 October, 2005 (Week 4)Project Objective(s) : - Developed to use humans face and fingerprint to in place of

    the words of password and key.- Development of Multi-Biometrics Recognition System to

    instead of traditional security

    WeekNo. 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38

    Survey & Research

    Work flow &Database draft

    design

    Interface draft design

    Read SmartGatesmanual and SDK

    Read FutronicFingerprint SDK

    Database & Interfaceprogramming

    Programming

    Testing

    Project report &presentation

    Project Resources PlanEquipment: z PC with development environmentz Webcamz Fingerprint devicezTouch screen

    Tools: z Microsoft Visio for drawing diagramz Microsoft Word for typing reportz Microsoft PowerPoint for presentationz Adobe Photoshop for interface designz Macromedia Flash for interface designz Microsoft Visual Basic 6.0 for system programmingzTitanium SmartGate Biometric System SDK

    z Futronic Fingerprint SDK

  • 7/28/2019 Vijay Kumar Mps

    76/111

    66

    Appendix C: Programming code

    z The class module of system

    CRijndael.cls

    This class module is used to generate the 64 character filename of the

    template.1 Opt i on Expl i ci t23 Pri vat e m_l OnBi t s( 30) As Long4 Pr i vate m_l 2Power( 30) As Long5 Pri vat e m_byt OnBi t s( 7) As Byte6 Pr i vate m_byt 2Power( 7) As Byt e78 Pri vat e m_I nCo(3) As Byt e9

    10 Pr i vate m_f bsub(255) As Byt e11 Pr i vate m_r bsub(255) As Byt e12 Pri vate m_pt ab( 255) As Byt e

    13 Pr i vat e m_l t ab( 255) As Byte14 Pri vat e m_f t abl e(255) As Long15 Pr i vate m_r t abl e(255) As Long16 Pr i vate m_r co( 29) As Long1718 Pr i vat e m_Nk As Long19 Pr i vat e m_Nb As Long20 Pr i vate m_Nr As Long21 Pri vat e m_f i ( 23) As Byte22 Pr i vat e m_r i ( 23) As Byte23 Pr i vate m_f key( 119) As Long24 Pr i vate m_r key( 119) As Long2526 Pr i vate Decl are Sub CopyMemory Li b "kernel 32" Al i as "Rt l MoveMemory" _27 ( ByVal Dest i nat i on As Any, ByVal Sour ce As Any, ByVal Length As Long)2829 ' *************** ***************** **************** ***************** **************

    30 ' Cl ass_I ni t i al i ze ( SUB)31 ' *************** ***************** **************** ***************** **************32 Pr i vat e Sub Cl ass_I ni t i al i ze( )33 m_I nCo( 0) = &HB34 m_I nCo( 1) = &HD35 m_I nCo( 2) = &H936 m_I nCo( 3) = &HE3738 ' Coul d have done t hi s wi t h a l oop cal cul ati ng each val ue, but si mpl y39 ' assi gni ng t he val ues i s qui cker - BI TS SET FROM RI GHT40 m_bytOnBi t s( 0) = 1 ' 0000000141 m_bytOnBi t s( 1) = 3 ' 0000001142 m_bytOnBi t s( 2) = 7 ' 0000011143 m_bytOnBi t s( 3) = 15 ' 0000111144 m_bytOnBi t s( 4) = 31 ' 0001111145 m_bytOnBi t s( 5) = 63 ' 00111111

    46 m_byt OnBi t s( 6) = 127 ' 0111111147 m_byt OnBi t s( 7) = 255 ' 111111114849 ' Coul d have done t hi s wi t h a l oop cal cul ati ng each val ue, but si mpl y50 ' assi gni ng t he val ues i s qui cker - POWERS OF 251 m_byt 2Power ( 0) = 1 ' 0000000152 m_byt 2Power ( 1) = 2 ' 0000001053 m_byt 2Power ( 2) = 4 ' 0000010054 m_byt 2Power ( 3) = 8 ' 0000100055 m_byt 2Power ( 4) = 16 ' 0001000056 m_byt 2Power ( 5) = 32 ' 0010000057 m_byt 2Power ( 6) = 64 ' 0100000058 m_byt 2Power ( 7) = 128 ' 100000005960 ' Coul d have done t hi s wi t h a l oop cal cul ati ng each val ue, but si mpl y61 ' assi gni ng t he val ues i s qui cker - BI TS SET FROM RI GHT62 m_l OnBi t s( 0) = 1 ' 0000000000000000000000000000000163 m_l OnBi t s( 1) = 3 ' 0000000000000000000000000000001164 m_l OnBi t s( 2) = 7 ' 00000000000000000000000000000111

  • 7/28/2019 Vijay Kumar Mps

    77/111

    67

    65 m_l OnBi t s( 3) = 15 ' 0000000000000000000000000000111166 m_l OnBi t s( 4) = 31 ' 0000000000000000000000000001111167 m_l OnBi t s( 5) = 63 ' 0000000000000000000000000011111168 m_l OnBi t s( 6) = 127 ' 0000000000000000000000000111111169 m_l OnBi t s( 7) = 255 ' 0000000000000000000000001111111170 m_l OnBi t s( 8) = 511 ' 0000000000000000000000011111111171 m_l OnBi t s( 9) = 1023 ' 0000000000000000000000111111111172 m_l OnBi t s( 10) = 2047 ' 00000000000000000000011111111111

    73 m_l OnBi t s( 11) = 4095 ' 0000000000000000000011111111111174 m_l OnBi t s( 12) = 8191 ' 0000000000000000000111111111111175 m_l OnBi t s( 13) = 16383 ' 0000000000000000001111111111111176 m_l OnBi t s( 14) = 32767 ' 0000000000000000011111111111111177 m_l OnBi t s( 15) = 65535 ' 0000000000000000111111111111111178 m_l OnBi t s( 16) = 131071 ' 0000000000000001111111111111111179 m_l OnBi t s( 17) = 262143 ' 0000000000000011111111111111111180 m_l OnBi t s( 18) = 524287 ' 0000000000000111111111111111111181 m_l OnBi t s( 19) = 1048575 ' 0000000000001111111111111111111182 m_l OnBi t s( 20) = 2097151 ' 0000000000011111111111111111111183 m_l OnBi t s( 21) = 4194303 ' 0000000000111111111111111111111184 m_l OnBi t s( 22) = 8388607 ' 0000000001111111111111111111111185 m_l OnBi t s( 23) = 16777215 ' 0000000011111111111111111111111186 m_l OnBi t s( 24) = 33554431 ' 0000000111111111111111111111111187 m_l OnBi t s( 25) = 67108863 ' 0000001111111111111111111111111188 m_l OnBi t s( 26) = 134217727 ' 00000111111111111111111111111111

    89 m_l OnBi t s( 27) = 268435455 ' 0000111111111111111111111111111190 m_l OnBi t s( 28) = 536870911 ' 0001111111111111111111111111111191 m_l OnBi t s( 29) = 1073741823 ' 0011111111111111111111111111111192 m_l OnBi t s( 30) = 2147483647 ' 011111111111111111111111111111119394 ' Coul d have done t hi s wi t h a l oop cal cul ati ng each val ue, but si mpl y95 ' assi gni ng t he val ues i s qui cker - POWERS OF 296 m_l 2Power ( 0) = 1 ' 0000000000000000000000000000000197 m_l 2Power ( 1) = 2 ' 0000000000000000000000000000001098 m_l 2Power ( 2) = 4 ' 0000000000000000000000000000010099 m_l 2Power ( 3) = 8 ' 00000000000000000000000000001000

    100 m_l 2Power ( 4) = 16 ' 00000000000000000000000000010000101 m_l 2Power ( 5) = 32 ' 00000000000000000000000000100000102 m_l 2Power ( 6) = 64 ' 00000000000000000000000001000000103 m_l 2Power ( 7) = 128 ' 00000000000000000000000010000000104 m_l 2Power ( 8) = 256 ' 00000000000000000000000100000000105 m_l 2Power ( 9) = 512 ' 00000000000000000000001000000000106 m_l 2Power ( 10) = 1024 ' 00000000000000000000010000000000107 m_l 2Power ( 11) = 2048 ' 00000000000000000000100000000000108 m_l 2Power ( 12) = 4096 ' 00000000000000000001000000000000109 m_l 2Power ( 13) = 8192 ' 00000000000000000010000000000000110 m_l 2Power ( 14) = 16384 ' 00000000000000000100000000000000111 m_l 2Power ( 15) = 32768 ' 00000000000000001000000000000000112 m_l 2Power ( 16) = 65536 ' 00000000000000010000000000000000113 m_l 2Power ( 17) = 131072 ' 00000000000000100000000000000000114 m_l 2Power ( 18) = 262144 ' 00000000000001000000000000000000115 m_l 2Power ( 19) = 524288 ' 00000000000010000000000000000000116 m_l 2Power ( 20) = 1048576 ' 00000000000100000000000000000000117 m_l 2Power ( 21) = 2097152 ' 00000000001000000000000000000000118 m_l 2Power ( 22) = 4194304 ' 00000000010000000000000000000000119 m_l 2Power ( 23) = 8388608 ' 00000000100000000000000000000000120 m_l 2Power ( 24) = 16777216 ' 00000001000000000000000000000000121 m_l 2Power ( 25) = 33554432 ' 00000010000000000000000000000000

    122 m_l 2Power ( 26) = 67108864 ' 00000100000000000000000000000000123 m_l 2Power ( 27) = 134217728 ' 00001000000000000000000000000000124 m_l 2Power ( 28) = 268435456 ' 00010000000000000000000000000000125 m_l 2Power ( 29) = 536870912 ' 00100000000000000000000000000000126 m_l 2Power ( 30) = 1073741824 ' 01000000000000000000000000000000127 End Sub128129 ' *************** ***************** **************** ***************** **************130 ' LShi f t (FUNCTI ON)131 ' *************** ***************** **************** ***************** **************132 Pri vat e Funct i on LShi f t ( ByVal l Val ue As Long, _133 ByVal i Shi f t Bi t s As I nt eger ) As Long134 I f i Shi f tBi t s = 0 Then135 LShi f t = l Val ue136 Exi t Funct i on137 El seI f i Shi f t Bi t s = 31 Then138 I f l Val ue And 1 Then139 LShi f t = &H80000000140 El se

  • 7/28/2019 Vijay Kumar Mps

    78/111

    68

    141 LShi f t = 0142 End I f143 Exi t Funct i on144 El seI f i Shi f t Bi ts < 0 Or i Shi f tBi ts > 31 Then145 Er r . Rai se 6146 End I f147148 I f ( l Val ue And m_l 2Power ( 31 - i Shi f t Bi t s) ) Then

    149 LShi f t = ( ( l Val ue And m_l OnBi t s(31 - ( i Shi f t Bi t s + 1) ) ) * _150 m_l 2Power( i Shi f t Bi t s) ) Or &H80000000151 El se152 LShi f t = ( ( l Val ue And m_l OnBi t s( 31 - i Shi f t Bi t s) ) * _153 m_l 2Power ( i Shi f t Bi t s) )154 End I f155 End Funct i on156157 ' *************** ***************** **************** ***************** **************158 ' RShi f t ( FUNCTI ON)159 ' *************** ***************** **************** ***************** **************160 Pri vat e Funct i on RShi f t ( ByVal l Val ue As Long, _161 ByVal i Shi f t Bi t s As I nt eger ) As Long162 I f i Shi f tBi t s = 0 Then163 RShi f t = l Val ue164 Exi t Funct i on

    165 El seI f i Shi f t Bi t s = 31 Then166 I f l Val ue And &H80000000 Then167 RShi f t = 1168 El se169 RShi f t = 0170 End I f171 Exi t Funct i on172 El seI f i Shi f t Bi ts < 0 Or i Shi f tBi ts > 31 Then173 Er r . Rai se 6174 End I f175176 RShi f t = ( l Val ue And &H7FFFFFFE) \ m_l 2Power( i Shi f t Bi t s)177178 I f ( l Val ue And &H80000000) Then179 RShi f t = ( RShi f t Or ( &H40000000 \ m_l 2Power ( i Shi f t Bi t s - 1) ) )180 End I f181 End Funct i on182183 ' *************** ***************** **************** ***************** **************184 ' LShi f t Byt e ( FUNCTI ON)185 ' *************** ***************** **************** ***************** **************186 Pri vat e Funct i on LShi f t Byte(ByVal bytVal ue As Byt e, _187 ByVal byt Shi f t Bi t s As Byte) As Byt e188 I f bytShi f t Bi t s = 0 Then189 LShi f t Byte = bytVal ue190 Exi t Funct i on191 El seI f byt Shi f t Bi t s = 7 Then192 I f bytVal ue And 1 Then193 LShi f t Byt e = &H80194 El se195 LShi f t Byte = 0196 End I f197 Exi t Funct i on

    198 El seI f byt Shi f t Bi t s < 0 Or bytShi f t Bi t s > 7 Then199 Er r . Rai se 6200 End I f201202 LShi f t Byte = ( ( bytVal ue And m_bytOnBi t s( 7 - bytShi f t Bi t s) ) * _203 m_byt 2Power( byt Shi f t Bi t s) )204 End Funct i on205206 ' *************** ***************** **************** ***************** **************207 ' RShi f t Byt e ( FUNCTI ON)208 ' *************** ***************** **************** ***************** **************209 Pri vat e Funct i on RShi f t Byte(ByVal bytVal ue As Byt e, _210 ByVal byt Shi f t Bi t s As Byte) As Byt e211 I f bytShi f t Bi t s = 0 Then212 RShi f t Byte = byt Val ue213 Exi t Funct i on214 El seI f byt Shi f t Bi t s = 7 Then215 I f bytVal ue And &H80 Then216 RShi f t Byte = 1

  • 7/28/2019 Vijay Kumar Mps

    79/111

    69

    217 El se218 RShi f t Byte = 0219 End I f220 Exi t Funct i on221 El seI f byt Shi f t Bi t s < 0 Or bytShi f t Bi t s > 7 Then222 Er r . Rai se 6223 End I f224

    225 RShi f t Byte = bytVal ue \ m_byt 2Power( bytShi f t Bi t s)226 End Funct i on227228 ' *************** ***************** **************** ***************** **************229 ' Rot ateLef t ( FUNCTI ON)230 ' *************** ***************** **************** ***************** **************231 Pri vat e Funct i on RotateLef t ( ByVal l Val ue As Long, _232 ByVal i Shi f t Bi t s As I nt eger) As Long233 Rot ateLef t = LShi f t( l Val ue, i Shi f tBi t s) Or RShi f t( l Val ue, ( 32 - i Shi f t Bi t s))234 End Funct i on235236 ' ' ***************** **************** ***************** **************** *************237 ' ' Rot ateLef t Byt e ( FUNCTI ON)238 ' *************** ***************** **************** ***************** **************239 Pri vat e Funct i on RotateLef t Byt e(ByVal bytVal ue As Byt e, _240 ByVal byt Shi f t Bi t s As Byt e) As Byt e

    241 Rot at eLef t Byte = LShi f t Byte(byt Val ue, bytShi f t Bi t s) Or _242 RShi f t Byte(byt Val ue, ( 8 - bytShi f t Bi t s) )243 End Funct i on244245 ' *************** ***************** **************** ***************** **************246 ' Pack ( FUNCTI ON)247 ' *************** ***************** **************** ***************** **************248 Pri vat e Funct i on Pack( b( ) As Byte) As Long249 Di m l Count As Long250 Di m l Temp As Long251252 For l Count = 0 To 3253 l Temp = b( l Count)254 Pack = Pack Or LShi f t ( l Temp, ( l Count * 8))255 Next256 End Funct i on257258 ' *************** ***************** **************** ***************** **************259 ' PackFr om ( FUNCTI ON)260 ' *************** ***************** **************** ***************** **************261 Pri vat e Funct i on PackFrom( b() As Byt e, _262 ByVal k As Long) As Long263 Di m l Count As Long264 Di m l Temp As Long265266 For l Count = 0 To 3267 l Temp = b( l Count + k)268 PackFr om= PackFr omOr LShi f t ( l Temp, ( l Count * 8) )269 Next270 End Funct i on271272 ' *************** ***************** **************** ***************** **************273 ' Unpack ( SUB)

    274 ' *************** ***************** **************** ***************** **************275 Pr i vate Sub Unpack( ByVal a As Long, _276 b( ) As Byt e)277 b(0) = a And m_l OnBi t s( 7)278 b( 1) = RShi f t ( a, 8) And m_l OnBi t s( 7)279 b( 2) = RShi f t ( a, 16) And m_l OnBi t s( 7)280 b( 3) = RShi f t ( a, 24) And m_l OnBi t s( 7)281 End Sub282283 ' *************** ***************** **************** ***************** **************284 ' UnpackFr om ( SUB)285 ' *************** ***************** **************** ***************** **************286 Pr i vate Sub UnpackFr om( ByVal a As Long, _287 b( ) As Byt e, _288 ByVal k As Long)289 b( 0 + k) = a And m_l OnBi t s( 7)290 b( 1 + k) = RShi f t ( a, 8) And m_l OnBi t s( 7)291 b( 2 + k) = RShi f t ( a, 16) And m_l OnBi t s( 7)292 b( 3 + k) = RShi f t ( a, 24) And m_l OnBi t s( 7)

  • 7/28/2019 Vijay Kumar Mps

    80/111

    70

    293 End Sub294295 ' *************** ***************** **************** ***************** **************296 ' xt i me ( FUNCTI ON)297 ' *************** ***************** **************** ***************** **************298 Pri vat e Funct i on xt i me(ByVal a As Byte) As Byt e299 Di m b As Byt e300

    301 I f ( a And &H80) Then302 b = &H1B303 El se304 b = 0305 End I f306307 a = LShi f t Byte( a, 1)308 a = a Xor b309310 xt i me = a311 End Funct i on312313 ' *************** ***************** **************** ***************** **************314 ' bmul ( FUNCTI ON)315 ' *************** ***************** **************** ***************** **************316 Pr i vate Funct i on bmul ( ByVal x As Byt e, _

    317 y As Byt e) As Byt e318 I f x 0 And y 0 Then319 bmul = m_pt ab( ( CLng( m_l t ab( x) ) + CLng( m_l t ab( y) ) ) Mod 255)320 El se321 bmul = 0322 End I f323 End Funct i on324325 ' *************** ***************** **************** ***************** **************326 ' SubByt e ( FUNCTI ON)327 ' *************** ***************** **************** ***************** **************328 Pr i vate Funct i on SubByt e(ByVal a As Long) As Long329 Di m b( 3) As Byt e330331 Unpack a, b332 b( 0) = m_f bsub( b( 0))333 b( 1) = m_f bsub( b( 1))334 b( 2) = m_f bsub( b( 2))335 b( 3) = m_f bsub( b( 3))336337 SubByt e = Pack( b)338 End Funct i on339340 ' *************** ***************** **************** ***************** **************341 ' product ( FUNCTI ON)342 ' *************** ***************** **************** ***************** **************343 Pri vat e Funct i on pr oduct ( ByVal x As Long, _344 ByVal y As Long) As Long345 Di m xb( 3) As Byt e346 Di m yb( 3) As Byt e347348 Unpack x, xb349 Unpack y, yb

    350 pr oduct = bmul ( xb( 0) , yb( 0) ) Xor bmul ( xb( 1) , yb( 1) ) Xor bmul ( xb( 2) , yb( 2) ) _351 Xor bmul ( xb( 3), yb( 3) )352 End Funct i on353354 ' *************** ***************** **************** ***************** **************355 ' I nvMi xCol ( FUNCTI ON)356 ' *************** ***************** **************** ***************** **************357 Pr i vate Funct i on I nvMi xCol ( ByVal x As Long) As Long358 Di m y As Long359 Di m m As Long360 Di m b( 3) As Byt e361362 m= Pack( m_I nCo)363 b( 3) = product ( m, x)364 m = RotateLef t ( m, 24)365 b( 2) = product ( m, x)366 m = RotateLef t ( m, 24)367 b( 1) = product ( m, x)368 m = RotateLef t ( m, 24)

  • 7/28/2019 Vijay Kumar Mps

    81/111

    71

    369 b( 0) = product ( m, x)370 y = Pack( b)371372 I nvMi xCol = y373 End Funct i on374375 ' *************** ***************** **************** ***************** **************376 ' Byt eSub ( FUNCTI ON)

    377 ' *************** ***************** **************** ***************** **************378 Pr i vate Funct i on Byt eSub( ByVal x As Byt e) As Byt e379 Di m y As Byt e380381 y = m_pt ab( 255 - m_l t ab( x) )382 x = y383 x = Rotat eLeft Byte( x, 1)384 y = y Xor x385 x = Rotat eLeft Byte( x, 1)386 y = y Xor x387 x = Rotat eLeft Byte( x, 1)388 y = y Xor x389 x = Rotat eLeft Byte( x, 1)390 y = y Xor x391 y = y Xor &H63392

    393 Byt eSub = y394 End Funct i on395396 ' *************** ***************** **************** ***************** **************397 ' gent abl es ( SUB)398 ' *************** ***************** **************** ***************** **************399 Publ i c Sub gentabl es( )400 Di m i As Long401 Di m y As Byt e402 Di m b( 3) As Byt e403 Di m i b As Byte404405 m_l t ab( 0) = 0406 m_pt ab( 0) = 1407 m_l t ab( 1) = 0408 m_pt ab( 1) = 3409 m_l t ab( 3) = 1410411 For i = 2 To 255412 m_ptab( i ) = m_pt ab( i - 1) Xor xti me(m_ptab( i - 1) )413 m_l t ab( m_ptab( i ) ) = i414 Next415416 m_f bsub(0) = &H63417 m_r bsub(&H63) = 0418419 For i = 1 To 255420 i b = i421 y = Byt eSub( i b)422 m_f bsub( i ) = y423 m_r bsub(y) = i424 Next425

    426 y = 1427 For i = 0 To 29428 m_r co( i ) = y429 y = xt i me(y)430 Next431432 For i = 0 To 255433 y = m_f bsub( i )434 b(3) = y Xor xt i me(y)435 b( 2) = y436 b( 1) = y437 b( 0) = xti me( y)438 m_f t abl e( i ) = Pack(b)439440 y = m_r bsub( i )441 b(3) = bmul ( m_I nCo(0) , y)442 b(2) = bmul ( m_I nCo(1) , y)443 b(1) = bmul ( m_I nCo(2) , y)444 b(0) = bmul ( m_I nCo(3) , y)

  • 7/28/2019 Vijay Kumar Mps

    82/111

    72

    445 m_r t abl e( i ) = Pack(b)446 Next447 End Sub448449 ' *************** ***************** **************** ***************** **************450 ' gkey ( SUB)451 ' *************** ***************** **************** ***************** **************452 Publ i c Sub gkey( ByVal nb As Long, _

    453 ByVal nk As Long, _454 key( ) As Byt e)455456 Di m i As Long457 Di m j As Long458 Di m k As Long459 Di m m As Long460 Di m N As Long461 Di m C1 As Long462 Di m C2 As Long463 Di m C3 As Long464 Di m Ci pherKey( 7) As Long465466 m_Nb = nb467 m_Nk = nk468

    469 I f m_Nb >= m_Nk Then470 m_Nr = 6 + m_Nb471 El se472 m_Nr = 6 + m_Nk473 End I f474475 C1 = 1476 I f m_Nb < 8 Then477 C2 = 2478 C3 = 3479 El se480 C2 = 3481 C3 = 4482 End I f483484 For j = 0 To nb - 1485 m = j * 3486487 m_f i ( m) = ( j + C1) Mod nb488 m_f i ( m + 1) = ( j + C2) Mod nb489 m_f i ( m + 2) = ( j + C3) Mod nb490 m_r i ( m) = ( nb + j - C1) Mod nb491 m_r i ( m + 1) = ( nb + j - C2) Mod nb492 m_r i ( m + 2) = ( nb + j - C3) Mod nb493 Next494495 N = m_Nb * ( m_Nr + 1)496497 For i = 0 To m_Nk - 1498 j = i * 4499 Ci pher Key(i ) = PackFr om( key, j )500 Next501

    502 For i = 0 To m_Nk - 1503 m_f key(i ) = Ci pher Key(i )504 Next505506 j = m_Nk507 k = 0508 Do Whi l e j < N509 m_f key( j ) = m_f key( j - m_Nk) Xor _510 SubByt e(Rot ateLef t ( m_f key( j - 1), 24) ) Xor m_r co(k)511 I f m_Nk

  • 7/28/2019 Vijay Kumar Mps

    83/111

    73

    521 Do Whi l e i < 4 And ( i + j ) < N522 m_f key(i + j ) = m_f key(i + j - m_Nk) Xor _523 m_f key(i + j - 1)524 i = i + 1525 Loop526 I f j + 4 < N Then527 m_f key(j + 4) = m_f key(j + 4 - m_Nk) Xor _528 SubByt e(m_f key( j + 3))

    529 End I f530 i = 5531 Do Whi l e i < m_Nk And ( i + j ) < N532 m_f key(i + j ) = m_f key(i + j - m_Nk) Xor _533 m_f key(i + j - 1)534 i = i + 1535 Loop536 End I f537538 j = j + m_Nk539 k = k + 1540 Loop541542 For j = 0 To m_Nb - 1543 m_r key(j + N - nb) = m_f key(j )544 Next

    545546 i = m_Nb547 Do Whi l e i < N - m_Nb548 k = N - m_Nb - i549 For j = 0 To m_Nb - 1550 m_rkey(k + j ) = I nvMi xCol ( m_f key( i + j ) )551 Next552 i = i + m_Nb553 Loop554555 j = N - m_Nb556 Do Whi l e j < N557 m_r key( j - N + m_Nb) = m_f key( j )558 j = j + 1559 Loop560 End Sub561562 ' *************** ***************** **************** ***************** **************563 ' encrypt (SUB)564 ' *************** ***************** **************** ***************** **************565 Publ i c Sub Encr ypt ( buf f ( ) As Byte)566 Di m i As Long567 Di m j As Long568 Di m k As Long569 Di m m As Long570 Di m a(7) As Long571 Di m b(7) As Long572 Di m x( ) As Long573 Di m y( ) As Long574 Di m t ( ) As Long575576 For i = 0 To m_Nb - 1577 j = i * 4

    578579 a( i ) = PackFrom( buf f , j )580 a( i ) = a( i ) Xor m_f key( i )581 Next582583 k = m_Nb584 x = a585 y = b586587 For i = 1 To m_Nr - 1588 For j = 0 To m_Nb - 1589 m= j * 3590 y(j ) = m_f key(k) Xor m_f t abl e( x(j ) And m_l OnBi t s( 7) ) Xor _591 Rotat eLef t ( m_f t abl e(RShi f t ( x(m_f i ( m) ) , 8) And m_l OnBi t s( 7) ) , 8) Xor _592 Rot at eLef t ( m_f t abl e( RShi f t ( x(m_f i ( m + 1) ) , 16) And m_l OnBi t s( 7) ) , 16) Xor

    _593 Rot at eLef t ( m_f t abl e( RShi f t ( x(m_f i ( m + 2) ) , 24) And m_l OnBi t s( 7) ) , 24)594 k = k + 1595 Next

  • 7/28/2019 Vijay Kumar Mps

    84/111

    74

    596 t = x597 x = y598 y = t599 Next600601 For j = 0 To m_Nb - 1602 m = j * 3603 y(j ) = m_f key(k) Xor m_f bsub( x(j ) And m_l OnBi t s( 7) ) Xor _

    604 Rotat eLef t ( m_f bsub( RShi f t ( x(m_f i ( m) ) , 8) And m_l OnBi t s( 7) ) , 8) Xor _605 Rotat eLef t ( m_f bsub( RShi f t ( x(m_f i ( m + 1) ) , 16) And m_l OnBi t s( 7) ) , 16) Xor _606 Rotat eLef t ( m_f bsub( RShi f t ( x(m_f i ( m + 2) ) , 24) And m_l OnBi t s( 7) ) , 24)607 k = k + 1608 Next609610 For i = 0 To m_Nb - 1611 j = i * 4612 UnpackFromy( i ) , buf f , j613 x( i ) = 0614 y( i ) = 0615 Next616 End Sub617618 ' *************** ***************** **************** ***************** **************619 ' decrypt (SUB)

    620 ' *************** ***************** **************** ***************** **************621 Publ i c Sub Decrypt( buf f ( ) As Byte)622 Di m i As Long623 Di m j As Long624 Di m k As Long625 Di m m As Long626 Di m a(7) As Long627 Di m b(7) As Long628 Di m x( ) As Long629 Di m y( ) As Long630 Di m t ( ) As Long631632 For i = 0 To m_Nb - 1633 j = i * 4634 a( i ) = PackFrom( buf f , j )635 a( i ) = a( i ) Xor m_rkey( i )636 Next637638 k = m_Nb639 x = a640 y = b641642 For i = 1 To m_Nr - 1643 For j = 0 To m_Nb - 1644 m= j * 3645 y(j ) = m_r key(k) Xor m_r t abl e( x(j ) And m_l OnBi t s( 7) ) Xor _646 Rotat eLef t ( m_r t abl e(RShi f t ( x(m_r i ( m) ) , 8) And m_l OnBi t s( 7) ) , 8) Xor _647 Rotat eLef t ( m_r t abl e(RShi f t ( x(m_r i ( m + 1) ) , 16) And m_l OnBi t s( 7) ) , 16) Xor

    _648 Rot at eLef t ( m_r t abl e( RShi f t ( x(m_r i ( m + 2) ) , 24) And m_l OnBi t s( 7) ) , 24)649 k = k + 1650 Next651 t = x

    652 x = y653 y = t654 Next655656 For j = 0 To m_Nb - 1657 m = j * 3658659 y( j ) = m_r key( k) Xor m_r bsub( x( j ) And m_l OnBi t s( 7)) Xor _660 Rotat eLef t ( m_r bsub( RShi f t ( x(m_r i ( m) ) , 8) And m_l OnBi t s( 7) ) , 8) Xor _661 Rotat eLef t ( m_r bsub( RShi f t ( x(m_r i ( m + 1) ) , 16) And m_l OnBi t s( 7) ) , 16) Xor _662 Rotat eLef t ( m_r bsub( RShi f t ( x(m_r i ( m + 2) ) , 24) And m_l OnBi t s( 7) ) , 24)663 k = k + 1664 Next665666 For i = 0 To m_Nb - 1667 j = i * 4668669 UnpackFromy( i ) , buf f , j670 x( i ) = 0

  • 7/28/2019 Vijay Kumar Mps

    85/111

    75

    671 y( i ) = 0672 Next673 End Sub674675 ' ' ***************** **************** ***************** **************** *************676 ' ' CopyByt esASP ( SUB)677 ' '678 ' ' Sl ower non-API f unct i on you can use t o copy ar r ay data

    679 ' ' ***************** **************** ***************** **************** *************680 ' Pri vat e Sub CopyByt esASP( byt Dest ( ) As Byt e, _681 ' l Dest St ar t As Long, _682 ' bytSour ce( ) As Byt e, _683 ' l Sour ceSt art As Long, _684 ' l Length As Long)685 ' Di m l Count As Long686 '687 ' l Count = 0688 ' Do689 ' bytDest ( l Dest St ar t + l Count ) = bytSour ce( l Sour ceSt ar t + l Count )690 ' l Count = l Count + 1691 ' Loop Unt i l l Count = l Lengt h692 ' End Sub693694 ' *************** ***************** **************** ***************** **************

    695 ' I sI ni t i al i zed ( FUNCTI ON)696 ' *************** ***************** **************** ***************** **************697 Pri vat e Funct i on I sI ni t i al i zed( ByRef vAr r ay As Vari ant ) As Bool ean698 On Er r or Resume Next699700 I sI ni t i al i zed = I sNumer i c(UBound( vAr r ay))701 End Funct i on702703 ' *************** ***************** **************** ***************** **************704 ' Encr yptDat a ( FUNCTI ON)705 '706 ' Takes the message, what ever t he si ze, and password i n one cal l and does707 ' everyt hi ng f or you t o r eturn an encoded/ encr ypt ed message708 ' *************** ***************** **************** ***************** **************709 Publ i c Funct i on Encr ypt Data( byt Message() As Byt e, _710 byt Password( ) As Byt e) As Byt e( )711 Di m byt Key( 31) As Byt e712 Di m bytI n( ) As Byte713 Di m byt Out ( ) As Byt e714 Di m bytTemp(31) As Byt e715 Di m l Count As Long716 Di m l Lengt h As Long717 Di m l EncodedLength As Long718 Di m byt Len( 3) As Byt e719 Di m l Posi t i on As Long720721 I f Not I sI ni t i al i zed( bytMessage) Then722 Exi t Funct i on723 End I f724 I f Not I sI ni t i al i zed( bytPasswor d) Then725 Exi t Funct i on726 End I f727

    728 ' Use f i r st 32 byt es of t he password f or t he key729 For l Count = 0 To UBound(bytPasswor d)730 byt Key( l Count ) = byt Password( l Count )731 I f l Count = 31 Then732 Exi t For733 End I f734 Next735736 ' Pr epare t he key; assume 256 bi t bl ock and key si ze737 gent abl es738 gkey 8, 8, bytKey739740 ' We are goi ng t o put t he message si ze on t he f r ont of t he message741 ' i n t he f i r st 4 bytes. I f t he l engt h i s more t han a max i nt we are742 ' i n t r oubl e743 l Length = UBound( byt Message) + 1744 l EncodedLength = l Lengt h + 4745746 ' The encoded l ength i ncl udes t he 4 byt es st uf f ed on t he f r ont

  • 7/28/2019 Vijay Kumar Mps

    86/111

    76

    747 ' and i s padded out t o be modul us 32748 I f l EncodedLengt h Mod 32 0 Then749 l EncodedLength = l EncodedLength + 32 - ( l EncodedLength Mod 32)750 End I f751 ReDi m byt I n( l EncodedLength - 1)752 ReDi m byt Out( l EncodedLength - 1)753754 ' Put t he l engt h on t he f r ont

    755 ' * Unpack l Length, byt I n756 CopyMemory Var Ptr ( bytI n( 0) ) , Var Ptr ( l Lengt h) , 4757 ' Put t he r est of t he message af t er i t758 ' * CopyByt esASP byt I n, 4, byt Message, 0, l Length759 CopyMemory VarPt r ( byt I n(4) ) , VarPt r ( byt Message( 0)) , l Lengt h760761 ' Encr ypt a bl ock at a t i me762 For l Count = 0 To l EncodedLength - 1 Step 32763 ' * CopyByt esASP byt Temp, 0, byt I n, l Count , 32764 CopyMemory VarPt r ( byt Temp( 0)) , VarPt r ( byt I n(l Count) ) , 32765 Encrypt byt Temp766 ' * CopyByt esASP byt Out , l Count , byt Temp, 0, 32767 CopyMemory VarPt r ( byt Out ( l Count ) ) , VarPt r ( byt Temp(0) ) , 32768 Next769770 Encr yptData = bytOut

    771 End Funct i on772773 ' *************** ***************** **************** ***************** **************774 ' Decr ypt Dat a ( FUNCTI ON)775 '776 ' Opposi t e of Encr ypt dat a777 ' *************** ***************** **************** ***************** **************778 Publ i c Funct i on DecryptData( byt I n() As Byt e, _779 byt Password( ) As Byt e) As Byt e( )780 Di m byt Message( ) As Byt e781 Di m byt Key( 31) As Byt e782 Di m byt Out ( ) As Byt e783 Di m bytTemp(31) As Byt e784 Di m l Count As Long785 Di m l Lengt h As Long786 Di m l EncodedLength As Long787 Di m byt Len( 3) As Byt e788 Di m l Posi t i on As Long789790 I f Not I sI ni t i al i zed( b