Sie sind auf Seite 1von 6

International Journal of Computational Intelligence and Information Security, March 2012 Vol. 3, No.

Block Based Cryptographic Protocol Depending on G.C.D. for Secured Transmission


Tamisra Kundu1 , Sananda Bhattacharyya2 , Prof (Dr) Pranam Paul3 1 Student, M. Tech. (CSE), Narula Institute of Technology, Agarpara, West Bengal, INDIA tamisrakundu@gmail.com 2 Student, M. Tech. (CSE), Narula Institute of Technology, Agarpara, West Bengal, INDIA sanandabhattacharyya@gmail.com 3 HOD Computer Application, Narula Institute of Technology, Agarpara, West Bengal, INDIA pranam.paul@gmail.com Abstract
With the growth of internet and network, the need for secure data transmission become more and more essential and important, as security is a major concern in the internet world. Data likely to be kept hide from all people except from the authorized user cannot be sent in plain text. So the plain text should be codified by the process of encryption. Each type of data has its own features, therefore different techniques should be used to protect confidential data from unauthorized access. Here a newly developed encryption technique, named Exponential of 2- XOR-Rail Fence is presented. The technique can be implemented on any kind file as it is implemented in bit-level. The strength of the technique is analyzed in this synopsis. Using this technique source bit stream is divided, XORed and Rail fenced to get the encrypted text. The reverse process is applied on the encrypted text to get back the original source bit stream. Keywords: Cryptography, Encryption, Decryption, Plain Text, Cipher Text, Network Security

1. Introduction
Cryptography is the science of writing messages in secret code and an ancient art; the first documented use of cryptography in writing dates back to circa 1900 B.C. The new forms of cryptography came soon after the widespread development of computer communications. In data and telecommunications, cryptography is necessary when communicating over any untrusted medium, which includes just about any network, particularly the Internet. Here I introduce a block based encryption technique named, Exponential of 2- XOR-Rail Fence. For encryption a key has to be generated. Key length and bit stream is chosen at random. At first plain text is decomposed into finite number of blocks having same size of random number. G.C.D. and two divisors are calculated. Each distinct block is divided by divisors alternatively. New blocks are generated and XOR ed with the random number. The Rail-Fence technique is applied on each distinct resultant block. In decryption process the encrypted text first divided into segments. Getting desirable information from key, reverse process of encryption has been applied on each segment. 32

International Journal of Computational Intelligence and Information Security, March 2012 Vol. 3, No. 3

2. Algorithm
In this section, encryption process is discussed in section 2.1.The section 2.2 and 2.3 discussed about the structure of key and decryption respectively.

2.1 Encryption Process


Step 1: Source file is converted into binary form and the source binary bit stream S is generated. Step 2: A random number say R is generated by the user which is defined in the key. Step 3: The source bit stream S is decomposed into N number of distinct blocks where each block is of equal length of the random number R. Step 4: After decomposition of total source bit stream S, a block having n number of bits (0<n<R) is left as unchanged block, say UB, which kept unchanged during encryption process. Step 5: G.C.D. of total bit stream and number of bits containing in each block, say G, is calculated. Step 6: Now, two numbers represented in power of 2, are taken as divisors, where former one is immediate before G and the later one is immediate after G. Step 7: Two flags are taken. The odd flag (=0) represents the divisor less than G and the even flag (=1) represents the divisor greater than G. The flag bit of the starting divisor is defined in key. Step 8: Each distinct block of N is divided by the divisors alternatively starting from the divisor less than G. Step 9: After the division process is completed, new blocks representing each distinct block of N are formed by appending the remainder bits after the respective quotient bits. Step 10: Each new block is XORed with random number R. Step 11: The Rail fence technique is applied on each distinct resultant block. Step 12: Now, the unchanged block UB is appended at the beginning of the output of step 11.Hence the encrypted text is generated.

2.2 Key Structure


Table 2.2.1 shows the structure of the key
Table 2.2.1: Formation of Key

Segment 1 2

Description Flag variable (to determine the 1st divisors for the blocks) Random Number Total Key size

Maximum number of bits required(size) 1 m 1+m

2.3 Decryption Process


Step 1: First n number of bits (calculated remainder of the division of the total stream length by random number length) are discarded from the encrypted text and stored in UB as unchanged block. Step 2: Rest of the encrypted text is decomposed into N number of distinct blocks, each block having length 33

International Journal of Computational Intelligence and Information Security, March 2012 Vol. 3, No. 3 equal to R. Step 3: Now deciphering Rail fence technique is applied on each distinct block. Step 4: Each resultant block is XORed with random number R. Step 5: G.C.D. is calculated from total bits of encrypted text and random number R. Step 6: For each distinct block, respective flag is considered and the respective divisor is calculated. The bits occupied by the remainder of the division in encryption process are calculated and kept into a variable say rem which is discarded from each block. Step 7: Rest of the bits of each distinct block are multiplied with the divisor. The remainder bits, rem are now added with the result of the multiplication. Step8: This consecutive decrypted distinct block are appended and lastly the content of the unchanged block UB is concatenated at the end of the decrypted text and in this way the original plain text is recovered.

3. Example
To illustrate this algorithm an example has been shown. The algorithm can be operated on a binary stream S which acts as the plain text for the example. Let, S is 1101111001011010

3.1 Encryption Process


Let us start with the encryption process first. Random number, say R is taken from user. Let R is 1100

Decompose the binary stream S in finite blocks whose length is equal to R. So here distinct blocks are b1=1101; b2=1110; b3=0101; b4=1010 Now we will calculate G.C.D. Here length of each block is 4 and length of the binary stream S is 16. So G.C.D will be 4.So two divisors will be 2 (2^1) and 8 (2^3). Now two flags are taken, one is odd flag (=0) represents minimum divisor (i.e. 2) and the other one is the even flag (=1) represents the maximum divisor (i.e. 8). The blocks are divided by these divisors alternatively.

Now, showing the entire division process:b1 Dividend=1101 Divisor=2(10) 1101/10 Quotient=110 Remainder=1 b2 Dividend=1110 Divisor=8(1000) 1110/1000 Quotient=1 Remainder=110 b3 Dividend=0101 Divisor=2(10) 0101/10 Quotient=010 Remainder=1 b4 Dividend=1010 Divisor=8(1000) 1010/1000 Quotient=1 Remainder=010 34

International Journal of Computational Intelligence and Information Security, March 2012 Vol. 3, No. 3

For each block a new block is generated by appending the remainder with the quotient. Then the new blocks will be:b1=1101; b2=1110; b3=0101; b4=1010 Now, each block is XORed with the random number R we get new set of blocks. b1 (1101)XOR (1100) =0001 b2 (1110) XOR (1100) =0010 b3 (0101) XOR (1100) =1001 b4 (1010) XOR (1100) =0110

Now we will apply the rail-fence technique on the result of the XOR operation. We get:b1=0001 b2=0100 b3=1001 b4=0110

Concatenating all the blocks we get the final encrypted binary stream as :0001010010010110

3.2 Decryption Process


Now we will start the decryption process to recover the original text. From the key structure we get the length of each block (i.e.4).Now decomposing the encrypted stream we get distinct blocks say c1=0001 c2=0100 c3=1001 c4=0110

Now applying deciphering Rail fence technique on each block we get: c1=0001 c2=0010 c3=1001 c4=0110

XORed random number R with c1, c2, c3 and c4 accordingly we get:c1 (0001) XOR (1100) =1101 c2 (0010) XOR (1100) =1110 c3 (1001) XOR (1100) =0101 c4 (0110) XOR (1100) =1010

Now we calculate G.C.D. and the two divisors in same manner described in encryption process. From key structure we get the flag bit for respective blocks and hence decide the divisor. The bits occupied by the remainder is calculated asFor, c1 dividend = (2^4), divisor = 2^1=2(10) so remainder will be (2^1) - 1=1 bit (1) c2 dividend= (2^4), divisor=2^3=8(1000) so remainder will be (2^3) - 1=3 bit(110) c3 dividend= (2^4), divisor=2^1=2(10) so remainder will be (2^1) - 1=1 bit(1) c4 dividend= (2^4), divisor=2^3=8(1000) so remainder will be (2^3) - 1=3 bit(010)

35

International Journal of Computational Intelligence and Information Security, March 2012 Vol. 3, No. 3 Now, the bits occupied by the remainder are discarded and the remaining bits are multiplied with the divisor of the respective blocks. c1 110*10 =1100 c2 1*1000 =1000 c3 010*10 =0100 c4 1*1000 =1000

Now the remainder for each block is added with the result of multiplication c1 1100+1 =1101 c2 1000+110 =1110 c3 0100+1 =0101 c4 1000+010 =1010

Lastly concatenating the resultant blocks we recover the original binary stream S which is: 1101111001011010

4. Analysis
In this algorithm encryption is performed on binary data. All data which is under stable by the computer is finally converted into binary bits. So it can be implemented for any data type encryption process. Such as text encryption, image encryption or sound encryption process. In this algorithm the length of the plain text is not restricted, so it can be applicable for any larger file. For bigger block size more security is achieved and key breaking is practically impossible. Due to that large block size is recommended for increasing complexity and getting more efficient effect. Random number is different for each user. G.C.D. is calculated using the random number so it is difficult for attacker to compute the G.C.D. and hence the divisors. If the random number is very large say for n bit random number 2^n possible number can be generated and from this huge combination of numbers finding the actual random number is much difficult for the attacker. If the bit stream is large then calculating the G.C.D. for two very large numbers is also quite difficult for the cryptanalytic. G.C.D. will be 1 only when the bit length and the random number length are mutually prime numbers. In that case only the greater divisor is taken for dividing all the blocks ignoring the negative divisor to avoid unnecessary calculation complexity Since the flag bit is kept in key it is not known to the attacker which divisor is assigned for which flag and also starting from which flag. When dividend is less than the divisor in that case the division process in encryption technique will not have any reflection as there will be no quotient, the entire dividend bits are treated as the remainder and will be considered as the new block.

5. Conclusion and Future Research


This technique is useful for encrypting and decrypting files using same key by both the users. The key is shared between both the users and kept secret from unauthorized access. 36

International Journal of Computational Intelligence and Information Security, March 2012 Vol. 3, No. 3 This technique can encrypt any size of file as well as, any kind of file, as the technique is implemented in bit level. For bigger block size, more security is achieved and key breaking is practically impossible. Due to that, large block size is recommended for increasing complexity and getting more efficient effect.

References
[1] Prof.(Dr) Pranam Paul, Saurabh Dutta, A.K.Bhattacharjee-Enhancement of Security through an Efficient Substitution based Block Cipher of Bit-level Implementation with Possible Lossless Compression IJCSNS International Journal of Computer Science and Network Security, (VOL.8 No.4, April 2008) [2] Prof. (Dr) Pranam Paul-An Application to ensure Security through Bit-level Encryption IJCSNS International Journal of Computer Science and Network Security, (VOL.9 No.11, November-2009) [3] Prof. (Dr) Pranam Paul-Implementation of Information Security based on Common Division IJCSNS International Journal of Computer Science and Network Security,(VOL.11 No.2, February 2011) [4] John C. Bowman, Math 422 Coding Theory & Cryptography, University of Alberta, Edmonton, Canada. [5] David A. Santos, Linear Algebra Notes, January 2, 2010 Revision, dsantos@ccp.edu. [6] Pranam Paul, Saurabh Dutta, An Enhancement of Information Security Using Substitution of Bits Through Prime Detection in Blocks, Proceedings of National Conference on Recent Trends in Information Systems (ReTIS-06), , Organized by IEEE Gold Affinity Group, IEEE Calcutta Section, Computer Science & Engineering Department, CMATER & SRUVM Project- Jadavpur University and Computer Jagat. July 1415, 2006 [7] Koblitz, N. A Course in Number Theory and Cryptography, 2nd ed. New York: Springer-Verlag, 1994. [8] A. Menezes, P. van Oorschot, and S. Vanstone Handbook of Applied Cryptography, CRC Press, 1996. [9] Mark Adler and Jean-Loup Gailly,An Introduction to Cryptography, released June 8, 2004. www.pgp.com. [10] Prakash Kuppuswamy, Dr.C.Chandrasekar, ENRICHMENT OF SECURITY THROUGH

CRYPTOGRAPHIC PUBLIC KEY ALGORITHM BASED ON BLOCK CIPHER Indian Journal of Computer Science and Engineering (IJCSE), Vol. 2 No. 3 Jun-Jul 2011

37

Das könnte Ihnen auch gefallen