Proposal for Scrambled Method Based on Ntru

—Scrambling is widely used to protect the security of data files such as text, image, video or audio files; however, it is not the most efficient method to protect the security of the data files. This article uses NTRU public key cryptosystem to increase the robustness of scrambling of sound files. In this work, we convert the sound file into text, and then scramble it in the following way: first, we encrypt the header of the sound file then, scramble the data of the file after the header in three stages. In each stage we scramble the data of the sound file and keep the original order of data in an array then, the three arrays are encrypted by the sender and sent with the encrypted header to the receiver in one file, while the scrambled data of the sound file is sent to the receiver in another file. We have tested the proposed method on several sound files; the results show that the time of encryption and decryption is reduced to approximately one-third, or less, compared to encrypting the file using NTRU.


INTRODUCTION
One of the classical encryption ciphers is transposition cipher.In transposition cipher, symbols of plaintext remain the same, but their original sequence is changed in a systematic way.Transposition ciphers are widely used before computer age.With the advent of technology the researchers have invented more complex ciphers like NTRU, which is a relatively new public key cryptosystem.NTRU was developed by three mathematicians J. Hoffstien, J. H. Silverman and J. Piper at the rump session of crypto in 1996.[1] NTRU (Nth degree truncated polynomial ring units) is the first secure public key cryptosystem not based on factorization or discrete logarithm problems.[2] It is a lattice-based public key cryptosystem; its security comes from the interaction of the polynomial mixing system with the independence of reduction modulo to relatively prime numbers.[3] The basic idea of NTRU is finding the shortest vector problem in a lattice.The base of NTRU operations are objects in a truncated polynomial ring R=z[x]/(xN-1) with convolution multiplication and all polynomials in the ring have integer coefficients and degree at most N-1. a = a0 + a1x + a2x2 + … + aN-2xN-2 + aN-1xN-1.[4]The main characteristic is that the polynomial multiplication is the most complex operation that is much faster than other asymmetric cryptosystems such as RSA, ElGamal and Elliptic curve cryptography.[5] In this paper we introduce a new transposition (scrambling) method with the assistance of NTRU algorithm.In our method sound files will pass through more than one stage of scrambling.The result is a more complex permutation that is not easily reconstructed thus the sound files become significantly much more secure.[6] II.RELATED WORK Sadiq, Hussein and Khoja proposed two methods to enhance the NTRU algorithm which they have used for encrypting sound files after converting the sound into text.In the proposed methods the message is encrypted one character at a time.Since NTRU encrypts only prime numbers, only the first 7 bits of each character are encrypted.In method I NTRU algorithm is enhanced by adding the result obtained from calculating a mathematical equation of one variable to the message and then the resulted encrypted bit is fed-back and added to the next bit of the message in the next step; this procedure is repeated for the subsequent bits of the message.In method II NTRU algorithm is enhanced by adding the subsequent states of LFSR (Linear Feedback Shift Register) to the subsequent bytes of the message.The proposed methods are tested on several sound files; the results show that the proposed methods maintain approximately the same original method encryption and decryption time while generating a more complex encryption.[7] Jaspreet Kaur and Er.Kanwal Preet Singh [8] used three different kinds of algorithms NTRU, RSA and RINGDAEL for speech encryption and decryption by first converting the speech into text, and then the text is converted into cipher text.The performance is analyzed for these three algorithms respectively.The parameters calculated are encryption, decryption, delay time, complexity, packets lost and security levels.In these three algorithms, encryption decryption and delay time are varying according to the number of bits per second.On the other hand, complexity and packets lost are approximately the same.There are no packets lost during transmitting and receiving the data.Also Jaspreet Kaur and Er.Kanwal Preet Singh [9] used three different kinds of techniques i.e.MD-5, SHA-2 and RINGDAEL for speech encryption, where the speech is first converted into text then the text is converted into cipher text.At the end, the performances of these three techniques are analyzed, respectively.

A. Prameters
NTRU depends on 3 integer parameter (N, p, q), where N is a prime integer, p and q are relatively prime integers and q is larger than p. [10] www.ijacsa.thesai.org

B. Key Generation
To generate the public key, two random polynomials f and g are chosen in the ring R with the restriction that their coefficients are small, usually in {-1, 0, 1}.Another symbol is imported here: L(d1, d2), which means a set of polynomials with d1 coefficients are 1, d2 coefficients are -1 and the rest are 0. f usually chosen from Lf (df, df-1) and g from Lg (dg, dg).Then fp (the inverse of f modulo p) and fq (the inverse of f modulo q) are computed with the property that: f*fp=1(mod p) and f*fq=1(mod q).If f doesn't have inverses, another f should be chosen.The pair of polynomials f and fp should be kept as the private key and the public key h can be computed by h = p * fq * g (mod q).[11]

C. Encryption
The plaintext m is a polynomial with coefficients taken mod p.A random polynomial r is chosen with small coefficients.The cipher text is e = r * h + m (mod q).[12]

D. Decryption
To decrypt e, the polynomial a is computed first a = f * e (mod q) The coefficients of a must be chosen from the interval [q/2, q/2].Then the original message can be computed by m = fq * a (mod q).[10] IV.THE PROPOSED METHOD In this method the sender and receiver agree upon four steps of scrambling to the sound, according to random arrays that will be generated and encrypted by the sender and sent to the receiver in a metadata file.The sender then sends highly scrambled sound file to the receiver.This scrambling hides all the information in the file and makes it very difficult to predict and or discover without needing to NTRU encrypting the metadata file.
The sender starts the encryption process by encrypting the header of the sound file and writes it as the first part of the metadata file.
The sound file is split into a number of segments.The segment length (abbreviated SL) indicates the number of bytes in one segment.This length is chosen by the sender and it can vary due to the application and the size of the sound file.SL is encrypted and written to the metadata file.
Then the sender uses the proposed method to start the first step of scrambling the generated segments, which consists of dividing the segments of the file into parts (namely "Data Blocks", DB).The number of data blocks is encrypted using NTRU and written to the metadata file.Data blocks are then scrambled among themselves in a random way, to follow the order of a random array (namely, "Pointers to Data Block", PTDB) which has a length equal to the number of the data blocks; where the indexes of this array are indicators to the new order of the data blocks and the values of this array are used as indicators to the original order of the data block.This array is encrypted using NTRU and written to the metadata file.
Blocks will now be processed one at a time.The length of data blocks (abbreviated LDB) varies and is chosen randomly at run time to hide it.LDB for each data block is encrypted using NTRU and written to the metadata file.
The block size is chosen to satisfy a maximum value restriction to reduce the number of multiplications for both the encryption and the decryption operations as well as to decreases the size of the resulting encrypted file.The block size should also satisfy a minimum, as a very small DB cannot ensure enough scrambling.These maximum and minimum lengths are specified by the sender.
The second step of scrambling is applied to segments inside each data block among themselves to follow the order of a random array (namely "Pointers to Segments", PTS) which has a length equal to the number of segments in that data block, where the indexes of this array are indicators to the new order of segments inside the data block and the values of this array are used as indicators to the original order of segments within the data block.These arrays (one per data block) are encrypted using NTRU and written to the metadata file.
The third step of this method requires that, for each data block, the bytes inside each segment be scrambled among themselves according to a random array (namely," Pointers to Bytes within segment", PTB), which has a length equal to the number of bytes in the segment (SL).Where the indices of this array are indicators to the new order of bytes inside each segment and the values of this array are used as indicators to the original order of segments within the data block.The method uses the same scrambling (i.e. the same PTB) for all segments within one data block.Thus, only one PTB is required per data block.PTB are encrypted using NTRU and are written to the metadata file.
The highly scrambled sound data is written to a data file one byte from each segment at a time according to PTS array Finally, the sender sends to the receiver the two generated files which are: the data file containing the scrambled sound data and the metadata file which contain the encrypted information.
Example: a very small size sound file of 74 bytes is used in this example to illustrate the proposed method.The ASCII of data inside the file after the header is "34 56 128  The encryption process begins by encrypting the first 44 bytes, the header of the sound file using NTRU, then the four steps of scrambling are applied to the rest of the file, (the remaining 30 bytes of data).According to the method the file is divided into three data block, with the first block containing 3 segments, the second block containing 5 segments, and the last block containing 2 segments as illustrated in fig.
(1) www.ijacsa.thesai.orgThen the four stages of scrambling are applied as follows: In the first step the order of the data block is changed where the second data block becomes the first, third data block becomes second and first data block becomes third, PTDB = [2, 3, 1], is used.This step is illustrated in fig.(2).
The second step in data scrambling changes the order of segments within each data block according to the block's PTS arrays as illustrated in fig.(3).
3) For the third Data Block, the PTS 3 is [2,1].The third step of data scrambling changes the order of bytes within data segments as shown in fig.( 4), (PTBs), which was randomly created to be: The fourth and last scrambling step is write to the resulted data file one byte form each segment at time and with accordance to the block's PTB, i.e. for data block one with PTB = [2, 3, 1], the second bytes from all segments in that block are written first, then the third bytes from all the segments in that block are written, lastly the first bytes from all segments are written to the file.This step is shown in fig.(5), while the contents of the metadata file is shown in fig.(6)

V. EXPERIMENTAL RESULTS
In this work we convert the sound file into text; we can apply this method to any sound file after storing it in a text editor.This method is applied to the original NTRU algorithm [13,14] (namely original method) and the proposed method.
We convert the sound file into text via ISO-8859-1: 8-bit single-byte coded graphic character sets -Part 1: Latin alphabet No. 1, is part of the ISO/IEC 8859 series of ASCII-based standard character encodings, which is intended for "Western European" languages [15].
We test the original and proposed methods on 25 wave sound files of sizes ranging from 10 KB to 1MB.The encryption and decryption time in seconds is computed for each one of the 25 files 25 times, and then average of computation is taken to enhance the accuracy of the computation.

VI. CONCLUSIONS AND FUTURE WORK
The proposed method scrambles the sound file in a complex and efficient manner while reducing the time of encryption and decryption depending on SL.When SL equals 8, the time is reduced to approximately one-third of the time needed to encrypt and decrypt the same data using NTRU encryption method.Increasing SL to 12 and 16 had an effect of decreasing the time of encryption and decryption (up to 80% of the original encryption and decryption time).
For future research, we proposed a method that combines between NTRU algorithm and ECC algorithm to produce a new stronger cipher system that incorporates the advantages of the two algorithms.www.ijacsa.thesai.org

Fig. ( 7 )
Fig. (7) Displays the effect of file size on the time of encryption and decryption of the original method, Fig. (8) Displays the effect of file size on the time of encryption and decryption of the proposed method with SL 8, Fig. (9) Displays the effect of file size on the time of encryption and decryption of the proposed method with SL 12, Fig. (10) Displays the effect of file size on the time of encryption and decryption of the proposed method with SL 16, Fig. (11) Displays the relationship between file size and encryption time to the original and proposed methods and Fig. (12) Displays the relationship between file size and decryption time to the original and proposed methods.

Fig. 1 .Fig. 3 .
Fig. 1.Dividing the file in to segments and then to three data block Fig. 2. The first step of scrambling (scrambling the dbs)

Fig. 5 .Fig. 6 .
Fig.5.The fourth step of scrambling which results in the order of data that will be written to the data file

Fig. 12 .
Fig. 12. Compression for the effect of file size on time of decryption between the original method and the proposed method