2013 IEEE 4th Control and System Graduate Research Colloquium, 19 - 20 Aug. 2013, Shah Alam, Malaysia
Securing TFTP Packet: A Preliminary Study Nur Nabila Mohamed1, Habibah Hashim2, Yusnani Mohd Yussoff3 and Anuar Mat Isa4 1,2,3,4
Computer Engineering Department, University Teknologi MARA, Shah Alam, Selangor 40450, Malaysia 1
[email protected], 2
[email protected], 3
[email protected], 4
[email protected] transmission and bank or credit card information which contains message integrity checking, identity authentication and digital signature [2]. It can be classified into symmetric key encryption that utilizes single key for both sender and recipient to encrypt and decrypt data, and asymmetric key encryption that uses two keys, a public key known by everyone and private key that is only known by the recipient to decrypt data. However, it is impossible to use common cryptographic encryption with extremely constrained resources. Therefore, it is necessary to use an ideal encryption algorithm in constrained environment which is covered by a branch of modern cryptography - a lightweight encryption [3]. Lightweight encryption is a class of symmetric cryptographic algorithm which does not determine strict criteria for classifying a cryptographic algorithm as lightweight but the common features of lightweight algorithms are extremely low requirements to essential resources of target devices. It can be classified into two: lightweight block cipher and lightweight stream cipher. A block cipher encrypts a fixed block size of plaintext whereas stream cipher is a symmetric key cipher which encrypts a byte of plaintext at a time. In particular, block cipher is often used compared to stream cipher for encrypting computer communication. A lightweight symmetric key encryption such as Advanced Encryption Standard (AES) and Data Encryption Standard (DES) has been used widely to protect sensitive information which meet almost all the requirements to essential resources for protecting information during data transmission. Trivial File Transfer Protocol (TFTP) is a simplified version of FTP for transmitting files on personal and local network quickly and simply [4]. Nowadays, TFTP is used for booting embedded devices as it is easy to be implemented on small amount of memory which is an important factor in the field of embedded system. Its configuration uses varies; to share information between computers in closed system environment such as in office, laboratory and school, to back up network and router configuration files and to boot computer without disk. TFTP protocol is used in embedded devices on top of User Datagram Protocol (UDP) port 69 as its transport protocol based on internet protocol stack because it
Abstract— With the advent of pervasive computing nowadays, there is a need to deal with security including integrity and confidentiality to maintain the accuracy, and distribute data safely and efficiently. Therefore, it is important to find the best solution for protecting sensitive information through encryption in constrained environment. However, due to the limitation of resources, it is difficult to implement common cryptographic functions on this type of environment. In addition, an ideal encryption algorithm which is suitable for this environment would need to be lightweight. In this paper, a preliminary study on encrypting data is carried out using two lightweight symmetric algorithms, AES and DES. We also identify an experiment of transferring variable size of encrypted data using symmetric encryption, AES which utilizes 256 bits key size. The data is transferred in local network between two computers using TFTP (Trivial File Transfer Protocol). Finally key exchange concept is proposed based on Diffie Hellman Key Exchange (DHKE) which improves the security of TFTP. From the result, it showed that AES is faster to encrypt files although its key size is bigger compared to DES. Besides, it took less time to send normal packet through TFTP compared to encrypted packet as the file size changed after encryption. Keywords—Trivial File Transfer Protocol, Integrity, Confidentiality, Diffie–Hellman Key Exchange, Data Encryption Standard, Advanced Encryption Standard
I. INTRODUCTION Data transmission from one computer to another accompanying with sensitive information will be subjected to increasing security concerns even in constrained environment [1]. During transmission, there has been possibility for network eavesdropping which also known as network sniffing at network layer. This malicious activity enables attacker to capture packets from the network transmitted by other computers and read sensitive information like passwords, session tokens, or any kind of confidential information. Thus, various security mechanisms have been developed to prevent these malicious attacks which generally utilize cryptographic protocols to achieve data integrity and confidentiality. Cryptography has been used in computer system nowadays to protect secret information, data
978-1-4799-0552-2/13/$31.00 ©2013 IEEE
158
2013 IEEE 4th Control and System Graduate Research Colloquium, 19 - 20 Aug. 2013, Shah Alam, Malaysia
supports small program size and very light to be implemented in embedded firmware. The purpose of using TFTP is to enable sharing information in close system environment as this simple protocol is generally used to transfer file in local network. Besides, it is compatible to be implemented with lightweight encryption as this protocol itself acts as simple file transfer protocol. This study explains analysis of data encryption using two lightweight symmetric encryptions, AES and DES followed by data encryption using AES 256 algorithm which has been transmitted in local network using TFTP. The client side will then decrypt the data using the same algorithm. This paper also proposes key exchange method, Diffie Hellman Key Exchange (DHKE) to exchange secret key before encrypted data is being transmitted. The remainder of this paper is structured into five major parts: Section 2 addresses the related work. In section 3 and 4, it describes analysis of DES and AES algorithms and experimental design of transferring encrypted data using AES through TFTP. Then we explain our proposed key exchange operation using DHKE in Section 4. Finally, Section 5 concludes the paper.
cipher type, cryptanalysis resistance, developed, possibility key, possible ASCII printable character key, and time required to check all possible keys. All these nine factors proved that AES is better compared to the other two types of encryption. Based on above related works, in order to transfer information securely in closed system, this paper proposes lightweight security which is compatible with simple file transfer protocol, TFTP to distribute data safely and efficiently. III. ANALYSIS OF AES AND DES Data Encryption Standard (DES) is a symmetric block cipher which uses 56 bit key sizes to encrypt 64 bits length block. This widespread block cipher was standardized in 1977 used by federal agencies, bank, ATM machines and others. However, in 1997, Advanced Encryption Standard (AES) was designed to replace DES due to many attacks and security vulnerability [13]. Furthermore, DES has smaller key size which makes it insecure and can be broken using brute-force methods, thus is now considered obsolete. AES is an iteration symmetric block cipher which can encrypt a block size of data using variable key sizes of 128, 192 and 256 bits. In many of networking standard, 128 bits key size is used. This algorithm is fast in both software and hardware, thus it is efficient in wide range of platforms. In this experiment, laptop Intel Core i3-370M 1.3GHz is used to encrypt different file sizes range from 1kb to 1Mb. Table 1 and 2 shows comparative execution time of encryption and decryption between AES (256 bits key size) and DES (56 bits key size). From these tables, the results show that execution time of encryption and decryption using AES is faster compared to DES. The throughput is calculated as total size of file in Megabytes encrypted / encryption time in seconds (Mb/sec). The encryption throughput during encryption and decryption using AES is also more efficient than DES.
II. RELATED WORK The simplest and straightforward solution to transfer file is using shared folder [5] by knowing other side's IP address, in spite of there is highly security risk during the transmission. Besides, TFTP is another method to share information between computers in closed system environment. However, malicious attacks in local network such as network eavesdropping enable intruder to capture packets from network transmitted by other computers and reading content of the data in search for sensitive information. In [6], it explains that there is no security mechanism in TFTP which is dangerous to be used in open networks. There are many recent lightweight symmetric encryption that is considered for minimal resource requirement. In [7], it explains examples of lightweight block ciphers such as DESL, DESXL, Curupira, Katan, Ktantan and others. DESL and DESXL were proposed in [8] based on original DES algorithm. Its specific design in S-box enable to save part of ROM for table storage which is more power efficient than DES. In [9][10], a study on a lightweight block cipher, AES uses less energy as well as its encryption throughput is performed better during encrypting smaller packet structure compared to stream cipher, RC4. Furthermore, [11] concluded that AES is faster and it performs well in hardware compared to any other symmetric encryption. The author in [12] also analyzes comparative study between three types of encryption: AES, DES and 3DES within nine factors which are key length, block size,
TABLE 1: EXECUTION TIME OF ENCRYPTION
159
File size
DES (s)
AES (s)
1Kb
0.072
0.040
10Kb
0.096
0.057
100Kb
0.331
0.063
1Mb
0.549
0.219
100Mb
1.573
0.674
Throughput (Mb/s)
38.579
96.013
2013 IEEE 4th Control and System Graduate Research Colloquium, 19 - 20 Aug. 2013, Shah Alam, Malaysia TABLE 2: EXECUTION TIME OF DECRYPTION
File size
DES (s)
AES (s)
1Kb
0.058
0.033
10Kb
0.099
0.038
100Kb
0.477
0.075
1Mb
0.684
0.177
100Mb Throughput (Mb/s)
1.658
0.633
33.975
105.765
TABLE 3: EXECUTION TIME FOR NORMAL FILE TRANSMISSION WITH DIFFERENT FILE SIZES
IV. ENCRYPTED FILE TRANSMISSION In this experiment, we focus on Read Request (RRQ) packet transmission shown in figure 1 as Write Request (WRQ) packet transmission is also similar. We only use AES encryption for encrypting and decrypting the file. A notebook computer Intel Core i3-3217U 1.8GHz is used as a server to encrypt file using AES 256 algorithm and then send the encrypted file to a client, laptop Intel Core i3-370M 1.3GHz to receive the file and decrypt it. These client and server are connected wirelessly between distance of 20cm. Execution times of encryption and decryption are considered as the time that an algorithm takes to produce cipher text file from a plain text file. This experiment is performed on the effect of changing variable size of text file range 1kb to 10Mb which is done on Debian virtual machine using C programming. Data is taken 10 times for each packet size. Table 3 shows results of execution time for normal file transmission whereas table 4 shows result of execution time for encrypted file transmission. From these tables, it took less time to send normal packet through TFTP compared to encrypted packet as the file size changed after encryption. However, the difference of execution time between normal and encrypted file transmission is small.
1Kb 0.009 0.009 0.011 0.009 0.010 0.008 0.007 0.007 0.007 0.007
10Kb 0.050 0.069 0.043 0.061 0.061 0.059 0.056 0.059 0.071 0.073
100Kb 0.490 0.499 0.507 0.563 0.489 0.482 0.498 0.499 0.533 0.508
1Mb 1.851 1.946 1.833 2.019 1.750 1.864 1.810 1.705 1.895 1.978
10Mb 18.904 18.003 17.258 17.955 17.734 18.900 17.878 18.687 17.881 18.019
0.008
0.060
0.507
1.865
18.122
Average time (s)
TABLE 4: EXECUTION TIME FOR ENCRYPTED FILE TRANSMISSION WITH DIFFERENT FILE SIZES
1Kb 0.010 0.010 0.010 0.010 0.012 0.010 0.009 0.010 0.011 0.010
10Kb 0.068 0.055 0.067 0.066 0.076 0.065 0.054 0.057 0.062 0.058
100Kb 0.540 0.576 0.591 0.578 0.590 0.593 0.584 0.568 0.564 0.600
1Mb 2.115 2.105 2.003 2.280 2.267 2.327 2.030 2.246 2.177 2.164
10Mb 22.146 21.151 20.859 21.601 20.891 21.327 21.911 21.492 21.369 21.165
0.010
0.063
0.578
2.171
21.391
Average time (s)
V. DIFFIE HELLMAN KEY EXCHANGE Diffie Hellman Key Exchange (DHKE) enables two users to exchange cryptographic key that is then be used for subsequent encryption of messages over insecure channel [14]. Figure 2 shows illustration of DHKE operation between two parties, X and Y. •
• Figure 1: RRQ encrypted packet transmission overview
•
160
X and Y agree on p and g values in private where p is a big prime number and g is a generator of p. They choose positive value of personal keys, a and b which have not been transmitted over public medium. X and Y then compute their public keys, A and B based on personal keys according to the formula in 2). They can share their public keys over an insecure medium. From these public keys, a key can be generated by either user on the basis of their own personal keys according to formula in
2013 IEEE 4th Control and System Graduate Research Colloquium, 19 - 20 Aug. 2013, Shah Alam, Malaysia
3) where the value of the key turns out to be the same.
suggest the use of AES in securing TFTP packets. This lightweight encryption is compatible to be implemented on TFTP as this protocol itself acts as simple file transfer protocol. We also propose new option in TFTP packet which enables process of exchanging secret key between two users using key exchange method, DHKE. ACKNOWLEDGMENT The authors would like to thank Universiti Teknologi MARA (UiTM) for providing research grant (E-Science) for this research work. REFERENCES
Figure 2: Key exchange operation
[1]
Figure 3 below shows overview of RRQ packet transmission with security component. New TFTP option extension [15] is proposed to be integrated with process of exchanging key in order to protect data integrity and confidentiality during file transmission. The option field is denoted with key exchange string that is used for exchanging values between two users. If server accepts the options that is specified by the client, it will send option acknowledgment and send value B to the client. If the option is rejected by the server, it will not include in the OACK packet. The client will only use the accepted options where each value is associated with its option. After the client acknowledging it, the server will proceed to send encrypted data. Using AES algorithm and the key that both parties compute before based on DHKE method, the client will then decrypt the data.
[2] [3] [4] [5]
[6]
[7]
[8] [9]
[10]
[11]
[12]
[13]
[14] Figure 3: TFTP protocol with security parameters
[15]
VI. CONCLUSION AND FUTURE WORKS This paper presents analysis of two symmetric encryption algorithm, AES and DES. Compared to DES, execution time for encryption and decryption using AES is better due to its speed and key size as well as this algorithm is still unbreakable until now. Besides, we also
161
M. Katagi, S. Moriai, "Lightweight Cryptography for The Internet of Things," in Sony Corporation, pp. 7-10, 2008. Cohen, F., "A short history of cryptography," from http://web.itu.edu.tr/~orssi/dersler/cryptography/ S. Panasenko, S. Smagin, "Lightweight Cryptography : Underlying Principles and Approaches," in International Journal of Computer Theory and Engineering, 2011 Bollins, K., "The TFTP Protocol (Revision 2) RFC 1350," Official Protocol Standards, pp. 1–11, 1992. P. Gurvich, N. Koenigstein, "Analyzing the DC File Sharing Network," in P2P Computing, 2010 IEEE 10th International Conference, pp.1-4, 25-27 Aug 2010. S. B. Qiu, "Building TFTP Server on Embedded System," on Wireless Communications, Networking and Mobile Computing, 2008. WiCOM '08. 4th International Conference on 2008, pp1-4. T. Eisenbarth, "Compact Implementation and Performance Evaluation of Block Ciphers in aTtiny Devices," Lecture Notes in Computer Science Vol. 7374, pp. 172-187, 2012. G. Leander, C. Paar, "New Lightweight DES Variants," Communication Security Group, pp. 196-210, 2007. Prasithsangaree, P., & Krishnamurthy, P., "Analysis of Energy Consumption of RC4 and AES Algorithms in Wireless LANs," GLOBECOM ’03. IEEE Global Telecommunications Conference, pp. 1445–1449. Singhal, N., Raina, J. P. S., "Comparative Analysis of AES and RC4 Algorithms for Better Utilization," in International Journal of Computer Trends and Technology, 177–181. Federal Information, “Announcing the ADVANCED ENCRYPTION STANDARD ( AES ),” in US National Institute of Standards and Technology (NIST), 2001. H. Alanazi, B. Zaidan, et al., "New Comparative Study Between DES, 3DES and AES within Nine Factors," in Journal of Computing, pp. 152-157, 2010 Coppersmith, D., "The Data Encryption Standard (DES) and Its Strength Against Attack," in IBM Journal Research and Development, pp.243-250, 1994. E. Rescorla, “Diffie-Hellman Key Agreement Method (RFC 2631),” in The Internet Society, 1999. Anuar Isa, Nabila Mohamed, Habibah Hashim, Syed Farid Syed Adnan, Jamalul-lain Ab Manan, Ramlan Mahmood, "A Lightweight and Secure TFTP Protocol for Smart Environment," in International Symposium on Computer Applications and Industrial Electronics, pp.302-306, December 2012.