Implementation and Evaluation of New Cryptography ...

8 downloads 116278 Views 204KB Size Report
ensure the security for internet applications. Key Words: E-mail security, Cryptography,. Length of the key, Digital signature, Shuffle mechanism, RSA "Rivest ...
A.I. Khamg and A.R.Ramli

Implementation and Evaluation of New Cryptography Algorithm for E-mail Applications A.I. Khamg Department of Computer and Communication Systems Engineering Faculty of Engineering -University Putra Malaysia 43400UPM, Serdang, Selangor DE, Malaysia [email protected]

A.R.Ramli Department of Computer and Communication Systems Engineering Faculty of Engineering -University Putra Malaysia 43400UPM, Serdang, Selangor DE, Malaysia

Abstract

message to 128 8-bit for each 4 sub keys, so if the text message less than 128 8-bit then use another sub key. The last step is to send the message to another side (the recipient). To retrieve the original massage the recipient must apply the inverse of all the previous stages i.e. rehashing and decryption. In this study comparison between the proposed algorithm and RSA algorithm (asymmetric algorithm) was examined and successful results were obtained. Because of its short time execution and higher authentication, using this algorithm will ensure the security for internet applications.

Today security is an important thing that we need to transpose data from location to another safely. As there is strong security, there is great hacker and spire at the other side. Therefore, many models and systems are looking for an ideal method to provide a secure environment for better optimization of the electronic connected-world. Cryptography accepts the challenge and plays the main role of the modern secure communication world. The purpose of this paper is to introduce and demonstrate a new algorithm for Internet and e-mail security. The purposed algorithm was developed based on the combination of symmetric and asymmetric algorithm whereas the length of the key and digital signature was considered. In this manner, the length of the key would not affect the time execution of this algorithm and digital signature in the end of message would increase the authentication between the sender and the recipient. The main steps in this algorithm started with reading the plain text "original message" from the user. The second step is to apply the hash method on this message by using shuffle mechanism. Now the message is ready to do the encryption process that is dividing the text

Key Words: E-mail security, Cryptography, Length of the key, Digital signature, Shuffle mechanism, RSA "Rivest Shamir and Adleman".

1. Introduction Cryptography is defined as the art or science of secret writing, or more exactly, of storing information. Cryptography as a term coined in 1658 a famous English physician and writer Thomas Brown [1].The origin of the word cryptography comes from the Greek, where “crypto” meant “hidden” and

34

Implementation and Evaluation of New Cryptography Algorithm for E-mail Applications

“grafik” meant “writing”. A cryptosystem is defined as a method to accomplish cryptography. Cryptanalysis is the practice of defeating such attempts to hide information and includes both cryptography and cryptanalysis [2]. The original information to be hidden is called "plaintext". The hidden information is called "cipher text". Converting plaintext to cipher text is performed by Encryption while the procedure of converting the cipher text to plaintext is performed by Decryption [3]. A cryptosystem is designed so that decryption can be accomplished only under certain conditions, which generally means only by persons in possession of both a decryption engine (computer program) and a particular piece of information, called the decryption key, which supplied to the decryption engine in the process of decryption. Plaintext is converted into ciphertext by means of an encryption engine whose operation is fixed and determinate (the encryption method), but which functions in practice in a way dependent on a piece of information (the encryption key) which has a major effect on the output of the encryption process [4]. The result of using the decryption method and the decryption key to decrypt ciphertext produced by using the encryption method and the encryption key should always be the same as the original plaintext [5, 6]. The purpose of this paper is to introduce and demonstrate a new algorithm for Internet and e-mail security with key length 160 bit. The purposed algorithm was developed based on the combination of symmetric and asymmetric algorithm whereas the length of the key and digital signature was considered. This paper organized as follow. Section 2 describes the experimental setup and illustrates the procedure of the new cryptography algorithm. Section 3 discusses the experiential results. Finally, Section 4 concluded this paper.

2. Material and Methodology 2.1 Experiment Setup The experimental part of this research has been implemented using Visual Basic programming language. Visual Basic is a high-performance language for technical computing. It integrates computation, visualization; one important thing in this type of programming language is plains to interface with the internet and uses it in some applications of Internet like E-mail and building the explorer pages in the Net. 2.2 Procedure of the Algorithm The purposed algorithm was developed based on the combination of symmetric and asymmetric algorithm whereas the length of the key and digital signature was considered. In this manner, the length of the key would not affect the execution time of this algorithm and digital signature in the end of message would increase the authentication between the sender and the recipient. Figure.1 illustrates the main steps used in this algorithm The Original Message "plain text "

Hashing Function

Encryption Operation Send the message Decryption Operation

Rehashing Function

Original Text

Fig.1 Main steps in the proposed algorithm

International Journal of The Computer, the Internet and Management Vol. 17.No.1 (January-April, 2009) pp 34-43

35

A.I. Khamg and A.R.Ramli

2.2.1 Hashing Function

length of key here is 1024 bits. This length is longer than the stronger case of the symmetric key i.e., 128 bit [9] and less than the most popular size of the asymmetric key i.e., 3072 bit. This mathematical model can be shown in Fig.3. Assuming p as the plain text (original character), k as the key and c as the Cipher text and h as the hashing message, so the algorithm describing in the following equation:

A hash function is an algorithm, which creates a digital representation or fingerprint in the form of the hash value or the hash result of the standard length, which is usually much smaller than the message, but nevertheless, substantially unique to it. Any change in the message invariably produces a different hash result when the same hash function is used. In the case of a secure hash function, sometimes termed one-way hash function, it is computationally infeasible to derive the original message from knowledge of its hash value [7, 8]. The hashing function has applied on the message, where there are N tables of the hashing characters that will be used via replaced it by the original character (character of reading message). These tables are contains all character in the keyboard with the additions English and Arabic character created using shuffle mechanism as shown in Figure. 2. Switch 1

Switch 2

Character 1

Character 2

Character 2

Character 3 . . . .

Character 3 . . . .

. .

H 2 = Hash( P 2) H 3 = Hash( P3) H 4 = Hash( P 4) C1 = H 1 ⊕ K1 C2 = H 2 ⊕ K 2 C3 = H 3 ⊕ K 3 rotate(C 3) = C 3

C4 = H 4 ⊕ K 4 . . C 32 = H 32 ⊕ K 32

Switch 3

Character 1

. . . . .

H 1 = Hash( P1)

. . .

Character n

. . .

. . . . .

1 2 3 4 5 6 7 8 9

10

Character n

Fig.2 Simple diagrams represent the shuffle mechanism 2.2.2 Encryption Operation Fig.3 shows scheme.

After the message has hashed via hashing function, at this moment the message is ready to apply the encryption process. The text message was divided into 128 8-bit for each 4-sub key, where the

the

simplified

algorithm

In this algorithm there are 4 rounds of encryption processes, where the first rounds

36

Implementation and Evaluation of New Cryptography Algorithm for E-mail Applications

from C1 to C32, has presented, and then apply the remaining rounds on the next blocks of the plain text until finish four rounds of the encryption processes. Figure 4 shows the flowchart of the encryption operation

decryption process followed by rehashing to retrieve the original message. Figure .5 shows the flowchart of the cryptographic algorithm.

Fig.4 Flowchart of Encryption Operation

2.2.3 Sending the Message

After the text message has been encrypted, now it is ready to be sent to another side recipient" in order to make the inverse operation decryption and rehashing.

Fig.5 Flowchart of Decryption Operation

2.2.4 Decryption and Rehashing

The hashing, encryption and decryption of the proposed algorithm were implemented on the following hardware specifications:

All these operation represent the inverse of two operation encryption firstly and the hashing finally. After receiving the plain text from the sender side, it must apply the

3 Experimental Results

1- Intel Pentium iii 870MHz processor. 2- Intel CC820 ATX motherboard.

International Journal of The Computer, the Internet and Management Vol. 17.No.1 (January-April, 2009) pp 34-43

37

A.I. Khamg and A.R.Ramli

Figure .6 shows the graphic user interface (GUI) of the proposed algorithm. All functions was illustrated in this figure like Fetch, Send, Close, Address of the sender, Address of the receiver, Subject name, Delete Message Send Message, Send Attachment, Save the Message, Open File, Encryption, Decryption and finally Clear the Message.

3- 256 MB SDRAM. 4- Hard disk UANTUM FIREBALLIct20 10.

As explained earlier, the implemented system based on the proposed algorithm consisted of these main modules i.e., hashing function, data encryption and data decryption. All results related to these operations are presented in next section.

Fig.6 Shows the GUI of the proposed Algorithm

shown in the Tables 1, Table 2, and Table 3 where use four encrypted data tables which names (Tb1, Tb2, Tb3, and Tb4). For each of the encrypted table the encryption and decryption time were calculated. The average time of all encrypted tables calculated as well. For RSA algorithm, Encryption and decryption time were calculated as shown in Table 4.

3.1 Compare the Proposed Algorithm with RAS Algorithm

Comparison between the two algorithms, proposed algorithm with size 1024 bit key and the RSA algorithm with size 1024 bit key has done. This comparison was conducted on three text files sized of 200 Kb, 350 Kb and 500 Kb for both algorithms. For the proposed algorithm as

38

Implementation and Evaluation of New Cryptography Algorithm for E-mail Applications

Table 1 Encryption and decryption time using proposed algorithm for file with size 200Kb Table # Tb1 Tb2 Tb3 Tb4

The Tdr 9.21ms 12.25,s 10.23ms 13.14ms 9.54ms 11.42ms 9.88ms 11.74ms Avg Avg 12.14ms 9.71ms The: Time to compute hashing and encryption Tdr : Time to compute decryption and rehashing

size 200kb

Table 2 Encryption and decryption time using proposed algorithm for file with size 350Kb Table # Tb1 Tb2 Tb3 Tb4

The 12.41ms 11.44ms 11.85ms 11.32ms Avg 11.76ms

Tdr 15.23ms 14.95ms 15.04ms 14.88ms Avg 15.02ms

size 350kb

The: Time to compute hashing and encryption Tdr : Time to compute decryption and rehashing

Table 3 Encryption and decryption time using proposed algorithm for file with size 500Kb Table # Tb1 Tb2 Tb3 Tb4

The 18.12ms 16.52ms 16.58ms 17.02ms Avg 17.13ms

Tdr 21.02ms 19.55ms 19.88ms 19.02ms Avg 19.86ms

size 500kb

The: Time to compute hashing and encryption Tdr : Time to compute decryption and rehashing

International Journal of The Computer, the Internet and Management Vol. 17.No.1 (January-April, 2009) pp 34-43

39

A.I. Khamg and A.R.Ramli

Table 4 Encryption and Decryption time using RSA algorithm Size

Te

Td

200kb

32.56ms

57.62ms

350kb

67.906ms

112.23ms

500kb

102.23ms

182.56ms

200

Time (ms)

160

120

Proposed 80

RSA

40

0 200

350

500

Key size (kb)

Fig.7 Shows the encryption time in both algorithms

200

Time (ms)

160 Proposed

120

RSA

80 40 0 200

350

500

Key size(kb)

Fig.8 Shows the decryption time in both algorithms

consuming in the proposed algorithm is shorter than the RSA algorithm, whereas the time increases according to the size of the text. For instance, text with size 500 Kb take a longer time to compute the encryption and decryption than the file with text 200Kb. As

Figure.7 shows the encryption time consumption in both algorithms. The decryption time consumption is shown in figure .8 From the two previous figures, we found out that the encryption and decryption time

40

Implementation and Evaluation of New Cryptography Algorithm for E-mail Applications

All these operations play main role in cryptographic algorithm for symmetric algorithm; the role was to provide a complicated encryption and decryption scheme by using many substitutions and transpositions multiple times over. On the other hand, asymmetric algorithm involve very complex mathematical theory as the basis for encryption, decryption. Table 5 summarized the type of mathematical operation involved in cryptographic algorithm

a result of increase the calculation time when the size of the text is increased. 3.2 Type of Operations in Cryptography Algorithm

All algorithms involve a certain finite set of mathematical operation. These operations include addition, subtraction, multiplication, division, logical AND logical OR logical XOR logical NOT two’s complement, shifts and rotation, expositional moduleo arithmetic, as well as many others.

Table 5 Mathematical operations used in cryptography Algorithm Proposed algorithm

Operation type Shuffle exchange, Logical XOR, Rotation Logical XOR, Addition, Multiplication, Left Rotation, and Modulo Arithmetic Logical XOR, Addition, and Modulo Arithmetic Logical XOR, Addition, Multiplication, Left Rotation, and Modulo Arithmetic Exponentiation and Modulo Arithmetic

International "IDEA Data encryption "Algorithm Blowfish Rivest Cipher " RC5 "number 5 Rike "RSA& RPK "Public Key Algorithm diffe-Hellman "DHKA key Agreement "algorithm

Exponentiation and Modulo Arithmetic

3.3 The Strength of Encryption

The strength of encryption is discerned in accordance with the required time to decode a key [10]. The calculation of encryption strength of an encryption algorithm is as equation 11.

((Differen tialCharacteri stic)-1/2))× CompSpeed second(1h)× 24h × 365days Differential Characteristic = −1 (p1p2) ×Filtering weight −8 Filtering weight = P1×C1 =2

International Journal of The Computer, the Internet and Management Vol. 17.No.1 (January-April, 2009) pp 34-43

41

A.I. Khamg and A.R.Ramli

DC = 2-16× 2

−8

The Figure 9 shows the comparison of needed time (years) to crack some of algorithms, where we found the AES algorithm has a highest strength, and need a long time to crack then SEED and DES algorithms respectively. The proposed algorithm as we can show from the table needs 1.11E +30 year.

= 2-24.

For proposal algorithm DC equal 2 96 because in this algorithm there are four rounds

needed time ( years)

( 2 96 / 2 ) x 883 x 10 6 = 1.11E +30 year 3600 x 24 x 365

1.00E+77 1.00E+66 1.00E+55 1.00E+44 1.00E+33 1.00E+22 1.00E+11 1.00E+00 AES

SEED

DES

prposed algorithm

algorithm type

Fig .9 Decryption Time in Both algorithms

4 Conclusion

number of table has been send including in the original message to retrieve the plain message in the recipient side. If the message exposed to attacking via hackers while was sending to the receiver it will corrupt and cannot retrieve the original message again. There are two ways in which this work can be improved. One is speedup the implemented algorithm using parallel processing to reduce time of encryption and decryption. The other approach by using hardware component and can either develop this study to encrypt the image files.

The problem of time execution and the authentication between sender and receiver are considered in this study. New algorithm was developed based on the combination of symmetric and asymmetric algorithm for Email encryption. It is a powerful tool in protecting the e-mail privacy. The information and privacy commissioner encourages readers to put this new knowledge into practice and to actively investigate using E–mail encryption software. If you do not protect your privacy with tools like e–mail encryption, as was discussing in the experimental process the time consuming in 4 different table to do encryption and send the message via email to another side and doing the decryption process depending on the table number that has made encryption processing where the

References

[1]

[2]

42

I. Nichols, K. Randall (1999), ICSA Guide to Cryptography, McGraw-Hill Companies Inc, New York. P.Mayer (1994), Introduction to cryptography

Implementation and Evaluation of New Cryptography Algorithm for E-mail Applications

http://www.totse.com/en/privacy/encypt ion/165727.html, January. [3] S.L. Salomao, J.M. Alcantara, V.C. Alves, F. M. Franca (2000), “Improved IDEA Integrated circuits and systems design” proceedings, 18-24 September. pp. 47 – 52. [4] Y.Y. Al-Salqan (1997), “Distributed computing systems”, Proceedings of the Sixth IEEE Computer Society Workshop, 29-31Oct. pp: 34–37. [5] S. Yongxing, W. Xinmei (1999), An approach to finding the attacks on the cryptographic Protocols, National Key Lab. on ISN, Xidian University, Xi'an, PX.China. [6] B. Preneel, R. Govaerts, J. Vandewalle (1992), “Hash functions for information authentication”, Proceedings Compeuro 92, 6th annual European Conference on Computer Systems and Software Engineering, May 4-8, pp. 475-480. [7] S. L. Danielsen, P. B. Hansen, K. E Stubkjaer (1998), Wavelength conversion in optical Packet switching light wave Technology, Vol. 16, Issue.12, Dec, pp.2095 –2108. [8] M. Blaze,W. Diffie, R.L. Rivest (1996), Minimal key Lengths for symmetric ciphers to provide adequate commercial security. January. [9] L. Gao, L. Hanbo, G.E.Sobelman (1999), “A compact fast variable key size elliptic curve Cryptosystem coprocessor, Field-Programmable Custom Computing Machines”, FCCM 99. Proceedings Seventh Annual IEEE Symposium on 21-23 April pp: 304 – 305. [10] L. Chang-Doo, C. Bong-Jun, P. KyooSeok (2004), “Design and evaluation of a block encryption Algorithm using dynamic-key mechanism”, Future Generation Computer Systems 20, 327–338

International Journal of The Computer, the Internet and Management Vol. 17.No.1 (January-April, 2009) pp 34-43

43

Suggest Documents