You are on page 1of 5

2008 International Conference on Advanced Computer Theory and Engineering

Session Key Based Manipulated Iteration Encryption Technique (SKBMIET)

Subhranil Som Dipanjan Mitra Jhilom Haldar


Department of Computer Netcraft Techno Solutions Netcraft Techno Solutions
Application, JIS College of Pvt. Ltd., Kolkata, West Pvt. Ltd., Kolkata, West
Engineering, Kalyani, Bengal, India Bengal, India
West Bengal, India e-mail: e-mail:
e-mail: dipanjan.jis@gmail.com jhilom.jis@gmail.com
subhranil.som@gmail.com

Abstract made our communication faster and easier. So at this


point of time maintaining of secrecy and security of
In this paper a session key based encryption system information has become necessity [1, 2, 3, 4].
has been proposed and termed as “Session Key Based Therefore many researchers are working in the field of
Manipulated Iteration Encryption Technique encryption. Encryption process makes the document
(SKBMIET)”. A Key is created from the input. into cipher text, which will not be legible to others.
Generating different randomized Matrices forms the Many algorithms are available, but each of them has
Key. The value of the generated is manipulated with merits and demerits. No single algorithm is sufficient
the individual ASCII values of the plain text. After for this application. As a result researchers are
completion of this process all the different resultant working in the field of cryptography to enhance the
ASCII values will be further converted into their security further.
corresponding binary values. Then a block of stream In this paper a new technique has been
of bits (n) is taken as input, which is variable. The proposed, where the source message is considered as a
encryption process is operated on this binary block of stream of binary bits where the minimum block size is
different size, which is multiple of 64 bits. The block 64 bits. The block division process intends to generate
division process intends to generate the bigger blocks the bigger blocks more than the smaller blocks;
more than the smaller blocks; therefore, the total therefore, the total block-number remains within
block-number remains within certain limit. The binary certain limit. The binary string of source is padded
string of source is padded with zero (0) at the end till with zero (0) at the end till the stream-size meets the
the stream-size meets the nearest multiple of 64bits. nearest multiple of 64bits. The information about the
For the purpose of encryption rotate the block in right number of padded bits is sent to the receiver [6, 7, 8,
and left direction and make a group of two bits each 9]. The technique has been implemented using C++
and swapped with the group of last two bits. Make a language.
group of four bits each and swapped with the group of Section 2 of the paper is discussed about the Key
last four bits. Further repeat the same process by Generation, Section 3 for proposed scheme with block
taking 8, 16 and 32 bits in a group depending on the diagram. Section 4 shows the results of some
block size. Divide the newly arranged block into right implementation on files with analysis about the
and left parts of equal bits. Rotate left part one bit-left proposed technique. Section 5 analyze the character
wise and Rotate-right part one bit-right wise. Rotate frequencies and Section 6 is discussed the test for
the total block in either direction to get the cipher text. Non-Homogeneity. Conclusions and references are
Keywords - Plaintext, Cipher text, Encryption, Block, drawn in Section 7 & 8 respectively.
Decryption, Key, Matrix, ASCII.
2. The key generation
1. Introduction
1. The 8-16 character long input will generate the
In the age of science and technology every key.
body is using Internet in their daily life. Internet has

978-0-7695-3489-3/08 $25.00 © 2008 IEEE 694


DOI 10.1109/ICACTE.2008.179
2. If the number of characters is less than 16 then swapped with the group of last two bits i.e. 1st and 2nd
randomly generate rest of the characters and with 63rd and 64th, 3rd and 4th with 61st and 62nd, 5th
convert them into their ASCII and fill it, to and 6th with 59th and 60th respectively till 31st and 32nd
bit will be swapped with 33rd and 34th bit. Make a
generate 4 x 4 matrix. Otherwise convert each
group of four bits each and swapped with the group of
and every character into its ASCII value to last four bits i.e. 1st,2nd ,3rd,4th with 61st,62nd,63rd,64th
generate 4X4 matrix (Matrix1) and 5th,6th,7th,8th with 57th,58th,59th,60th respectively till
3. The highest & the lowest value are selected from 29th,30th,31st,32nd with 33rd,34th,35th,36th will be
Matrix1 and add these two values (X). swapped. Further repeat the same process but taking 8,
4. Another 4 x 4 matrix is created (Matrix2) by 16 and 32 bits in a group [11]. Divide the newly
subtracting each value of Matrix1 by X (X - arranged block into right and left parts of 32 bits each.
Rotate left part one bit-left wise and Rotate-right part
Matrix1 = Matrix2).
one bit-right wise block in both direction [11] and the
5. Matrix3 will be prepared by dividing each and Cipher text is created. This Cipher text and Key can be
every element of Matrix1 and Matrix 2. delivered to the Receiver.
6. Matrix2 & Matrix3 are added and stored in a
new 4 x 4 Matrix (Matrix4). 3.2 Decryption
Elements of Matrix4 will be converted into
characters and generate a string. Generated string will From the Key all characters convert to their
be the Key. respective ASCII values and generate another Matrix,
which will be same as Matrix4. After creating that
3. The scheme Matrix the cipher text will be converted into its
respective Binary values. Then send the Block of bits
3.1 Encryption simultaneously taken from the cipher text to run the
Process 2 in reverse direction. After getting data from
Input stream will be converted into their respective reverse process 2 Matrix’s elements will be subtracted
ASCII to start the process of encryption. There are from it. The newly generated Decrypted text is same
two processes under the Encryption. as the input stream which will be the plain text.

Process 1: 3.3 Example


Each and every ASCII value of input stream will be
added with the Matrix4’s element one by one and For example input is ‘DIPANJANJHILOM’. The
generate another string. ASCII will be 69 73 80 65 78 74 65 78 74 72 73 76 79
Process 2: 77
Each value of the generated string will be converted So the 4X4 Matrix will be created like that
into its respective binary values. Then the Block of
binary bits string is taken as a source that is to be 69 73 80 65
encrypted. From the source determines the number of 78 74 65 78
blocks for each block-size. The minimum block size is 74 72 73 76
of 64 bits. The block division process intends to 79 77 ? ?
generate the bigger blocks more than the smaller
blocks; therefore, the total block-number remains
Here two spaces are empty. So the remaining two
within certain limit. The binary string of source is
spaces will be filled up with randomly 1 to Maximum
padded with zero (0) at the end till the stream-size
number of matrix element (80). Suppose two
meets the nearest multiple of 64bits. The information
randomly generated numbers are 20 & 52. Now
about the number of padded bits is sent to the receiver
Matrix1 will be created like
[11].
Matrix1
For the purpose of encryption a block has
69 73 80 65
been taken and processed through certain techniques.
78 74 65 78
say for example if the 64 bits block has been taken
74 72 73 76
then rotate the block in either (i.e. Right or Left)
79 77 20 52
direction and make a group of two bits each and

695
Addition of numbers 80 (Maximum number) and 20 For example an operation on 16 bits has been
(Minimum number) is 100. Element of Matrix1 will displayed
be subtracted from 100 & create Matrix 2 0100010001001010
0 1 0 0 0 1 0 0 0 1 0 0 1 0 10
Matrix2

31 27 20 35
22 26 35 22
26 28 27 24
21 23 80 48 0101001000100010
0101001000100010
Each element of Matrix1 will be divided by each 01 01 00 10 00 10 00 10
element of Matrix2 & take integer part to create
Matrix3

Matrix3
2 2 4 1
3 2 1 3 10 00 10 00 10 00 01 01
2 2 2 3 1000100010000101
3 3 0 1 1000 1000 1000 0101

Matrix2 and Matrix3 will be added with each other &


will create Matrix4.

Matrix 2 Matrix3 Matrix4 0101 1000 1000 1000


0101100010001000
31 27 20 35 2 2 4 1 33 30 22 38 01011000 10001000
22 26 35 22 + 3 2 1 3 = 24 28 37 25
26 28 27 24 2 2 2 3 30 29 29 80
21 23 80 48 3 3 0 1 22 26 83 49
10001000 01011000
This matrix will be converted into corresponding 1000100001011000
characters to generate a string. That will be the 10001000 01101000
processed Key.

Encryption: -
If the input stream is “Don’t waste time”. The ASCII
of this stream is
68 111 110 39 116 32 119 97 115 116 101 32 0001 0001 0001 1010
116 105 109 101 0001000100011010
0001000100011010
Process 1:
The converted ASCII Elements of the Key are 33, 30,
22, 38, 24, 28, 37, 25, 30, 29, 29, 80, 22, 26, 83, 49.
The Encryption process will be execute like 33+68,
30+111, 22+110, 38+39, 24+116, 28+32, 37+119, 0101100010001000
49+101. 0101100010001000

Process 2: 4. Results and analysis


After Process1 the total string will be converted into
their respective binary values. For example if we take
In this section the implementation of different
16 bits then the value will be 0100010001001010.
types of files are presented. The text, executable and
dynamic link libraries files are taken for experiments.

696
This implementation has been done using high-level
language. Due to page restriction we have given only
Study on DLL files.

4.2 Study on DLL Files


Time analysis has been done for dynamic link
libraries (dll). Fifteen files of different sizes are taken
for consideration. Table 1 and Table 2 shows the
encryption/decryption time taken for proposed Figure 1
SKBMIET, T-DES and RSA techniques. It is seen for Encryption / Decryption time for SKBMIET,
the table that time to encrypt/decrypt files in RSA/T- RSA & T-DES for DLL files
DES is much higher than proposed SKBMIET
technique. The pictorial effect of the same is shown in
figure 1.
5. Analysis of Character Frequencies
Table 1
File Size v/s Encryption time, DLL files (for Distributions of character frequencies are
SKBMIET, RSA and T-DES algorithm) analyzed for text file for the proposed SKBMIET,
RSA and T-DES algorithms. Figure 2 shows the
Source file Source Encryption time (second) pictorial representation of distribution of character
name file size T- frequencies for different techniques. Figure 2a shows
RSA SKBMIET
(*.DLL) (in bytes) DES the distribution of characters in the source file
dfrgres.dll 51,200 ~0 5 ~0 ‘noise.txt‘. Figure 2b and 2c show the distribution of
cssqchk.dll 73,728 ~0 7 ~0
characters in encrypted files both for T-DES and RSA
atxprsxy.dll 101,888 ~0 10 ~0
ylogin.dll 128,216 ~0 13 ~0 respectively. Figure 2d gives the distribution of
msgint.dll 151,583 ~0 14 ~0 characters in encrypted file using SKBMIET. Its seen
vcdmenu.dll 180,288 1 18 ~0 from the picture that in case of RSA the distribution of
script.dll 202,752 1 20 ~0 characters in encrypted file is concentrated a small
swg.dll 256,440 1 25 0.1 region whereas both for T-DES and proposed
slbcsp.dll 306,176 1 30 0.3
wmadmod.dl 408,064 1 40 0.5
technique SKBMIET frequencies of encrypted file are
mapi.dll 520,128 1 51 0.8 distributed once the complete spectrum of characters.
vqfdeclib.dll 667,648 1 66 1 From this observation it may be conclude that the
dbgeng.dll 847,872 2 84 1.5 proposed technique may obtain good security.
mtb40bas.dll 1,017,248 3 101 1.8
vcmmgr.dll 2,019,328 5 203 3

Table2
File Size v/s Decryption time, DLL files (for
SKBMIET, RSA and T-DES algorithm)
Source file Source Decryption time (second)
name file size T-
RSA SKBMIET Figure 2a: Distribution of characters in source file
(*.DLL) (in bytes) DES
dfrgres.dll 51,200 ~0 5 ~0
cssqchk.dll 73,728 ~0 7 ~0
atxprsxy.dll 101,888 ~0 10 ~0
ylogin.dll 128,216 ~0 12 ~0
msgint.dll 151,583 ~0 14 ~0
vcdmenu.dll 180,288 1 18 ~0
script.dll 202,752 1 20 ~0
Figure 2b: Distribution of characters in RSA
swg.dll 256,440 1 25 0.1
slbcsp.dll 306,176 1 30 0.2
wmadmod.dl 408,064 1 40 0.6
mapi.dll 520,128 1 51 0.9
vqfdeclib.dll 667,648 2 66 1
dbgeng.dll 847,872 2 85 1.5
mtb40bas.dll 1,017,248 2 101 1.8
vcmmgr.dll 2,019,328 5 204 2.9
Figure 2c: Distribution of characters in T-DES

697
Figure 3:
Chi-Square Values for SKBMIET, T-DES & RSA

7. Conclusion
Figure 2d: Distribution of characters in SKBMIET
Figure 2: The proposed technique presented in this paper is
Frequency distribution graph of the file ‘noise.txt’ for simple, easy to implement. The performance of the
SKBMIET, T-DES and RSA as the source file system increases with the varying block-size. Prior to
the communication of the confidential message, the
maximum and minimum block-size and the block-
6. Tests for Non-Homogeneity division algorithm must be exchanged between the
sender and receiver side. The algorithm produces a
The well accepted parametric test has been good competitive Chi-Square values and wide
performed to test the non-homogeneity between frequency distribution in its preliminary testing part
source and encrypted files. The large Chi-Square while comparing with the RSA and T-DES system.
values may conform the heterogeneity of the source Cascading of the technique with variable block sizes
and the encrypted files [11]. Text files are taken for and session key may increase the security further.
experiment. The Chi-Square test has been performed
using source file and encrypted files for SKBMIET
technique and existing RSA and TDES techniques.
8. References
Table 3 shows the values of Chi-Square for different
[1] J.K. Mandal, S. Dutta, “A Universal Bit-Level
file sizes, which show that the value of Chi-Square Encryption Technique, 7th State Science and
mostly increasing as file the size increases. Ten files Technology Congress, Jadavpur University, February
of different sizes are taken. Further the high chi- 2000.
square values may ensure the non- homogeneity [2] S. Mal, J.K. Mandal , S. Chatterjee, S. Sinha, “A
between source and encrypted files. In all three cases Microprocessor Based Encoder Through Transposition
of implementation a good degree of non-homogeneity of bits”, Proceeding of the International Symposiumon
observed. From table 3 it is clear that in some cases Information: Emerging trends, IIT ,Allahabad, 19-21
better chi-square values are obtained compared to T- September,2003,pp 17-27.
[3] S. Mal, J.K. Mandal , S. Dutta, “A 256-Bit Recursive
DES. So it may be inferred that proposed SKBMIET
Pair Parity Encoder for encryption”, accepted for
technique may ensure optimal security in transmission. publication in AMSE Journal, France 2003.
The pictorial representations of chi-square values are [4] W. Stallings, “Cryptography and Network Security:
given in figure 3. Principles and Practices”. Pearson Education, 2004.
Table 3 [5] A. Menezes, P. Van Oorschot, S. Vanstone, “Handbook
Chi-Square Values of Applied Cryptography”, CRC Press 1996.
File Name RSA TDES SKBMIET [6] Simon Singh, “The Code Book”, 4th Estate.
ils.txt 2038.374 1922.287 1992.6432 [7] Kanetkar, “Let Us C”, BPB Publication, 4th Edition,
leesmy.txt 3984.8607 3814.2818 3903.2875 2002.
ukrain.txt 8935.8820 8956.6987 8555.8843 [8] Y. Kanetkar, “C Projects” BPB Publications, 2002.
cp1257.txt 18132.3847 17449.9907 17880.3742 [9] E. Balagurusamy, “Programming in ANSI C”, TATA
roman.txt 27437.2854 25790.1278 26365.3506 McGraw HILL, Second Edition, 2001.
corpchar.txt 36220.3704 34413.9289 35174.4786
[10] Ankit Fadia, “Network Security”, MACMILLAN
oemeula.txt 44187.7863 41665.7520 42492.5293
Publications, 2007.
incidia.txt 52680.738 49729.6400 50567.3143
reedme.txt 61404.1060 57999.7515 59025.5998 [11] Subhranil Som, Dipanjan Mitra, Jhilam Haldar,
schedule.txt 62525.2805 58604.5273 60038.3182 “Secure-Bit Rotate and Swapped Encryption Technique
(SBRSET)”, National Conference on Trend in Modern
Engineering System (IConTiMES 2008), JIS College of
Engineering, Feb. 2008.

698

You might also like