www.ijecs.in International Journal Of Engineering And Computer Science ISSN:2319-7242

advertisement
www.ijecs.in
International Journal Of Engineering And Computer Science ISSN:2319-7242
Volume 4 Issue 2 February 2015, Page No. 10286-10290
Big-O Test of RSA Algorithm Complexity in Civil DataBase ( SIN / eID )
Jutono Gondohanindijo1, Eko Sediyono2
1
AKI University, School of Technology and Business,
Imam Bonjol Road, Semarang50139, Indonesia
yohanganda60@gmail.com
2
UKSW University, Department of IT,
Diponegoro Street, Salatiga50711, Indonesia
ekosed1@yahoo.com
Abstract:Analysis of Algorithms is the area of computer science that provides tools to analyze the efficiency of different methods of
solutions. The time efficiency of the algorithms can be characterized by growth rate functions ( Big-O ).
Big-O represents how fast does an algorithm grow with respect to N number of steps. The algorithm that will be discussed are taken from
computer programs that implemented the RSA Encryption in a Single Identification Number (SIN) or the e-ID CARDS in Indonesia which
is a unique identification number that is integrated with the combined data from a variety of government agencies and private sector. RSA
Encryption program used to maintain the security and confidentiality of messages, data, or information in a computer network, so that can
not be read or understood by just anyone. In this paper, the authors analyze the proper cryptographic system application applied to the
integrated data base in SIN (e-ID). Scoring algorithm is based on: execution time (from the most dominant functions), memory
usage/resources, the simplicity and clarity of the algorithm. The steps of analysis algorithms developed by specifying a type/nature of the
input data, measuring the execution time (Running Time) of each function, analyze mathematically with the data test Big-O with graphs and
tables of Polynomial to determine its average case.
Keywords:Algorithm, Encryption, Big-O, Complexity, Running-Time.
1. Introduction
Many encryption algorithms used for data security. Those
Algorithms was already well established and become standard,
examples are: Data Encryption Standard (DES), Advanced
Encryption Standard (AES), Rivert-Shamir-Adelman (RSA),
Elliptic curve cryptography (ECC), the Message-Digest
algorithm 5 (MD5) [3]. Analysis of Algorithms needed to
measure the program's performance through the validation
program and test execution time (Running Time). An efficient
algorithm is the algorithm that keeps the needs of time and
space.
The needs of the time and space of an algorithm depends on
the size of the input (input), stating the amount of data that is
processed along with the process.
Programmers often experience obstacles to develop model
tools for testing the efficiency of a program that is already
made. Programmers are also required to optimize the program
of this aspect of the program structure and the data structures
that are used so that the acquired program that efficiently.
This study will analyze the encryption program RSA algorithm
against the execution time (running time) function and its
complexity test to know its performance. The data used to test
efficiency encryption algorithms is the encryption Key that is
used in the Civil ID Numbers as SIN (Single Identification
Number) or e-ID.
The type of a file which will be encrypted is text typed. The
importance of protecting the SIN was the SIN associated with
data on civil, employment, taxation, immigration, banking and
law enforcement efforts as well as facilitate cooperation among
government agencies in the execution of his duty.
2. Algorithm analysis
An algorithm is a procedure is limited to solve a problem with
finite steps in a limited time. The term algorithm is first written
by arab mathematician al-Khowarizmi 19th century, in his
book al-jabr w'al muquabala Bible. Some general properties of
the algorithm are: Input, Output, Finiteness, Definiteness,
Effectiveness.
2.1 The Growth Function
Given a computer program with n an integer. The most
important consideration with regard to the usefulness of the
program is how long a computer resolves the problem. To
analyse the usefulness of the program, it takes understanding
how to speed growth by value function of n that is growing.
The notation is often used to analyze the functions of growth
called the Big-O notation. This quantity is used to indicate the
running time of a program.
Given functions f and g of the set number of integers or the
set number of real numbers in a subset of the real numbers.
Said to be f(x) is O(g(x)) if there exists a constant C and k such
that [6]:
Read
is “Big-O” in
To show the f (x) is O(g(x)), only needed to find one pair of
constants C and k such that | f (x) | ≤ C | g(x) | If x > k. Partner
C, k which satisfy the definition is never single. Furthermore,
if one partner is there, then there is unlimited other couples.
The simple way to look at it is, if C, k is a pair, the other pair
of C', k ' where C < C' and k < k' also satisfies the definition, if
Jutono Gondohanindijo1, IJECS Volume 4 Issue 2 February, 2015 Page No.10286-10290
Page 10286
Big-O notation is used in mathematics, especially in
computer sciences to the analysis of algorithms.
Given
Where
is the real numbers. Then f(x) is
O(xn)
Proof :
By using the triangle inequality, if x 1, acquired :
v. 5.0.4.5, phpMyAdmin Database Manager v. 2.10 .2,
Google Chrome NuSphere PHP Editor 2.1, v. 7, Javascript
lib. V. 4.2, Visustin v 7.03.
3.3 The Research Step
The RSA encryption algorithm is implemented on the server
computer to process encryption of query civil data and
algorithm RSA decryptionis implemented on the client
computer to process decryption of query civil data. Data
analysis on the RSA Algorithm uses the polynomial regression
analysis.
4. Results and Discussion
Seen that | f (x) | ≤ C xn
where
Therefore,
If found several different algorithms for solving the same,
then one must be selected in accordance with his request. The
most important tool for the purpose is the analysis of
algorithms.
2.2 The Complexity of Algorithms
One of the tools used to determine the efficiency of an
algorithm is the time used by a computer to solve a problem by
using the algorithm, when an input value has been specified
size [2].Considerations of time and space complexity of an
algorithm is important when an algorithm will be
implemented.The terminology used for the complexity of the
algorithm is O(1) : Constant Complexity, O(log n) : Logarithm
Complexity, O(n) = the linear complexity, O(n log n)
Complexity of n log n, O(nb) = complexity of Polynomial [6].
3.
Research methods
3.1 The Object of Research
The object examined was the Demography Database with its
field are the IDN ( ID number), NAME (name of the
population or person), DISTRICT (inhabitants of the village
Code), ADDR (Address), BDATE ( Birth Date) using the
format text each of 20 bytes, 30 bytes, 15 bytes, 50 bytes and
10 bytes, the total is 125 bytes with length of 1024 bit
encryption key. This data will then be in encryption and
decryption in the form of byte/character/text or bit. The
encryption method used is the RSA.
3.2 Research Tool
A research tool used in this research is as follows:
1.Hardware in the form of a computer with specs Intel Pentium
(R) CPU Core i3-3120M @ 2.50 GHz, 2 MB of RAM.
2.The software is Microsoft Windows 7, Apache Web Server
V. 2.2.4, PHP Script Language V.5.2.3, My SQL Data Base
Analysis Algorithms was done by measuring the complexity of
RSA program through the Big-O Test with a series of test input
data character (byte) with range/range from 1 up to 233
characters (bytes). This value is taken from the range of total
data/field from which data will be encrypted ( IDN, NAME,
DISTRICT, ADDRESS, BDATE ).
Test results can be seen in Table 1, this table describes test
results of encrypt and decrypt time needed for a series of data
input in the form of characters.
Table 1 : Encrypt and Decriypt with time variations of the
character length
1
1
k
256
Time
Encrypt
(Se cond)
0.02748013
2
9
ltk8RQkiS
256
0.02782989
0.53003788
3
17
G2gLF3Vhy955ujDFl
256
0.02929997
0.527915001
4
25
ZIWK8EgwAYZpkbXN0fkhY9HQB
256
0.02659106 0.525926113
5
33
Dv5qwq2gPojze7qCFO6mbrhQAf43Q92gH
256
0.02729201 0.538053989
6
41
HFkCuQSbEVCvYTAhV04bUUmlxAWeVugKiYKRzbpJ8
256
0.02564812 0.523198843
7
49
PEhwbZl04VegYhebGUKYXOa4BGsqs6Fox7RiK9cXK9bwBUJsY
256
0.02654099 0.531112194
8
57
8r2UM4k9NzLTgJM2b6vPIoK28jIVStFAfeEEWCLqSQc3XFsvupdpsl7Ui
256
0.02545309 0.526175022
9
65
ljGcdOYro5jDxdl7C9A5RStyyfGCzR500NHFevQOqZFUj9blXkT2gZ0iZ5L4lQ
256
0.02699685 0.520372868
10
73
xnSGfHmHXlg9FkAyfg1ZqEff6WhSIVOoYJspLxTC9bn1jHehuW0Q6xebok3E
256
0.02526808 0.535166979
11
81
TQMxKNPKJa0HA3AoDGZXzDGWaxl4QXdwYiVmg2GwCHoyZOaMvSVM
256
0.025038 0.521542072
12
89
sz6hhz76fDnsqbB9eZVr09bsc8jWZpfvFkP7KOREyAFUSg2HzMuTnVHZ612
256
0.02436113 0.530475855
13
97
R2HisoisObjNiJAphHtxGPXcmLUGZLlg49FrdspMRJByb3sYbiCzvflvhnQT4vH
256
0.02425504 0.520390034
14
105
lYoQJDk5e8C6iwP9wTvLR7HsJCV1QF1uFQCMGvejtuCBZb7rGc7IV33dwX
256
0.02368379 0.532225847
15
113
ZmXoyaGRgGSALht9Yn7M8mJs5uYRrblZdbJeOdrg7isxkJ0yWnQTW38VIEk
256
0.02314496 0.529389858
16
121
dgUXzUD0AYkk8GVweamFZNY87fdL7thGaFGAR7FiPZ9zYM14pqfjoNQZB
512
0.05306196 1.053316832
17
129
1WeNkUrmf9qY86ZGXghBSfF4MMVIbaGKGFM7Ct8uJpcbr1ThcysLJceiiRl1
512
0.05040479 1.053947926
18
137
ckTrs0C0W6bFtD8GPHmkJQaU0D489IqIROgNltERF3zOYKBrObjJbRhiGuM
512
0.0522089 1.068647146
19
145
EX93yj2zVyIXxJy0J9AJdhBqlWsFM5dpR8kAnYK6nB75teHgWxZbE0fM2tHc
512
0.05245304 1.076715231
20
153
4dwoem9T6i3zPRNlFiBfiJERdtZ27WiMquxt4ns3e1F2VhQC5QJhRZNlnFW2w
512
0.04931402
1.06183815
21
161
KUiFKLJE1afSBPQvHyFFtfacUH1XluMZNLt6HuX0mIBusWSRWc1HPkU9
512
0.04913497 1.069363117
22
169
clWE3RhoeXfyT8076CyVDTfL1PHmIS4mRzxzvH684QiECSVLjnKXwm1yeg
512
0.04880595 1.068812847
23
177
PGcFKzwBpcnzz3yoF79OitTOma0soW1ewzUEpl2QMNJSX0BDbqjlcHHt5oE
512
0.05106306 1.059587002
24
185
McgsBsnGYgv2hRMgbqTS9LtOaaU6FwYoggGeQD0Yr1FtIat90NH7PtxENT
512
0.05070806 1.063682079
25
193
Lf0QNjyhAFHA02slC4FLq7GdOJTAYkCaB6krk4NCNHAdEF9tOijvUUsBqt0
512
0.05026913 1.078094959
26
201
6to2dcrVlEpm1kIXaDEPrjJ6uTWducTZGsLqjPQMEFdfeJmQMYM2J6Japi9aW
512
0.05051994 1.062964916
27
209
B6fsuoGng7ph0TnOErM5Lgj8ZLAmLCVjYGYHzQ1iuCYWZPvVUi0Fote2qm
512
0.05043793 1.087435961
28
217
AqNeynyWkReSVQa8c0Cs8PmdEjVYpAZYkdraK3dczBg2xxCeNCTKdXNY
512
0.05605412 1.061059952
29
225
yE67wSnwDHej8CaiLTSnpHqmUXBjRuea4z59K1Hs47fF3Pc6FImGpX74wvg
512
0.04711294 1.050594091
30
233
YCe1WDkT9lAwBE7u3w0CFm2YPdKUTxzCDcSXyrhsnLcZOZPLXhC6cPf
512
0.04729795 1.063901901
Trial # Byte Characte r
Byte
Encrypt
Time
De crypt
(Se cond)
0.526859999
Of the two variables or values of x (long/lots of data) and y
(time) then the correlation regression graph created its
polynomial graph to see the value of the correlation (R 2), see
Figure 1 graph of polynomial regression correlation.
Jutono Gondohanindijo1, IJECS Volume 4 Issue 2 February, 2015 Page No.10286-10290
Page 10287
www.ijecs.in
International Journal Of Engineering And Computer Science ISSN:2319-7242
Volume 4 Issue 2 February 2015, Page No. 10286-10290
Figure 1 : Polynomial regression correlation chart
It appears from the results of a correlation of R 2, for the
encryption is 0.8469 and decryption is f 0,9082. Both of these
values are approaching the number 1 indicating the presence of
a strong correlation relationship between x and y [1].
The next test of size (the size of many of its data) will
proceed with its the test data R2 to determine the order of f(n)
or the Big-O or O(n) by performing a series of advanced data
test by substituting value of X with the reach of a number of
data into the encryption process from few field. For example of
sample data taken length data field will be encrypted-decrypted
is 225 byte. ( longer than whole field will be encrypteddecrypted, that is 125 byte ), see Table 2 (test the degree of X
for The Big-O encryption) and Table 3 (test the degree of X for
The Big-O Decryption).
Table 2 : Test the degree of X for the Big-O Encryption
y = -1E-14 X6 + 1E-11 X5 - 4E-09 X4 + 6E-07 X3 - 4E-05 X2 + 0.0008 X + 0.0245
X
R2 = 0.8469
Derajat X
1
33
65
97
129
161
193
225
6
Koef. X
-1E-14
0.0000
0.0000
-0.0008
-0.0083
-0.0461
-0.1742
-0.5168
-1.2975
5
1E-11
0.0000
0.0004
0.0116
0.0859
0.3572
1.0818
2.6779
5.7665
4
-4.E-09
0.0000
-0.0047
-0.0714
-0.3541
-1.1077
-2.6876
-5.5500
-10.2516
3
6.E-07
0.0000
0.0216
0.1648
0.5476
1.2880
2.5040
4.3134
6.8344
2
4.E-05
0.0000
0.0436
0.1690
0.3764
0.6656
1.0368
1.4900
2.0250
1
0.0008
0.0008
0.0264
0.0520
0.0776
0.1032
0.1288
0.1544
0.1800
0
0.0245
0.4743
0.4743
0.4743
0.4743
0.4743
0.4743
0.4743
0.4743
Table 3 : Test the degree of X for the Big-O Decryption
Jutono Gondohanindijo1, IJECS Volume 4 Issue 2 February, 2015 Page No.10286-10290
Page 10288
y = -1E-15 X6 + 6E-11 X5 - 4E-08 X4 + 7E-06 X3 - 0.0005 X2 + 0.0127 X + 0.4743
X
R2 = 0.9082
Derajat X
1
33
65
97
129
161
193
225
6
Koef. X
-1.E-15
0.0000
0.0000
-0.0001
-0.0008
-0.0046
-0.0174
-0.0517
-0.1297
5
6.E-11
0.0000
0.0023
0.0696
0.5152
2.1434
6.4905
16.0671
34.5990
4
-4.E-08
0.0000
-0.0474
-0.7140
-3.5412
-11.0769
-26.8759
-55.4995
-102.5156
3
7.E-06
0.0000
0.2516
1.9224
6.3887
15.0268
29.2130
50.3234
79.7344
2
-0.0005
-0.0005
-0.5445
-2.1125
-4.7045
-8.3205
-12.9605
-18.6245
-25.3125
1
0.0127
0.0127
0.4191
0.8255
1.2319
1.6383
2.0447
2.4511
2.8575
0
0.4743
0.4743
0.4743
0.4743
0.4743
0.4743
0.4743
0.4743
0.4743
It appears from the results of the calculations, the value of X
will always appear with the highest value in the range degreess
of X = 3, at both the X degree test for Big-O Encryption and
Decryption. Based on Equation 3, we set a parameter X as the
largest significant value as its complexity degree [7]. Big-O
notation in test Complexity degree of X (the X value
substitution) is O(n3) namely with Cubic Growth Function (
based on Polynomial graph previously ).
From Big-O notation, the complexity of a low degree of
drafted up high, ranging from the complexity of Big-O degree
= 1 (constant) or the big O(1) up to the Big-O(2n). The
complexity of the algorithm is moving from Big-O degrees
constant (1) until the exponential (2n). So with the lowest
degree of complexity requires a bit of processing time
compared to a lot of its data, whereas the exponential
cmplexity is level or the highest degrees, which means that
increasingly complex program algorithm with a comparison of
that with relatively little data requires a lot of processing time.
The next activity was measuring the running time of the
RSA. This RSA programs perform some function inside. The
result of the measurements appear in table 4 (Running Time
RSA functions).
Table 4 : Running Time RSA Functions
Nomor
Fungsi
Running Time (detik)
1
_generateMinMax
0.000006199
2
createKey
1.655412912
3
_convertPrivateKey
0.002645969
4
_encodeLength
0.000000954
5
_convertPublicKey
0.000717878
6
_parseKey
0.000014067
7
loadKey
0.000710011
8
_random
0.001905203
9
_exponentiate
0.000002861
10
_i2osp
0.000686884
11
_rsaes_pkcs1_v1_5_encrypt
0.008409023
12
encrypt
0.008425951
13
_rsaes_pkcs1_v1_5_decrypt
0.077547073
14
decrypt
0.077579021
By knowing the long process all functions are carried out we
can scrutinise the dominant function with the longest to
process as a way of taking action validation programs by
coding or reformulating the program back so obtained the best
algorithm solutions.
No special programming techniques to improve the
coding/program, we could do the approach of the program
structure or its data structure. Reformulation is carried out by a
series of trial error to get the best algorithm solutions.
After that the program could be tested based on analysis of
algorithms return Performance by measuring the execution
time (the Big-O) to measure their complexes and identification
of largest running time of function to be able to reformulate
program. This process is repeated until the value obtained a
better program performance, both in terms of its complexity
and efficiency (with respect to time and memory use).
5. CONCLUSION
With the analysis of Algorithm through the the Big-O test, we
can measure the performance of a program which is Complex
or not. Complex here is not relate directly to the efficiency of a
program. The complexity is deal with the magnitude of data
entered or processed. The greater the more it takes a long
process.
By looking at the complexity of the programs we make, we
can assess the performance of a program. Later, by measuring
the Running Time of each function, we are giving greater
attention to finding the best solution from a program we
created to make it more efficient in the use of time and
memory through the formulation of the programme structure
and the structure of the data.
References
[1] Agus Setiawan, Pengantar Metode Numerik, Andi Offset,
Yogyakarta, 2006.
[2] Cormen, T. H., Leiserson, C. E., & Stein, R. L.,
Introduction to Algorithms, Second Edition. NewYork:
MIT Press, 2001.
[3] Luc, Bouganim, Yanli, Guo, Database Encryption,
France, 2009.
[4] Lusmiarwan, Driana, Perancangan Prototype Single
Identity Number(SIN) Untuk Menunjang E- Government,
Bandung, 2006.
[5] Munir, R., Kriptografi, Informatika, Bandung, 2006.
[6] P. Danziger, “Big-O Notation”,
Available:http://web.mit.edu/big_o.pdf, Accessed:
August 16, 2014.
Jutono Gondohanindijo1, IJECS Volume 4 Issue 2 February, 2015 Page No.10286-10290
Page 10289
[7] R. K. Sembiring, Analisis Regresi, ITB, Bandung, 2005.
[8] Suharno, Menuju Terciptanya Single Identification
Number di Indonesia, Jakarta, 2005.
Author Profile
Jutono Gondohanindijo received the B.Comp. degrees from Budi
Luhur University and M.Comp. degrees in Technology of Information
from Ben-Arif Indonesia Institute of Technology in 1997 and 2001,
respectively. During 1997-2014, he is now working in AKI University
School of Technology and Business as lecturer.
Jutono Gondohanindijo1, IJECS Volume 4 Issue 2 February, 2015 Page No.10286-10290
Page 10290
Download