Sie sind auf Seite 1von 11

KINETIK, Vol.1, No.1, May 2016, pp.

103-113
ISSN : 2503-2259,
E-ISSN : 2503-2267 103

Your article does not meet one or more of the following criteria:
1. Writing must be in accordance with the guidelines given
2. There are no words, images in Indonesian.
3. Literature supports research, at least 20 articles from
Journal.
4. Found extracted research contributions and/or introductions.
Check contribution keywords like "However" and keywords
that negate previous research
5. Research must be reengineered, as seen from the
methodology described or described.
6. The tests carried out have a reference (both the standard
specified and from the previous literature)
7. Data supports testing
8. Draw conclusions based on the results of testing (not
suddenly appearing).
PRESENCE SYSTEM BASED ON QR CODE AND DIGITAL
SIGNATURE RSA USING TEMPLATE MATCHING IN ANDROID

Cahya Rahmad1, Dika Rizky Yuninanto2, Bayu Hari Saputro3, Dimas Rossiawan H.P4
1,2,3Information technology Department/ State Polytechnic of Malang,
4Eclectrical Engineering Department/ State Polytechnic of Malang

e-mail: cahya.rahmad@polinema.ac.id1, dikarizkyyunianto@polinema.ac.id2


bayuharisaputro@gmail.com 2, dimas.rossi@polinema.ac.id2

Abstract
The implementation of the Student attendance system at State Polytechnic of Malang,
especially in the department of information technology is considered to develop more efficiently.
It means that students no need to take attendance sheets when the class begin and return in
when class is finish. This study proposed to build a student attendance system that is more
effective and efficient than the existing system. There are two algorithms used for this
development, DS RSA and template matching. QR Code with DS RSA algorithm used for secure
key randomization and reliable key generate purposes. That process is used to prevent students
from coming into wrong classes. Template matching used for students faces detection to ensure
students are surely attending in the class. The first thing is, the student must take a photo of their
faces and then scan the QR Code that already generated on the screen with their smartphones.
The result of the experiment, we succeed to build an attendance system by implementing the DS
RSA Algorithm and template matching algorithm. The analysis results of this experiment
concluded that DS RSA successfully generated with good reliability and highest accuracy of
template matching is 93.33% with 80 templates.

Keywords: DS RSA Algorithm, Face Detection, QR Code, Student Attendance, Template


Matching Algorithm

1. Introduction

Citation : Wicaksono, Galih Wasis; Al-Rizki, Muhammad Andi. Improving Quality of Academic Quality
Evaluation Universitas Muhammadiyah Malang using Quality Information System. KINETIK, [S.l.], v. 1, n. 1,
p. 1-8, oct. 2016. doi:http://dx.doi.org/10.22219/kinetik.v1i1.3
Paper submitted on February 26, 2016; Revision on May 1, 2016; Received on June 1, 2016
104 ISSN: 2503-2259; E-ISSN: 2503-2267

So far, the present system of higher education institutions in Indonesia dominated by


conventional systems, one of them is State Polytechnic of Malang, especially in the Information
Technology department. In the Information Technology Department of the State Polytechnic of
Malang, before the lecturer makes a presence in class, the student is required to take attendance
papers at the admin first, then return them to the admin after the lecture finished. From the
explanation of the conventional system flow, the author is aware of the problem of mobilization
where sometimes the paper to presence has a location far from the class.

Technological developments in the Industrial Revolution era 4.0 can be used as a solution to
overcome these presence problems[1],[2],[3], one of them is to integrate Quick Response Code
(QR Code) technology with Digital Signature RSA and Face Detection for attendance systems in
the Information Technology Department of the State Polytechnic of Malang. The QR code is a
dimension 2 (private and public) matrix code created by the Japanese company Denso-Wave in
1994 [4]. Asymmetric cryptography is a cryptographic algorithm that uses two different keys to
encrypt and decrypt [5], [6].
Therefore, in this paper, a QR Code presence system that is integrated with RSA's Digital
Signature and Faces Detection using the Android-based Template Matching method is proposed.
The flow of the system is the lecturer will generate a QR Code that has been encrypted using a
private key and the results will be displayed in front of the class, then students only need to scan
the QR code through a smartphone to make a presence. Encryption algorithms in the QR Code
randomization system based on security, reliability, and to give authority to students with their
respective classes. Before presenting, students must photograph their faces. The results of the
photos will be checked using Face Detection using template matching and Normalized Cross-
Correlation methods to find out whether the images meet the requirements or not. If the images
meet the requirements, then the images will be displayed on the projectors to avoid cheating on
presence.

Every certain time, the QR code will automatically change to avoid cheating students to attend
without any presence in class. If a student has successfully made a presence, then the data will
be automatically stored by the system. It is expected to make the system to be more effective

2. Research Method

2.1 QR Code

Research QR Code (Quick Response Code) is a 2-dimensional matrix that can store data in
the form of text, images, and so on. Developed by Denso Corporation of Japan for automotive
companies in 1994. QR Code examples in Figure 1 [7]. There are two procedures In QR Code,
generating QR and Scanning QR Code [5],[8]. The procedure for generating a QR code in Figure
2. For the QR Code, reading procedure is the reverse process of generating a QR Code shown
in Figure 3.

Figure 1. Example of QR Code

KINETIK Vol. 1, No. 1, May 2016: 101 – 141


KINETIK ISSN: xxxx-xxxx 105

Figure 2. Generating Diagram in QR Code

2.2 Digital Signature

Digital Signature is a concept to ensure digital documents maintained for authenticity and
security. Introduced first time by adobe company in 1999, applied to PDF files and now the use of
Digital Signature itself has grown not only for documents but can also as transaction and login
security, [6], [9], and [10].

2.3 RSA
RSA introduced by Ron Rivest, Adi Shamir, and Len Adleman in 1977[7]. RSA is known as the
first algorithm that is most suitable for the process of signing and encryption [6], [11], and [12]. RSA
has private and public keys. RSA is still very widely implemented, especially in the field of
transactions because it is believed to be very safe with sufficiently long keys [5]. The application of
the RSA scheme to Digital Signature defined in Equation (1) – (5):
1. Choose two prime numbers p and q, with the condition
𝑝!=𝑞 (1)
2. Calculate n with equation (2) below:
n=pxq (2)
3. Calculate φ(n) with the equation (3):
φ(n) = (𝑝 − 1)(𝑞 − 1) (3)
4. Choose a public key that is relatively prime with φ(n).

5. Calculate d with the equation (4):


d=1+(k × φ(n))/e, 0 <k<∞ and 1 + (k x φ(n)) mod e=0 (4)
We will obtain public key pairs (e, n) and private key pairs (d, n). After the private and public
keys have determined, this process can be carried out. The steps including:
1. Convert the input string (message) to hash values with the SHA-1 algorithm.
2. Convert the results of hash messages to ASCII numbers
3. The encryption process in equations (5):
C=He m (5)

PRESENCE SYSTEM BASED ON QR CODE AND DIGITAL SIGNATURE RSA USING TEMPL
ATE MATCHING IN ANDROID,
First Author*1, Second Author2, Third Author3
106 ISSN: 2503-2259; E-ISSN: 2503-2267

Figure 3. QR Code Reading Diagram

2.3 YCbCr Color Space


YCbCr color space is a color space used in digital video, image processing, etc. The Y
component is luminance, and the Cb and Cr components are the components that store color
information [12]. Cb stores information in the form of differences between the components of blue
and reference colors while Cr stores information in the form of differences between the components
of red and reference colors. The calculation for changing the color of RGB to YCbCr shown in
Equation (6) [13]:
Y = 16 + (65.481R + 128.553G + 24.966B) (6)
Cb = 128 + (−37.797R − 74.203G + 112B)
Cr = 128 + (112R − 93.786 − 18.214B)
R = Red Value /255
G = Green Value /255
B = Blue Value /255
Converting RGB to YCbCr can be used to detect human skin color in digital photos[9], [12],
[14], [15], [16]. For Threshold to be able to detect human skin color is expressed in the limits of Y
> 80, 85 < Cb <135, 135 <Cr <180. But in its development that has more similarities in skin color
is 80 < Cb <120 and 133 <Cr <173 [9].

2.4 Template Matching

Template Matching is a technique in digital image processing to find small parts of an image
that matches an image template. Indeed, for our eyesight, it is very easy to identify objects in an
image, especially faces, but for computers, it will be a very difficult job, the Matching Template
method can be used to answer the problem [17], [14], [18], [19], and [20].
In this case, it is proposed to match the image (photo) with the face template provided. To find
out the percentage similarity of the template with the face image file, NC (Normalized Cross-
Correlation) calculation is used. NC values obtained by comparing templates with face files. The
more the percentage of NC values close to 100%, the comparison of templates with face image
files will be more suitable. NC value determined by Equation (7):
∑𝑖 ∑𝑗 𝑤𝑖𝑗 𝑤′ 𝑖𝑗
𝑁𝐶 = (7)
√∑𝑖 ∑𝑗[𝑤𝑖𝑗 ]2

KINETIK Vol. 1, No. 1, May 2016: 101 – 141


KINETIK ISSN: xxxx-xxxx 107

3. Results and Discussion

The results of the implementation of the interface design shown in Figures 4, 5, 6, and 7.

Figure 4. Class Selection Page

3.1 Functional Testing

The author took 15 samples taken with the criteria of an Android smartphone, and based on
Table I can be seen 15 samples successfully performed the registration function with a 100%
success rate. For face identification function, 14 samples successfully performed the function, and
one sample failed with a success rate of 93.3%. And the last for the presence function there are
14 samples successfully performing the function, and one sample failed with a success rate of
93.3%. The results graph shown in Figure 8.
For black-box testing, based on nine predetermined requirements. In Table 2, all functional
tests get the expected results that are successful.

Figure 5. Presence Page

Figure 6. Face Taking Display.

PRESENCE SYSTEM BASED ON QR CODE AND DIGITAL SIGNATURE RSA USING TEMPL
ATE MATCHING IN ANDROID,
First Author*1, Second Author2, Third Author3
108 ISSN: 2503-2259; E-ISSN: 2503-2267

Figure 7. QR Code Reading Display

Figure 8. Functional Testing Charts

Table 1. Functional Testing Table

Functional Testing Table


No Face
Nim UID Registration Presence
Identification
1 1441180054 7802e144 Success Success Success
425de8d8
2 1541180003 6fa5f436 Success Success Success
971cbf98
3 1541180192 883877f4 Success Success Success
4b172584
4 1541180025 92da78ec Success Success Success
dbec6e58
5 1541180046 b29350be Success Success Success
67f7013d
6 1541180061 73b6da59 Success Success Success
ca2f8771
7 1541180097 946acc6b Success Success Success
f2aee6dd
8 1541180109 49ed7f2e Success Success Success
ae3ee079
9 1541180160 c9da16a8 Success Success Success
e9d98757
10 1541180162 7a3b7e78 Success Success Success
2869fff4
11 1541180174 df4e9c50 Success Success Success
0d258098
12 1541180230 a0a2cb2f Success Success Success
c73ac0df
13 1641720113 7ce81b2e Success Fail Fail
5f7160f1
14 1641720179 228290bf Success Success Success
e5b12527
15 1741723015 aeec86ca Success Success Success
bec42f44

Table 2. Black Box Testing Table

KINETIK Vol. 1, No. 1, May 2016: 101 – 141


KINETIK ISSN: xxxx-xxxx 109

Black Box Testing Table


No Functional Requirements Expected Results Results Status
Obtained
1 Lecturers can generate QR Success Success Valid
Codes based on class,
course and day with RSA
encryption
2 Lecturers can delete the Success Success Valid
list of students who are
absent according to the
system's requirements
3 Lecturers can stop the Success Success Valid
presence process
4 Students can register to Success Success Valid
the application with the
requirements of 1 mobile
phone one user
5 Students can take face Success Success Valid
pictures according to the
requirements before
attendance
6 Students can make a Success Success Valid
presence by reading the
QR Code
7 Admin can see the list of Success Success Valid
students who have
registered on the system
8 Admin can delete the list Success Success Valid
of students who have
registered
9 Admins can export the Success Success Valid
results of the presence in
excel form

Table 2. DS RSA Testing Table

Tabel Pengujian DS RSA


No rpKe Dekrips
nKey dKey Plaintext Enkripsi
y i
1 5376737 8969 503129 77 188542 77

2 10968521 3547 4236499 77 940263 77

3 2510647 7507 2148283 77 852962 77

4 20382493 439 17542255 77 13739553 77

5 11635303 1601 1343681 77 3851852 77

6 28850153 9161 13747541 77 26552372 77

7 11277611 6679 8954023 77 2585657 77

8 28962733 4643 6715439 77 14279524 77

9 8214347 7541 4129325 77 2414797 77

10 47252329 7109 37868889 77 27228749 77

3.2 Testing the DS RSA Encryption Algorithm

This test is proposed to find out whether the key generated by the system is valid for encryption
and decryption in a plain text. The testers use ten key samples generated by the system in the
range of 10 - 10000 for primes pairs randomly generated.
Based on Table III, from 10 test data, 100% can perform the encryption and decryption functions
with the same plain text. It can analyze that the key scrambling is valid for use in the system.
3.3 Testing the Template Matching Algorithm

PRESENCE SYSTEM BASED ON QR CODE AND DIGITAL SIGNATURE RSA USING TEMPL
ATE MATCHING IN ANDROID,
First Author*1, Second Author2, Third Author3
110 ISSN: 2503-2259; E-ISSN: 2503-2267

Template matching testing aims to test the accuracy of the algorithm for detecting faces in
humans. The author uses 30 samples with a ratio of 15 for photos of human faces and 15 for non-
human photos. A sample photo of a human face shown in Figure 9.
Template matching testing process by comparing 30 photo samples with the provided image
template. Sample templates shown in Figure 10. Image templates used for testing are 30, 40, 60,
70, 80 to find optimal accuracy, a testing process done without paying attention to the lighting
factors and the distance of the photo.

Figure 9. Facial Sample Face and not Face

Figure 10. Facial Templates

In Table IV, it is showing that of the six experiments, the fastest execution time was using thirty
templates, and the highest percentage of face detection accuracy was using eighty Template. In
Figure 10, the more templates used, the higher the accuracy that will obtain. But conversely, if
more templates used, the execution time on the system will be longer.
Table 4. Template Matching Testing
Sum of Template Execution Percentage
Time (%)
(Sec)

30 Template 2 70

40 Template 3 70

50 Template 3 83.33

60 Template 4 86.66

70 Template 4 90

KINETIK Vol. 1, No. 1, May 2016: 101 – 141


KINETIK ISSN: xxxx-xxxx 111

80 Template 4 93.33

Presentage 3.33 82.22

Figure 10. The Accuracy of Matching Template

PRESENCE SYSTEM BASED ON QR CODE AND DIGITAL SIGNATURE RSA USING TEMPL
ATE MATCHING IN ANDROID,
First Author*1, Second Author2, Third Author3
112 ISSN: 2503-2259; E-ISSN: 2503-2267

Figure 11. Testing Chart based on Time


4. Conclusion
From the results of the study, the authors managed to build an attendance system by
implementing the DS RSA method and template matching. The first steps are designing the system
requirements needed, then implementing it on the system according to the requirements
described. And the results successfully implemented the DS RSA algorithm in the construction of
QR Code and QR Code reading, and also successfully implemented the Template Matching
algorithm in a face detection system. DS RSA algorithm randomizes a QR Code by forming new
private and public keys in a unit of time, and the impact will change the results of the QR Code
without changing the content that you want to read on the QR Code. The highest accuracy obtained
from the template matching method in face detection based on the tests performed was 93.33%
with 4 seconds execution time, and the lowest accuracy obtained based on testing was 70% with
two seconds in execution time, the results obtained with the different number of template
parameters.
References

[1] Surbhi and V. Arora, “ROI Segmentation for Feature Extraction from Human Facial
Images,” Int. J. Res. Comput. Sci., vol. 2, no. 3, pp. 61–64, Sep. 2012.
[2] F. Khan, “Facial Expression Recognition using Facial Landmark Detection and Feature
Extraction via Neural Networks,” Dec. 2018.
[3] R. Liu, Y. Lu, C. Gong, and Y. Liu, “Infrared point target detection with improved
template matching,” Infrared Phys. Technol., vol. 55, no. 4, pp. 380–387, 2012.
[4] F. F. Rochman, I. K. Raharjana, and T. Taufik, “Implementation of QR Code and Digital
Signature to Determine the Validity of KRS and KHS Documents,” Sci. J. Informatics,
vol. 4, no. 1, pp. 8–19, 2017.
[5] N. Ani, R. Deby, M. P. Nugraha, and R. Munir, “Pengembangan Aplikasi QR Code
Generator dan QR Code Reader dari Data Berbentuk Image,” Konf. Nas. Inform. – KNIF
2011, pp. 148–155, 2011.
[6] A. S. Kittur and A. R. Pais, “Batch verification of Digital Signatures: Approaches and
challenges,” J. Inf. Secur. Appl., vol. 37, pp. 15–27, 2017.
[7] R. Dudheria, “Evaluating features and effectiveness of secure QR code scanners,” Proc.
- 2017 Int. Conf. Cyber-Enabled Distrib. Comput. Knowl. Discov. CyberC 2017, vol.

KINETIK Vol. 1, No. 1, May 2016: 101 – 141


KINETIK ISSN: xxxx-xxxx 113

2018-Janua, no. 3, pp. 40–49, 2018.


[8] D. Lorenzi, J. Vaidya, S. Chun, B. Shafiq, and V. Atluri, “Enhancing the government
service experience through QR codes on mobile platforms,” Gov. Inf. Q., vol. 31, no. 1,
pp. 6–16, 2014.
[9] J. A. M. Basilio, G. A. Torres, G. S. Pérez, L. K. T. Medina, and H. M. P. Meana, “Explicit
image detection using YCbCr space color model as skin detection,” Appl. Math. Comput.
Eng. - Am. Conf. Appl. Math. Am. 5th WSEAS Int. Conf. Comput. Eng. Appl. CEA’11, no.
December, pp. 123–128, 2011.
[10] R. Wijanarko and N. Eko, “DETEKSI WAJAH BERBASIS SEGMENTASI WARNA KULIT
MENGGUNAKAN RUANG WARNA YCbCr & TEMPLATE MATCHING,” Cendekia
Eksata, vol. 2, no. 1, pp. 1–6, 2017.
[11] F. Bao, C. C. Lee, and M. S. Hwang, “Cryptanalysis and improvement on batch verifying
multiple RSA digital signatures,” Appl. Math. Comput., vol. 172, no. 2 SPEC. ISS., pp.
1195–1200, 2006.
[12] Z. Arifin, K. kunci, A. Rsa, K. Privat, and K. Publik, “Studi Kasus Penggunaan Algoritma
RSA Sebagai Algoritma Kriptografi yang Aman,” J. Inform. Mulawarman Progr. Stud.
Ilmu Komput. Univ. Mulawarman, vol. 4, no. 3, pp. 7–14, 2009.
[13] Z. Li, S. Gao, and K. Nai, “Robust object tracking based on adaptive templates matching
via the fusion of multiple features,” J. Vis. Commun. Image Represent., vol. 44, pp. 1–20,
2017.
[14] H. Çinar Akakin, A. Ali Salah, L. Akarun, and B. Sankur, “2D/3D facial feature
extraction,” in Image Processing: Algorithms and Systems, Neural Networks, and
Machine Learning, 2006, vol. 6064, p. 60641D.
[15] V. Kazemi and J. Sullivan, “One millisecond face alignment with an ensemble of
regression trees,” in Proceedings of the IEEE Computer Society Conference on
Computer Vision and Pattern Recognition, 2014, pp. 1867–1874.
[16] M. B. Pranoto, K. N. Ramadhani, and A. Arifianto, “Face Detection System
Menggunakan Metode Histogram of Oriented Gradients (HOG) dan Support Vector
Machine (SVM) Face Dtection System using Histogram of Oriented Gradients (HOG)
Method amd Support Vector Machine(SVM).”
[17] B. Leksono, A. Hidayatno, R. R. Isnanto, J. Teknik, E. Fakultas, and T. Universitas,
“Aplikasi Metode Template Matching,” pp. 1–7.
[18] A. K. Trivedi, D. M. Thounaojam, and S. Pal, “A robust and non-invertible fingerprint
template for fingerprint matching system,” Forensic Sci. Int., vol. 288, pp. 256–265,
2018.
[19] K. Thakar, D. Kapadia, F. Natali, and J. Sarvaiya, “Implementation and analysis of
template matching for image registration on DevKit-8500D,” Optik (Stuttg)., vol. 130, pp.
935–944, 2017.
[20] Z. Jin, Z. Lou, J. Yang, and Q. Sun, “Face detection using template matching and skin-
color information,” Neurocomputing, vol. 70, no. 4–6, pp. 794–800, 2007.

PRESENCE SYSTEM BASED ON QR CODE AND DIGITAL SIGNATURE RSA USING TEMPL
ATE MATCHING IN ANDROID,
First Author*1, Second Author2, Third Author3