International Journal on Advanced Computer Theory and Engineering (IJACTE)
_______________________________________________________________________________________________
1
2
Dept. of Computer Application, JIS College of Engineering, Kalyani, West Bengal, India 1,2
Email: 1 joyitagoswami@gmail.com, 2 manaspaul@rediffmail.com
Abstract— In this paper a session based bit level symmetric key cryptographic technique has been proposed. It is based on the concept of Doubly Even Order Magic Square and termed as DEOMS. DEOMS considers the plain text as a stream of finite number of binary bits. This binary bit stream is chopped dynamically into manageable-sized blocks. The values of block length of any particular session generate the session key for DEOMS. During encryption the bits of these blocks from LSB to MSB fit row-wise into a square matrix of suitable order 4n where n Є N. Now the positions of the bits are oriented by using the logic of doubly even order magic square of order 4n. The bits are collected from the square matrix row-wise to form the encrypted block and cipher text is generated from this encrypted blocks. For decryption the cipher text is considered as a stream of binary bits. Processing the session key information, this binary stream is split into desired-sized blocks. The binary bits of the block from LSB to MSB fit row-wise into the square matrix of order 4n. The positions of bits are changed by using the logic of doubly even order magic square. Bits are collected row-wise from the square matrix to form the decrypted binary stream and from this stream plain text is regenerated. A comparison of DEOMS with TDES and AES has been done.
Index Terms—AES, DEOMS, Symmetric key cryptography, Session based key, TDES.
Based on symmetric key cryptography a new technique has been proposed where the plain text is considered as a stream of binary bits. Bit positions are shuffled to generate the cipher text. A session key is generated using plain text information. The plain text can be reformed from the cipher text using the session key information.
Section II of this paper deals with the algorithms for encryption, decryption and key generation. Section III explains the proposed technique with an example. Section
IV shows the results and analysis on different files and the comparison of the proposed technique with TDES [6] and
AES [7]. Conclusions are drawn in section V.
A.
Encryption Algorithm:
Step1. The plain text i.e. the input file is considered as a stream of finite number of binary bits.
Step2. This binary stream breaks into manageable-sized blocks with different lengths like 16/64/144/256/
400…….. [ (4n) 2 for n = 1, 2, 3, 4, 5, ……. ] as follows:
Now a days with the global acceptance of the Internet, our communication becomes faster and easier. Every computer is connected virtually to every other through internet. Therefore cryptography becomes a crucial aspect for secure communication to protect important data from eavesdroppers. Hence network security is the most important topic of researchers [1, 2, 3, 4, 5]. Various algorithms are developed in this field but each of them has their own merits and demerits. For this reason continuous research works are going on in this field of cryptography to enhance the network security.
First n
1
no. of bits is considered as x
1
no. of blocks with block length y
1
where n
1
= x
1
* y
1
. Next n
2
no. of bits is considered as x
2
no. of blocks with block length y
2
where n
2
= x
2
* y
2
and so on. If remaining 8 bits are there then the corresponding ASCII value of that character subtracted from 255.
Step3. Square matrix of order √y(=4n) is generated for each block of length y. The bits of the block from LSB to
MSB fit row-wise into this square matrix.
Step4. The bit positions are oriented using the logic of doubly even order magic square of order 4n (nЄN).
_______________________________________________________________________________________________
ISSN (Print): 2319-2526, Volume -3, Issue -4, 2014
16
International Journal on Advanced Computer Theory and Engineering (IJACTE)
_______________________________________________________________________________________________
Step5. From the square matrix bits are taken row-wise to generate the encrypted block of length y.
4.
Fill the diagonal of each 4X4 block with the value of nXn – cij, where cij is the corresponding cell value.
5.
Trace through each row and fill all the cells of the entire
Step6. The cipher text is formed converting the encrypted binary stream into corresponding characters. matrix with zero entries with the corresponding cell value cij.
B.
Decryption Algorithm:
Figure 1(a) shows the original 8X8 matrix where each cell contains respective cell value. Figure 1(b) shows the magic square after orientation of cell values.
Step1. The encrypted file i.e. the cipher text is considered as a stream of binary bits.
Step2. Processing the session key information, this binary stream breaks into desired-sized blocks.
Step3. Square matrix of order √y(=4n) is generated for each block of length y. The bits of the block from LSB to
MSB fit row-wise into this square matrix.
Step4. The bit positions are oriented using the concept of doubly even order magic square of order 4n (nЄN).
Step5. From the square matrix bits are taken row-wise to generate the decrypted block of length y.
Step6. The plain text is regenerated converting the decrypted binary stream into characters.
C.
Generation of session key:
1 2 3 4 5 6 7 8
9 10 11 12 13 14 15 16
17 18 19 20 21 22 23 24
25 26 27 28 29 30 31 32
33 34 35 36 37 38 39 40
41 42 43 44 45 46 47 48
49 50 51 52 53 54 55 56
57 58 59 60 61 62 63 64
64 2
Figure1 (a): Original 8X8 matrix
3 61 60 6 7 57
9 55 54 12 13 51 50 16
17 47 46 20 21 43 42 24
40 26 27 37 36 30 31 33
32 34 35 29 28 38 39 25
41 23 22 44 45 19 18 48
49 15 14 52 53 11 10 56
8 58 59 5 4 62 63 1
DEOMS generates a session key for one time use in a session of transmission to ensure much more security.
This technique divides the input binary bit stream into 16 portions where 1 st portion contains 20% of total file size,
2 nd portion contains 20% of remaining file size and so on.
Each portion is divided into x no. of blocks with block length y bits where value of y is selected dynamically for first fifteen portions. For final portion, value of y is 16.
The file size is even or odd, it is reflected into key file. So the key file contains total 17 characters (first 16 characters for y values and last one for even or odd file size).
Figure1 (b): 8X8 Magic Square
In DEOMS consider the word “Do”. The ASCII value of
‘D’ and ‘o’ are respectively 68(01000100) and
111(01101111).
follows
Binary bits are taken from LSB to MSB.
So the corresponding bits are 00100010 and 11110110 and bit representation of the above word is
0010001011110110. Consider a block of length 16 as
If the file size is even, total length of the input binary stream is ( x
1
* y
1
+ x
The magic square is a special arrangement of sequential numbers in a square matrix where the sum of all elements of each row, each column and each diagonal position is equal. Algorithm of Doubly Even order Magic Square is as follows:
2
* y
2
+ …….. + x
16
* y
16
)
If the file size is odd then total length of the input binary stream is ( x
1
* y
1
+ x
2
* y
2
+ …….. + x
16
* y
16
+ 1 )
1.
Read the value of n, where n is doubly even.
2.
Declare a matrix A of order n X n. Fill all the cells of the matrix with zeros.
3.
Divide the matrix into blocks of size 4X4.
0 0 1 0 0 0 1 0 1 1 1 1 0 1 1 0
Now the bits fit row-wise into a square matrix of order 4
(order 4n with n=1).
0 0 1 0
0 0 1 0
1 1 1 1
0 1 1 0
Applying the logic of doubly even order magic square, the following matrix is formed.
0 0 1 0
0 1 1 0
1 1 0 1
0 1 1 0
Bits are taken row-wise to form the encrypted binary stream.
0 0 1 0 0 1 1 0 1 1 0 1 0 1 1 0
_______________________________________________________________________________________________
ISSN (Print): 2319-2526, Volume -3, Issue -4, 2014
17
International Journal on Advanced Computer Theory and Engineering (IJACTE)
_______________________________________________________________________________________________
The two 8 bit binary are 00100110 and 11010110 . The bits are taken LSB to MSB. So the bit representations are
01100100 and 01101011.Equivalent decimal values are
100 & 107 respectively. Equivalent character of ASCII values 100 and 107 are d and k. So the word “Do” is encrypted as “dk”.
Sl.
No
File type
File size
(Bytes)
Encryption time (in m.sec)
TDES AES DEOMS
18 Doc 43456000 7129 1154
19 Rar 77246022 12698 2060
20 Avi 144161826 23883 3791
1791
2973
5536
The decryption process follows exactly the reverse steps of the above encryption process.
In this section the comparative study between Triple-DES
(168bits), AES (128bits) and DEOMS has done on twenty files of eleven different types with file sizes varying from
50 bytes to 144161826 bytes (137 MB approx.). Results are generated for analysis and comparison of Encryption times, Decryption times, Character frequencies,
Chi-square values, Avalanche values, Strict Avalanche values and Bit Independence values. All implementation has been done using C.
Table 2: Decryption times for TDES, AES and DEOMS
Sl.
No
.
File type
1 Txt
File size
(Bytes)
50
Encryption time (in m.sec)
TDES
0
AES
0
DEOM
S
0
2 Zip
3 Txt
4 Txt
5 Jpg
6 docx
7 Exe
8 Jpg
288
500
2410
5400
12660
21492
50735
0
0
0
0
0
15
15
0
0
0
16
0
0
15
0
1
1
1
1
2
3
A.
Analysis of Encryption and Decryption Times
9 Rar
10 Dll
115595
215416
31
46
15
31
4
9
Time taken is the difference between processor clock ticks at the starting and at the end of execution. All times are in milliseconds. Since the CPU clock ticks taken as time, there might be a slight variation in actual time. This variation is insignificant and may be ignored. Tables 1 and 2 show the encryption and decryption times of different files for Triple-DES (168bits), AES (128bits) and DEOMS.
11 Exe 624128
12 docx 1224413
13 Dll 1409024
14 Jpg
15 Pdf
16 Avi
3588725
4446250
7355928
124
234
265
718
904
1451
62
78
94
202
234
374
25
48
54
138
172
282
Table 1: Encryption times for TDES, AES and DEOMS
17 Rtf 15766836 3105
18 Doc 43456000 8455
19 Rar 77246022 15179
905
2636
4399
607
1669
2969
Sl.
No
File type
1 Txt
2 Zip
3 Txt
4 Txt
5 Jpg
File size
(Bytes)
50
288
500
2410
5400
Encryption time (in m.sec)
TDES AES DEOMS
0 0 0
0 0 0
16
0
15
0
0
0
1
1
1
20 Avi 144161826 28221 8642 5546
Figures 2 and 3 show the graphical representation of the relationship between the encryption times against the file sizes and the decryption times against the file sizes respectively for TDES, AES and DEOMS. In both the figures, the slopes of curves for TDES are higher for larger files.
6 docx
7 Exe
8 Jpg
9 Rar
10 Dll
11 Exe
12660
21492
50735
115595
215416
624128
12 docx 1224413
13 Dll 1409024
14 Jpg 3588725
218
266
592
15 Pdf 4446250 749
16 Avi 7355928 1341
17 Rtf 15766836 2652
47
16
16
31
47
125
31
78
94
125
203
421
16
0
0
0
15
32
47
54
139
171
282
616
4
8
25
1
1
2
Figure 2: Graphical representation of encryption times against file sizes in logarithmic scale
_______________________________________________________________________________________________
ISSN (Print): 2319-2526, Volume -3, Issue -4, 2014
18
International Journal on Advanced Computer Theory and Engineering (IJACTE)
_______________________________________________________________________________________________
Sl.
No.
File type
File size
(Bytes)
TDES
Avalanche values
AES DEOMS
17 rtf 15766836 0.9999599 0.9999154 0.7807098
18 doc 43456000 0.9999373 0.9990591 0.8169609
19 rar
2 zip
77246022 0.9999838 0.9999997 0.8225679
20 avi 144161826 0.9999815 0.9999892 0.8270802
Table 4: Strict Avalanche values for TDES, AES and
DEOMS
Sl.
No.
File type
File size
(Bytes)
Strict Avalanche values
TDES AES DEOMS
1 txt 50 0.9034109 0.9260226 0.7571430
288 0.9441870 0.9723472 0.7600510
Figure 3: Graphical representation of decryption times against file sizes in logarithmic scale
B.
Studies on Avalanche & Strict Avalanche Effects and
Bit Independence Criterion
Avalanche, Strict Avalanche and Bit Independence are cryptographic test methods which measures the degree of security of any cryptographic technique. The bit changes among encrypted bytes for a single bit change in the original message sequence for the entire or a relative large number of bytes. The ratio of calculated standard deviation with expected value gives the Avalanche and
Strict Avalanche values on a 0.0 – 1.0 scale. The values of
Avalanche, Strict Avalanche and Bit Independence closer to 1.0 indicate the high degree of security.
Tables 3, 4 and 5 show the Avalanche values, the Strict
Avalanche values and the Bit Independence values respectively.
3
4
5 txt txt jpg
6 docx
7 exe
8 jpg
500
2410
5400
12660
21492
50735
9 rar
10 dll
11 exe
115595
215416
624128
12 docx 1224413
13 dll 1409024
14 jpg
15 pdf
3588725
4446250
0.9891672
0.9973690
0.9989294
0.9994819
0.9990939
0.9995949
0.9997622
0.9998166
0.9999141
0.9999301
0.9999152
0.9999581
0.9999733
0.9888750
0.9987355
0.9989482
0.9991452 0.8073915
0.9993721 0.7675089
0.9996121
0.9995716
0.9998235
0.9998902
0.7594758
0.7714205
0.8059468
0.8134073
0.8192224
0.8155263
0.8112145
0.9999534 0.8076240
0.9999134 0.8081469
0.9999375 0.8101226
0.9999494 0.8096594
16 avi
17 rtf
7355928 0.9999816 0.9999715 0.8104660
15766836 0.9998281 0.9997352 0.7488975
18 doc 43456000 0.9998442 0.9983014 0.8037453
Table 3: Avalanche values for TDES, AES and DEOMS
Sl.
No.
File type
File size
(Bytes)
1
2
3
4
5 jpg
6 docx
7 exe
8
9 jpg rar
10 dll txt zip txt txt
11 exe 624128
12 docx 1224413
13 dll 1409024
14 jpg
15 pdf
16 avi
3588725
4446250
7355928
50
288
500
2410
5400
12660
21492
50735
115595
215416
TDES
0.9904762
Avalanche values
AES DEOMS
0.9932432 0.8085106
0.9856389
0.9956481
0.9995600
0.9983489 0.7845128
0.9937379 0.7806103
0.9995042 0.7964147
0.9997127
0.9999003
0.9996524
0.9999671
0.9998535
0.9998930
0.9995705 0.8185381
0.9998494 0.8198806
0.9996973 0.7881213
0.9997102 0.8254716
0.9999718 0.8309016
0.9999408 0.8275220
0.9999609
0.9999757
0.9999817
0.9999833
0.9999962
0.9999997
0.9999495 0.8234212
0.9999866 0.8200498
0.9999870 0.8206230
0.9999814 0.8223867
0.9999947 0.8219536
0.9999807 0.8227072
19 rar 77246022 0.9999562 0.9999871 0.8103170
20 avi 144161826 0.9999610 0.9999711 0.8151405
Table 5: Bit Independence values for TDES, AES &
DEOMS
Sl.
No.
File type
File size
(Bytes)
Bit Independence values
TDES AES DEOMS
1 txt 50 0.1564312 0.2597831 0.0013249
2
3 zip txt
288
500
0.3935432 0.3572411 0.3976301
0.4118023 0.3989733 0.2850357
7
8
9
4
5 txt jpg
6 docx exe jpg rar
2410
5400
12660
21492
50735
115595
10 dll
11 exe
215416
624128
12 docx 1224413
13 dll 1409024
0.4800583 0.4839563 0.4483344
0.9711166 0.9752754 0.7765291
0.9756460 0.9720846 0.7839559
0.6336611 0.6097981 0.5115694
0.9975096 0.9977349 0.7979173
0.9977771 0.9973373 0.8060555
0.7533294 0.7545563 0.7068581
0.7460339 0.7403563 0.7133471
0.9908599 0.9909466 0.7907926
0.7254884 0.7295937 0.7142052
_______________________________________________________________________________________________
ISSN (Print): 2319-2526, Volume -3, Issue -4, 2014
19
International Journal on Advanced Computer Theory and Engineering (IJACTE)
_______________________________________________________________________________________________
Sl.
No.
File type
File size
(Bytes)
Bit Independence values
TDES AES DEOMS
14 jpg 3588725 0.9946990 0.9947098 0.7957191
15 pdf 4446250 0.9753161 0.9632789 0.7936873
16 avi
17 rtf
7355928 0.9932553 0.9918710 0.7956589
15766836 0.3735797 0.3389369 0.1861618
18 doc 43456000 0.3403130 0.2207440 0.6668930
19 rar 77246022 0.9997911 0.9996876 0.7963149
20 avi 144161826 0.9884229 0.9878822 0.8008701
Figures 4, 5 and 6 show the pictorial representation of the comparison of results of Avalanche, Strict Avalanche and
Bit Independence values of all files for TDES, AES and
DEOMS. All three values for DEOMS are near to that of for TDES and AES. Results may indicate better security in DEOMS.
Figure 6: Pictorial representation of Bit Independence
C.
values of encrypted bit streams for TDES, AES and
DEOMS
Tests for Non-homogeneity
The test for goodness of fit (Pearson χ 2 ) has been performed between the source files and the encrypted files. The large Chi-Square values (compared with tabulated values) may confirm the high degree of non-homogeneity between the source files and the encrypted files. Table 6 shows the Chi-Square values for
Triple-DES (168bits), AES (128bits) and proposed
DEOMS for the different files.
Table 6: Chi-Square values for TDES, AES and DEOMS
Figure 4: Pictorial representation of Avalanche values of encrypted bit streams for TDES, AES and DEOMS
Figure 5: Pictorial representation of Strict Avalanche values of encrypted bit streams for TDES, AES and
DEOMS
Sl.
No.
File type
File size
(Bytes)
1
2
3 txt zip txt
4
5 txt jpg
6 docx
50
288
500
2410
5400
12660
7 exe
8 jpg
9 rar
21492
50735
115595
10 dll
11 exe
215416
624128
12 docx 1224413
TDES
Chi-Square values
AES DEOMS
114
503
1470
111
529
1546
139
360
2058
24059
936
18333
1044334
1373
1031
530985
2027106
54964
20981
946
9343
481174
1301
1038
473027
34708
682
1033
115662
1180
635
444648
1848171 1989551
55574 56000
13 dll
14 jpg
15 pdf
1409024
3588725
4446250
3219751
78928
413610
3139562 2545317
79292 62640
369563 632642
16 avi
17 rtf
7355928 438208 442887 291669
15766836 6.825E11 6518E11 9.144E11
18 doc 43456000
19 rar 77246022
2.888E8
61298
2.677E8
61037
5.702E8
4216
20 avi 144161826 15912744 15646387 9379247
Figure 7 graphically represents the Chi-Square values on logarithmic scale for T-DES, AES and DEOMS. The
_______________________________________________________________________________________________
ISSN (Print): 2319-2526, Volume -3, Issue -4, 2014
20
International Journal on Advanced Computer Theory and Engineering (IJACTE)
_______________________________________________________________________________________________ calculated Chi-square values are much higher than the tabulated Chi-square values. Figure 7 indicates that the
Chi-Square values of DEOMS are at par with and sometimes better than that of T-DES and AES. It may indicates the security of DEOMS be good and very much comparable with that of the techniques TDES and AES.
Figure 8(b): Graphical representation of the spectrum of frequency distribution of characters for encrypted file using TDES
Figure 7: Chi-Square values for TDES, AES & DEOMS in logarithmic scale
D.
Analysis of Character frequencies
Analysis of Character frequencies for text file (serial number of file is 4) has been performed for T-DES, AES and proposed DEOMS. Figure 8(a) shows the spectrum of frequency distribution of characters in the plain text.
Figures 8(b), 8(c) and 8(d) show the spectrums of frequency distribution of encrypted characters in cipher text using T-DES, AES and DEOMS.
In source files, some characters appear with very high and with very low frequencies and some characters appear with zero frequency. In encrypted files all characters with
ASCII values ranging from 0 to 255 appear with certain frequencies and all these characters are approximately equally distributed over a certain range. Therefore it is very difficult to detect the actual message for a cryptanalyst. Since the frequency spectrum is smoother, so the degree of security of proposed DEOMS is very high and is comparable with that of TDES and AES.
Figure 8(c): Graphical representation of the spectrum of frequency distribution of characters for encrypted file using AES
Figure 8(d): Graphical representation of the spectrum of frequency distribution of characters for encrypted file using DEOMS
Figure 8(a): Graphical representation of the spectrum of frequency distribution of characters for source file
The proposed DEOMS is simple to understand and easy to implement using various high level languages. The performance of DEOMS is quite satisfactory because of high processing speed and the measure of the degree of security is at par with other standard techniques. So
DEOMS is comparable with the standard available techniques and it is applicable to ensure good security in message transmission of any form.
_______________________________________________________________________________________________
ISSN (Print): 2319-2526, Volume -3, Issue -4, 2014
21
International Journal on Advanced Computer Theory and Engineering (IJACTE)
_______________________________________________________________________________________________
[4] V. Gupta, G. Singh and R. Gupta, “Advance cryptography algorithm for improving data
[1] B. K. Mandal, D. Bhattacharyya and S. K.
Bandyopadhyay, “Designing and Performance
Analysis of a Proposed Symmetric Cryptography
Algorithm”, International Conference on
Communication Systems and Network
Technologies (CSNT 2013), 6-8 April 2013,
Gwalior, India, Pages: 453 – 461. security”, International Journal of Advanced research in Computer Science and Software
Engineering, January 2012, Vol. 2 – Issue 1.
[5] S. Som, N. S. Chatergee and J. K. Mandal, “Key
Based Bit Level Genetic Cryptographic Technique
(KBGCT)”, 7th International Conference on
Information Assurance and Security (IAS), 5-8
December 2011, Melaka, Malaysia, Pages:
240-245.
[2] H. Cheng and Q. Ding, ”Overview of the Block
Cipher”, Second International Conference on
Instrumentation, Measurement, Computer,
Communication and Control (IMCCC 2012), 8-10
December 2012, Harbin, China, Pages: 1628 –
1631.
[6] “Triple Data Encryption Standard”, FIPS PUB
46-3 Federal Information Processing Standards
Publication, Reaffirmed, 1999 October 25 U.S.
DEPARTMENT OF COMMERCE/National
Institute of Standards and Technology.
[3] M. Niemiec and L. Machowski, “A new symmetric block cipher based on key-dependent S-boxes”,
4th International Congress on Ultra Modern
Telecommunications and Control Systems and
Workshops (ICUMT 2012), 3-5 October 2012, St.
Petersburg, Russia, Pages: 474 – 478.
[7] “Advanced Encryption Standard”, Federal
Information Processing Standards Publication
197, November 26, 2001.
_______________________________________________________________________________________________
ISSN (Print): 2319-2526, Volume -3, Issue -4, 2014
22