Implementation Security Digital Signature Using Rivest Shamir Adleman RSA Algorithm As A Letter Validation and Distribution Validation System
Implementation Security Digital Signature Using Rivest Shamir Adleman RSA Algorithm As A Letter Validation and Distribution Validation System
Abstract—A digital signature is a type of asymmetric is at the same time not at the workplace, he can still know
cryptography that is used to ensure that the recipient that there is a letter submission that must be legalized and
receives the actual received message from the intended can immediately sign the letter [1]. The process of
sender. Problems that often arise conventionally when ratification of a letter must also be carried out legally by
requiring letter approval from the authorized official, and the authorities because the legality of a digital document
the letter concerned is very important and urgent, often the also requires evidence that can be used as a basis that the
process of giving the signature is hampered because the letter was sent and recognized by the party who made it
official concerned is not in place. With these obstacles, the [2].
letter that should be distributed immediately becomes
hampered and takes a long time in terms of signing the Today, traditional physical signatures are out of date.
letter. The purpose of this study is to overcome Communication between company partners is an important
eavesdropping and data exchange in sending data using issue that must be safe. Digital signatures provide a
Digital Signature as authentication of data authenticity and suitable background for sending secure messages using
minimizing fake signatures on letters that are not made and different schemes. Depending on different uses, we must
authorized by relevant officials based on digital signatures choose the correct and appropriate option to sign our
stored in the database. This research implements the Rivest message such as a proxy scheme [3], the digital signature
Shamir Adleman method. (RSA) as outlined in an
itself is a technique in cryptography that can be used to
application to provide authorization or online signature with
sign digital documents. Digital signatures are also the
Digital Signature. The results of the study The application of
the Rivest Shamir Adleman (RSA) algorithm can run on
result of the application of cryptographic techniques to the
applications with the Digital Signature method based on ISO contents of the original document [4][5]. Cryptography
9126 testing by expert examiners, and the questionnaire aims so that information that is confidential and sent over a
distributed to users and application operators obtained good network, such as a LAN or the internet, cannot be known
results from an average value of 79.81 based on the scale and utilized by other people or unauthorized parties [6].
table ISO 9126 conversion, the next recommendation for Digital signatures can be likened to ordinary signatures,
encryption does not use MD5 but uses Bcrypt secure only to implement them is more difficult. The advantage of
database to make it stronger. digital signatures compared to simple signatures is that
they are difficult to replicate [7], [8]. The scheme of digital
Keywords— Cryptography, Digital Signature, ISO 9126, signatures consists of 3 processes: 1. Key generation
Rivest Shamir Adleman (RSA) process. This process randomly selects a private key from
a collection of possible private keys. The result of this
I. INTRODUCTION process is the corresponding private key and public key. 2.
The importance of assignments / other letters requiring The process of giving a signature. This process receives
signature approval by officials is prioritized by the contents of the message and the public key, resulting in
administrative staff, but often the process of giving a signature. 3. The signature verification process. This
signatures is constrained because the official is not in the process verifies messages that have been signed. This
workplace due to an obstacle. Also besides, the approval verification process requires a private key [9].
process must be carried out by approaching the official
concerned because the processing of outgoing letters still The RSA algorithm is an asymmetric algorithm, an
uses the old method in its implementation, that is, the algorithm that has two different keys for the encryption
validation process still uses manual signatures. With this and decryption process, namely the public key and private
obstacle, the letter which should be immediately key [10][7]. The main process in digital signatures consists
distributed becomes obstructed and requires a long time in of two processes, namely the signing process (signature)
the case of the signing of the letter. Therefore, we need a and verification. The signing process is done by changing
method that can provide convenience in making letters, a document's contents into a message digest and
especially in the process of filing letters and giving long- encrypting it using the RSA cryptographic algorithm.
distance signatures, so that although the official concerned Meanwhile, the verification process is done by comparing
into a signature then inserting it into a digital land Application of Digital Signature
into the E-Signature System
Digital Signature Testing
System
certificate document [17].
Operation And Maintenance
600
Authorized licensed use limited to: Universitas Indonesia. Downloaded on August 03,2023 at 03:49:10 UTC from IEEE Xplore. Restrictions apply.
then converted into a computerized system and easier by A. Key Generating Process
using E-Signature and digital signatures. 3. Observation of 1) Determine 2 prime numbers, namely p = 11 and q
the Digital Signature System (Digital Signature) is done to
= 17.
look for theories and ways of working related to the
Digital Signature that can be applied to the E-Signature 2) Calculating the value of n, the formula is
system. 4. E-Signature System Design is the stage where n = p.q
researchers design an E-Signature system that will be n = 11 x 17
applied to the Digital Signature method in it. 5. Digital
Signature System Design is based on the results of = 187
observations of researchers where in this stage design how 3) Calculating the value of m, the formula is
the signature is done automatically with the Digital m = (p-1) (q-1).
Signature method, as well as the determination of the
algorithm that will be applied to the Digital Signature m = (11-1) (17-1)
module. 6. Implementation of the E-Signature system is
= 10 x 16
the stage where the researcher implements the design of
the system in the previous stage, after which testing is = 160
carried out to determine whether each unit of the system
has been running according to the desired flow or not. 7. i. Determine the value of e, with the condition that 1
Implementation of the Digital Signature module is the <e <m and GCD (e, m) = 1.
stage where the algorithm chosen in the Digital Signature For example, the value of e taken is 7.
encryption process is implemented in the form of modules The proof is as follows:
(program units) after which testing is performed to
determine whether the algorithm is running well or not. 8. GCD (e, m) = 1
The application of the Digital Signature module into the E- GCD (7,160) = 1
Signature system is done to perfect the system so that the
E-Signature system is ready to be tested at a later stage. 9. 160 mod 7 = 6
Testing the Digital Signature module on the E-Signature
7 mod 6 = 1
system, at this stage, the module that has been built is then
tested. A trial was conducted to ensure the implementation From the results above, it means that GCD (7,160)
of the Digital Signature method could work well in the E- = 1, then the number 7 can be used to fill in the
Signature system. 10. Documentation and test analysis value e.
results, after the testing phase, is completed then
conclusions will be drawn in the form of analysis results of ii. Calculating the value of d, with the condition that 1
the tests that have been carried out then all research <d <m and (d.e) mod m = 1.
activities and research results are documented in written For example, the value of d is 23. The proof is as
form and technical documents [20]. follows:
Start
(23.7) mod 160 = 1
change a
161 mod 160 = 1
character plain cipher text
T enter
encryption? random e
text to ASCII
characters From the results above, number 23 can be used to
fill in the value.
Y
enter 2
random e and m are
T break into blocks
break into blocks
iii. Then from the calculation results above, can be
numbers p, q relatively prime?
obtained:
Y public key = (e, n) public key = (e, n) = (7,187) (For Encryption)
T p and q prime calculate the
private key = (d, n)
private key = (d, n) = (23,187) (For Decryption)
numbers? private key d calculation formula
Y
per block
ci = miemod n Calculate Block B. Encryption and Decryption Processes in Study Case
public key = (d, n) Formula
n = p.q
m = (p-1) * (q-1)
private key = (e, n) mi = cid mod n
Fill in the message :H E L L O
cipher text
change the ASCII
character to plain ASCII Code : 72 69 76 76 79
plain text text
Enkripsi
Plaintext Dekripsi Plaintext
(ci = 𝑚i𝑒 mod 𝑛)
(𝑚𝑖 = Ci𝑑 𝑚𝑜𝑑 𝑛)
Fig 3. RSA Algorithm Flow Map H = 72 (7^7) mod 187 =182 (182^23) mod 187 = 7 72 = H
Based on Figure 3, to facilitate understanding, a case (2^7) mod 187 =128 (128^23) mod 187 = 2
study example is given: For example, A will send a E = 69 (6^7) mod 187 =184 (184^23) mod 187 = 6 69 = E
(9^7) mod 187 =70 (70^23) mod 187 = 9
message that says "HELLO" to B. Before sending, A
L = 76 (7^7) mod 187 =182 (182^23) mod 187 = 7 76 = L
encrypts the message. After the message is received, B (6^7) mod 187 =184 (184^23) mod 187 = 6
must decrypt the message before reading the message. L = 76 (7^7) mod 187 =182 (182^23) mod 187 = 7 76 = L
Then the steps are as follows: (6^7) mod 187 =184 (184^23) mod 187 = 6
O = 79 (7^7) mod 187 =182 (182^23) mod 187 = 7 79 = O
601
Authorized licensed use limited to: Universitas Indonesia. Downloaded on August 03,2023 at 03:49:10 UTC from IEEE Xplore. Restrictions apply.
Enkripsi
Plaintext Dekripsi Plaintext Start
(ci = 𝑚i𝑒 mod 𝑛)
(𝑚𝑖 = Ci𝑑 𝑚𝑜𝑑 𝑛)
(9^7) mod 187 =70 (70^23) mod 187 = 9 Digent message
Letter encryption
private key
user
From the above calculations, it can be seen that the
plaintext is "HELLO" which has the ASCII code MD5 hash function
signature
numbers p, q
hash results are the N
same?
message digest
e and m are md5 hash function hash (MD)
decryption invalid letter
Y
relatively prime?
letter hash
compare md valid letter End
N p and q prime
message digest
letters and
Y (MD)
descriptions
numbers?
calculate the Fig 6. Flow map of the Digital Signature Verification Process
Y private key d
2) Whitebox Testing RSA Algorithm
n = p.q
m = (p-1) * (q-1) TABLE II. RSA KEY GENERATING PROCESS
public key = (d, n)
private key = (e, n) Node Source Code
functi on gcd($e, $m) {
$y = $e; $x = $m;
while(bccomp($y, 0) != 0) {
enter
1 $w = $x % $y;
random e $x = $y;
Finish
} $y = $w;
} return $x;
function cari_e($m) {
Fig 4. Key Generation Flowmap $e = 3;
if(bccomp(gcd($e, $m), 1) != 0) {
2) The Process of Giving a Digital Signature $e = 5; $step = 2;
This process requires the contents of the message 2
while(bccomp(gcd($e, $m), 1) != 0) {
and the public key, to produce a signature. The
$e = $e + $step;
following is explained in the flow map in Figure 5 if($step ==
under the signature: 2) {
$step = 4;
} else {
$step = 2;
} }
}retu rn $e;
}
function ca $u1 = ri_d($e, $m) {
$u2 = $u3 = 1;
$v1 = $v2 = 0;
$v3 = $m;
3 0; 1;
602
Authorized licensed use limited to: Universitas Indonesia. Downloaded on August 03,2023 at 03:49:10 UTC from IEEE Xplore. Restrictions apply.
Node Source Code IV. RSA Encryption Testing
$e; while ($v3 != 0) { $qq =
floor($u3 / $v3); TABLE III. RSA ENCRYPTION TESTING
$t1 = $u1 - ($qq * $v1); $t2 =
$u2 - ($qq * $v2); Node Source Code
$t3 = $u3 - ($qq * $v3);
$u1 = $v1;$u2 = $v2; function enkripsi($plain,$ekey,$n){
$u3 = $v3;$v1 = $t1; $jmltext=strlen($plain);
$v2 = $t2;$v3 = $t3; 1 $nmbr=1;
$z = 1; $arr_padding=array();
$ciphertext="";
}
$uu = $u1; $vv = $u2; 2 for($lok=0;$lok<$jmltext;$lok++){
if ($vv < 0) { $potong=substr($plain,$lok,1);
$inverse = $vv + $m; $ascii=ord($potong);
} else { $pangkat=bcpow($ascii,$ekey);
} $inverse = $vv; $chip=bcmod($pangkat,$n);
} return $inverse; 3
$ciphertext=$ciphertext." ".$chip;
4 funct ion bangkitkan($n){ $arrp=array(); $nmbr++;
5 for($i=1;$i<=$n;$i++){ }
$counter = 0;
for($j=1;$j<=$i;$j++){ return $ciphertext;
4
if($i % $j==0){ }
$counter++;
6 }
} }
if($counter==2){ Based on table 3. flow graphs can be formed as shown
array_push($arrp,$i); below.
}
7 if($p==$q){
echo "<meta http-equiv = 'refresh' content =
8 '0; rsa_fix.php'>";
}
$en=$p*$q;
$m=($p-1)*($q-1);
$e = cari_e($m); Fig 8. Flowgraph RSA Encryption Process
9
$d = cari_d($e, $m);
} $kunci=array($e,$d,$en);
return $kunci; From the flow chart above, we can calculate
cyclomatic complexity, namely:
Based on table 2. flow graph can be formed as in the V (G) = E - N + 2
following image. V (G) = 4 - 4 + 2
V (G) = 2 Where:
E = number of edges on the flow graph
N = number of nodes on the flow graph
So, the results for the RSA encryption flowgraph
image above obtained 2 paths, namely:
Path 1 = 1 - 2 - 3 - 4
Path 2 = 1 - 2 - 3 - 2 - 3 – 4
Fig 7. RSA Key Generating Flowgraph
3) RSA Decryption Testing
From the flow chart above, we can calculate
cyclomatic complexity, namely: TABLE IV. RSA ALGORITHM DECRYPTION PROCESS
603
Authorized licensed use limited to: Universitas Indonesia. Downloaded on August 03,2023 at 03:49:10 UTC from IEEE Xplore. Restrictions apply.
Based on table 4. A flow graph can be formed as in figure TABLE VI. VALUE CONVERSION SCALE
9. Achievement of Interpretation
Value
90 ≤ x Very Good
80 - 90 Good
70 - 80 Enough
x ≥ 60 Very less
From the flow chart above, we can calculate
cyclomatic complexity, namely: x = Value of Test Results
Based on the results of the above-average values obtained
V (G) = E - N + 2 from the validation test conducted on 3 expert examiners,
V (G) = 4 - 4 + 2 it can be concluded that the application for the validation
V (G) = 2 Where: system for the validation and distribution of this letter has
E = number of edges on the flow graph met the ISO 9126 standard with an average of GOOD
N = number of nodes on the flow graph interpretation of the average value of 79.81, and by
So, the results for the RSA decryption flowgraph following per under the objectives of being able to
image above obtained 2 paths, namely: facilitate the administration of letters without neglecting
Path 1 = 1 - 2 - 3 - 4 the security aspects of the validation and distribution
Path 2 = 1 - 2 - 3 - 2 - 3 – 4 process, being able to minimize the circulation of fiction
letters, being able to simplify the process of signing letters
conducted online and being able to facilitate the
processing of letter archives
4) Expert Validation Model ISO 9126
Based on expert testing conducted by 3 examiners, the ACKNOWLEDGMENT
average test values are as follows:
This research was supported by the Indonusa Surakarta
TABLE V. VALIDATION RESULTS Polytechnic, which provided facilities, insight and funding
so that this research could be completed on target.
No Characteristics Sub-characteristics Quality Value
Quality REFERENCES
1 Functionality Suitability: The ability of the 82
software to provide a set of [1] M. Rouse, “What is RSA algorithm (Rivest-Shamir-
functions that are appropriate for Adleman)? - Definition from WhatIs.com,”
certain tasks and user objectives Techtarget.com. 2018.
Accuracy: The ability of the 83
software to provide precise and [2] D. E. Denning, “DigitalSigsRSA,” vol. 27, no. 4, pp.
correct results according to need 1–5, 1983.
Security: The ability of the 83 [3] M. Alidoost Nia, A. Sajedi, and A. Jamshidpey, “An
software to prevent unwanted
access, face intruders (hackers)
Introduction to Digital Signature Schemes,” pp. 1–5,
or authorize data modifications 2011.
Interoperability: The ability of 75 [4] P. Saha, “A comprehensive study on digital
software to interact with one or signature for internet security,” Accent. Trans. Inf.
more specific systems Secur., vol. 1, no. 1, pp. 1–6, 2016.
Compliance: The ability of the 78
software to meet standards and [5] W. W. Widiyanto, “Analisa Metodologi
needs according to applicable Pengembangan Sistem Dengan Perbandingan Model
regulations Perangkat Lunak Sistem Informasi Kepegawaian
2 Reliability Maturity: The ability of the 80 Menggunakan Waterfall Development Model,
software to avoid failure as a
result of errors in the software Model Prototype, dan Model Rapid Application
Fault tolerance: The ability of 80 Development (RAD),” Inf. Politek. Indonusa
the software to maintain its Surakarta, vol. 4, pp. 34–40, 2018.
performance if a software error
occurs
[6] Y. Anshori, A. Y. Erwin Dodu, and D. M. P.
Recoverability: The ability of the 80 Wedananta, “Implementasi Algoritma Kriptografi
software to rebuild the level of Rivest Shamir Adleman (RSA) pada Tanda Tangan
performance when a system Digital,” Techno.Com, vol. 18, no. 2, pp. 110–121,
failure occurs, including data and
network connections
2019.
[7] S. N. Kane, A. Mishra, and A. K. Dutta, “Preface:
International Conference on Recent Trends in
The average value of the validation test process by 3 Physics (ICRTP 2016),” J. Phys. Conf. Ser., vol.
testers is then compared to the conversion table which is 755, no. 1, 2016.
guided by the conversion value reference.
[8] Z. Xiao, Y. Wang, and Z. Jiang, “Research and
implementation of four-prime RSA digital signature
algorithm,” 2015 IEEE/ACIS 14th Int. Conf.
604
Authorized licensed use limited to: Universitas Indonesia. Downloaded on August 03,2023 at 03:49:10 UTC from IEEE Xplore. Restrictions apply.
Comput. Inf. Sci. ICIS 2015 - Proc., pp. 545–549,
2015.
[9] W. DIEKE, “Die Klinik der Seifenaborte.
Bemerkungen zur Arbeit von Dr. Horst Scholz,”
Arztl. Wochensch., vol. 7, no. 26, pp. 611–613, 1952.
[10] R. Brandner, M. Van der Haak, M. Hartmann, R.
Haux, and P. Schmücker, “Electronic signature for
medical documents - Integration and evaluation of a
public key infrastructure in hospitals,” Methods Inf.
Med., vol. 41, no. 4, pp. 321–330, 2002.
[11] H. F. Integrity, “public-key cryptography To cite this
version : Integrity , Authentication and
Confidentiality in Public-Key Cryptography,”
public-key Cryptogr. To cite this version Integr. ,
Authentication Confidentiality Public-Key
Cryptogr., vol. 12, no. 5, p. 59, 2018.
[12] R. Rahmawati and D. Rahardjo, “Aplikasi
Pengamanan Data Menggunakan Algoritma
Steganografi Discrete Cosine Transform dan
Kriptografi grafi AES 128 BIT pada SMK PGRI 15
Jakarta,” J. Tek. Inform. dan Sist. Inf., vol. 2, no.
April, pp. 67–74, 2016.
[13] M. T. Rahman, A. Pinandito, and E. S.
Pramukantoro, “Perbandingan Performansi
Algoritme Kriptografi Advanced Encryption
Standard ( AES ) dan Blowfish pada Text di
Platform Android,” J. Pengemb. Teknol. Inf. dan
Ilmu Komput., vol. 1, no. 12, pp. 1551–1559, 2017.
[14] V. Yuniati, G. Indriyanta, and A. Rachmat C.,
“Enkripsi Dan Dekripsi Dengan Algoritma Aes 256
Untuk Semua Jenis File,” J. Inform., vol. 5, no. 1,
2011.
[15] A. Bhandari, M. Bhuiyan, and P. W. C. Prasad,
“Enhancement of MD5 Algorithm for Secured Web
Development,” J. Softw., vol. 12, no. 4, pp. 240–252,
2017.
[16] P. Studi and I. Komputer, “PENGAMANAN DATA
FILE DENGAN MENGGUNAKAN ALGORITMA
ENKRIPSI RIVEST CODE 5,” J. Inform.
Mulawarman Ed. Juli, vol. 8, no. 2, pp. 44–49, 2013.
[17] L. Refialy, E. Sediyono, and A. Setiawan,
“Pengamanan Sertifikat Tanah Digital menggunakan
Digital Signature SHA-512 dan RSA,” J. Tek.
Inform. dan Sist. Inf., vol. 1, no. 3, pp. 229–234,
2015.
[18] A. P. Gaikwad, “Role of Digital Signature for
Authentication of E-Documents,” Int. J. Sci. Res.,
vol. 4, no. 1, pp. 69–70, 2015.
[19] A. Prameshwari and N. P. Sastra, “Implementasi
Algoritma Advanced Encryption Standard (AES)
128 Untuk Enkripsi dan Dekripsi File Dokumen,”
Eksplora Inform., vol. 8, no. 1, p. 52, 2018.
605
Authorized licensed use limited to: Universitas Indonesia. Downloaded on August 03,2023 at 03:49:10 UTC from IEEE Xplore. Restrictions apply.