Rajdeep Chakraborty1* and J.K. Mandal2†
1 Department of CSE, Netaji Subhash Engineering College, Kolkata, India
2 Department of CSE, FETM, University of Kalyani, Kalyani, India
Abstract
In this chapter a novel and yet simple cipher is proposed, which is fit for track Cryptography and Computer Science and Statistics Journal. Recursively Paired Arithmetic Technique (RPAT), which is an FPGA-based block cipher simulation and its cryptanalysis, is being done with Pearsonian Chi-Square test for non-homogeneity between plaintext with ciphertext and Avalanche ratio test. This cipher is a bit level cryptography where a source stream is considered into a block and RPAT is applied to get the target stream, this cipher has four different types of encryption/decryption processes. So, TB = RPAT (SB, OP), Target Block (TB) is the output of the function Recursively Paired Arithmetic Technique (RPAT) with input parameters, Source Block (SB) and encryption/decryption Options (OP). This cipher has been implemented in IEEE VHDL and simulated for FPGA in Xilinx ISE 8.1i. A good and comparable cryptanalysis result has been found against widely used RSA and TDES.
Keywords: Avalanche ratio test, pearsonian chi-square test, IEEE VHDL, FPGA, XilinX ISE 8.1i
In this era of information and communication technology the digital security has become inevitable [1, 2, 6]. This proposed cipher provides the primary goal of confidentiality [1, 2], though it is a simple scheme but a good result found against widely used RSA and TDES [1, 2]. Cryptography [1, 2] is of two types, symmetric cipher and asymmetric cipher. Symmetric cipher are those types of cipher where key used is same for both encrypting and decrypting the plaintext and cipher-text, if there are two keys then one can be easily derived from the other. Symmetric cipher has the following advantages over asymmetric:
This proposed cipher has been designed for the implementation in FPGA-based simulation [3, 4] and for this it has been coded in IEEE VHDL [5, 6]. Philosophies behind FPGA-based design are:
So, driven by the motivation to work in this new technology, RPAT, which is an FPGA-based symmetric cryptography [1, 2], has been proposed.
Section 6.2 describes RPAT and Session Key generation, Section 6.3 illustrates the implementation details, Section 6.4 does the cryptanalysis, Section 6.5 illustrates simulation based results, Section 6.6 points out some application issues, and Section 6.7 draws the conclusion.
The plaintext to be transmitted is divided and mapped into blocks and RPAT is used to get cipher-text after encryption, same RPAT is used in ciphertext-text for decryption. Figure 6.1 shows the RPAT encryption and decryption, for encryption xor and modulo 2n/2 are the operations and for decryption xor and modulo 2n/2 subtraction are the operations. In the following paragraphs we will discuss the RPAT encryption process. The RPAT has two types of iterations, first is the xor iterations and then the modulo 2n/2 addition iterations.
Consider a block, which is source [7, 8],
Now, S00 is exored with S01 and the resultant will be S11, then S11 is exored with S02 and the resultant will be S12. Similarly this process will be performed for all the bits of n-bit block (0 to n − 1). This whole process is the first iteration. Here it will be noted that Sij is the representation, where “i” is the resultant bit-number after “ith” operation of the whole RPAT encryption/decryption processes, where “j” is the “jth” number of bit in the n-bit block of stream and it is from 0 to n − 1.
This same xor operation is performed “m” number of times, by observing the figure these xor operations are performed from 0 to m − 1.
After that the whole n-bits are broken down into two parts of n/2 bits each. These two blocks are now added with modulo 2n/2 add operation. The resultant is replacing the second block. This is the iteration number “m”.
These addition operations are now performed “l − m” number of times. Moreover, the total iteration of this proposed cipher, RPAT, is “l”. So, by observing the figure we can see that the encryption iterations are from 0 to l − 1. Therefore we can say that the total iterations of this cipher, RPAT, is “l” times and where first “m” times are of xor operations and the remaining times are of modulo 2n/2 addition. The following paragraphs will describe the decryption operation.
The decryption operation will follow these points:
Section 6.2.1 will illustrate an example, Section 6.2.2 will give the four types of options available in this proposed cipher, RPAT, and Section 6.2.3 discuss session key generation process.
Figure 6.2 illustrates RPAT encryption process. In this example the Source Block, SB = 10011010, an 8-bit block is considered. Then three iterations of XOR is performed, we get the sub-stream as, S = 11011010. Then two iterations of modulo 16 addition is performed. So, we get the encrypted block, that is Target block, TB = 11010000.
For decryption following points are to be considered:
This technique has four options. These options are given pictorially in Figure 6.3. The options are discussed as follows:
An 130-bit secret/session [1, 2] key is proposed, the key generation is one of the important part of any cipher, symmetric and asymmetric key cipher. In symmetric cipher keys are used for encryption and decrypting, in fact the same.
Table 6.1 illustrates the generation of 130-bit key [1, 2]. Here the plaintext file is encrypted using some block sizes 13-times. Say, in the first iteration block size is 128-bit and encrypted using the first option, in the second iteration block size is 112-bit and encrypted using the third option and so on. In the table this block sizes are considered in 8-bit length and options are coded in 2-bit length.
Table 6.1 Generation of secret key.
Iteration number | Formation of 130-bit secret key | |||
Decimal | Binary | |||
Block size | Option | Block size | Option | |
01 | 128 | 1st | 10000000 | 00 |
02 | 120 | 3rd | 01111000 | 10 |
03 | 112 | 2nd | 01110000 | 01 |
04 | 100 | 2nd | 01100100 | 01 |
05 | 64 | 1st | 01000000 | 00 |
06 | 60 | 4th | 00111100 | 11 |
07 | 32 | 2nd | 00100000 | 01 |
08 | 30 | 3rd | 00011110 | 10 |
09 | 16 | 4th | 00010000 | 11 |
10 | 10 | 1st | 00001010 | 00 |
11 | 8 | 3rd | 00001000 | 10 |
12 | 4 | 2nd | 00000100 | 01 |
13 | 2 | 1st | 00000010 | 00 |
So, in each iteration we get 10-bit code. Assembling all these 13 iterations we will get 130-bit secret/session key. All these values, block sizes and chosen options, are absolutely random.
These values may change from session to session and therefore in each session we will get unique 130-bit secret key for each session. Here, from this table we get the 130-bit session key as:
K=10000000000111100010011100000101100100010100000000001111 0011001000000100011110100001000011000010100000001000100000010 0010000001000.
This proposed cipher has been implemented in IEEE VHDL using 64-bit block size. The block-size can be increased just by increasing the size of bit_vector type [5] variables, signals, and ports from 63 down to 0 to n − 1 down to 0 where “n” is the block size. The modular design approach is taken while coding this cipher. Figure 6.4 shows the top-level simulation of RPAT. The main features of the implementation are given below:
The rest of the coding is done by defining the package which contains functions and procedures. The functions and procedures which are used to realize and simulate RPAT are noted below:
Therefore, by using the modular design approach and behavioral approach this proposed cipher has been successfully realized and simulated in IEEE VHDL using XilinX ISE 8.1i. To perform the cryptanalysis, RPAT has also been coded in C-programming language through Cipher Block Chaining (CBC) mode [1, 2].
Recursively Paired Arithmetic Technique (RPAT) is simple bit-level cryptography. So, all the cryptographic parameters may not be incorporated. In this section emphasis is given on Chi-Square test based cryptanalysis. It is a statistical measure that how far plaintext differs with ciphertext, in another word it is a test for heterogeneity or non-homogeneity.
Pearsonian Chi-Square generation test [7, 8], also known as the Chi-Square fitness test or Chi-Square independence.
where O is the Observed Frequency in groups of category
The steps in calculating the Chi-Square test value, summarized as below:
To perform Chi-Square test ten different files are selected, then these source files are encrypted with Conical Cipher, RSA and TDES, respectively. Then using Chi-Square test program these values are noted.
Text files (TXT), data file (XLS), image file (JPG), and video file (WMV) have been chosen for cryptanalysis as people used to send data/information using these files and our primary aim is to provide confidentiality.
Moreover, these source files are chosen in increasing file sizes, in categories of tiny (0–10 kilobytes), small (10–100 kilobytes), medium (100 kilo–bytes to 1 megabytes), large (1–16 megabytes), and huge (>16 megabytes) file types.
Table 6.2 gives the Chi-Square values of RPAT, RSA, and TDES. Figure 6.5 illustrates the same graphically in logarithm base 10 scale. Therefore, by observing table and graph we can say that Chi-Square values of this proposed cipher, RPAT, is greater than that of RSA, but, with respect to TDES, 50% of the source files encrypted with RPAT have greater Chi-Square values.
Table 6.2 Cryptanalysis of RPAT.
File name | Size in KB | Chi-Square values | ||
RPAT | RSA | TDES | ||
Version.txt | 1 | 66 | 55 | 62 |
Ukraine.txt | 5 | 99994 | 75194 | 118879 |
Content.txt | 10 | 483321 | 454996 | 460630 |
Removdrv.txt | 21 | 681325 | 662409 | 797476 |
PropList.txt | 53 | 633312 | 633725 | 640814 |
Python_25_License.txt | 101 | 6841343 | 6711218 | 7428782 |
Result_analysis_ IT_ODD_2011.xls | 286 | 1066115 | 608316 | 984520 |
Metconv.txt | 1156 | 2831418 | 2786042 | 2817232 |
Photo0139.jpg | 1272 | 87889 | 83015 | 84719 |
Wildlife.wmv | 25631 | 956816 | 951329 | 953431 |
Table 6.3 Simulation based results.
Calculated device utilization summary (estimated values) | |||
Logic utilization | Used | Available | Utilization |
Number of slices | 782 | 960 | 81% |
Number of 4 input LUTs | 1369 | 1920 | 71% |
Number of bonded IOBs | 131 | 66 | 198% |
Table 6.3 illustrates the simulation based results. Number of slices used in this proposed cipher, RPAT, is 782 out of 960 which 81%. Number of 4-input Look-Up-Tables used is 1369 out of 1920 and it is 71%. Number of Input Output Blocks is 131 that means two IOBs are required for the implementation of this proposed cipher, RPAT. Therefore, it is proved in this section that this proposed cipher, RPAT, is successfully simulated for FPGA-based systems.
Some of the applications of RPAT are listed below:
Therefore in this chapter we have successfully proposed and simulated a 64-bit block cipher. Its cryptanalysis with RSA and TDES using Chi-Square values yields good and comparable result. This cipher, RPAT, is more heterogeneous than that of RSA and TDES. Moreover, by simulation based results we got this cipher occupying almost all resources than that of available resources, thus we can say here that RPAT will have effective throughput time and design area. Keeping in view of these outcomes we can now use RPAT in various applications.
The authors express their deepest gratitude toward the Department of Computer Science and Engineering (CSE), Netaji Subhash Engineering College, Kolkata, India, and the Department of Computer Science and Engineering (CSE), University of Kalyani, Kalyani, India.
18.117.184.189