Beruflich Dokumente
Kultur Dokumente
Website: www.ijetae.com (ISSN 2250-2459, ISO 9001:2008 Certified Journal, Volume 2, Issue 12, December 2012)
Start
Initialization of string Pi,
char key, new_key, text,
text_encr, data_receiv,
data_decr
Enter key
I.
INTRODUCTION
II.
No
Yes
Enter text
Scan
keypad
Scan
keypad
Encryption
Key
expansion
Display
text_encr
Receive data
Decryption
Display
data_decr
Send text
End
A. Main Program
Main program consists of sub functions, such as scan
keypad, key expansion, encryption, decryption. The main
program flowchart is shown in Figure 1. Process of
sending and receiving is described in the flowchart. The
process indicates text transmission using serial
communication based on microcontroller.
P1 =0x243f6a882ffd72db
P11=0xbe5466cf636920d8
P2 =0x85a308d3d01adfb7 P12=0x34e90c6c71574e69
P3 =0x13198a2eb8e1afed
P13=0xc0ac29b7a458fea3
P4 =0x037073446a267e96 P14=0xc97c50ddf4933d7e
P5 =0xa4093822ba7c9045 P15=0x3f84d5b50d95748f
P6 =0x299f31d0f12c7f99
P16=0xb5470917728eb658
P7 =0x082efa9824a19947
P17=0x9216d5d9718bcd58
P8 =0xec4e6c89 b3916cf7 P18=0x8979fb1b82154aee
P9 =0x452821e60801f2e2 P19=0xd1310ba67b54a41d
P10=0x38d01377858efc16 P20=0x98dfb5acc25a59b5
2. Key (entered by user) which is 8 characters will be
changed into 16 hexadecimal digits based on ASCII
B. Key Expansion
In this algorithm, key expansion is a process of
randomization the original key to new key.
672
4.
Start
Initialization of
Int i, i=1
i=21
yes
Start
no
text^=new_key
text_encr=text
Initialization of
Int i
text+=0x0101010101010101
For (i=1,i<21,i++)
i++
no
yes
key^=Pi
End
New_key=key
2.
3.
End
4.
Figure 2. Flowchart of Key Expansion
A. Encryption
Encryption process consists of 20 simple function
iterations. Each iteration consists of XOR operations and
additions of 64 bits. The encryption process is shown in
flowchart of Figure 3 with detail explanation as mention
below:
1. Text message (8 characters) is changed to
hexadecimal.
2. Do XOR operation for the hexadecimal with new
key and then add to 0x0101010101010101.
3. Do similar process for the result until 20th iteration.
4. Chipertext is obtained and ready to be secure.
C. Decryption
Decryption process is the opposite of ecryption
process that consists of XOR operations and subtractions.
The decryption process is shown in flowchart of Figure
4 with detail explanation as mention below:
1. Received data (chipertext) is converted to
hexadecimal
and
the
subtracted
by
0x0101010101010101
Figure 4. Flowchart of Decryption
673
Head
Text/message
Tail
(a)
Dot (.)
xxxxxxxx
(b)
Fig. 7 Experiment results
(a) Encryption result,
(b) Decryption result with true key
674
Experiment
1
2
3
4
5
6
7
8
9
10
% error
0
0
0
0
0
0
0
0
0
0
REFERENCES
[1 ] Atmel, 1997, Flash Microcontroller: Architectural Overview,
Atmel Inc. (http://www.atmel.com), USA.
[2 ] Helfrick, D. Albert., and Cooper, W.D., 1992. Electronic
Instrumentation and Measurement Techniques. Prentice Hall of
India Limited, New Delhi.
[3 ] Muttaqin, A. and Abidin, Z., 2008. Implementasi Kriptografi
Transmisi Teks Menggunakan Mikrokontroler. EECCIS, vol. II,
no. 1: 17-21.
[4 ] Schneier, B., 1995. Applied Cryptography-Protocols, Algorithms,
and Source Code in C, 2nd. New York. John Wiley & Son.
675