ENCRYPTION AND DECRYPTION OF AUDIO SIGNAL BASED ON RSA ALGORITHN

One of the most important methods to protect and verify information that are exchanged over public communication channels in the existence of third party called antagonists is encryption. The stored or transmitted message is transformed in the encryption process to unreadable or gibberish form. The reverse process in which the intendent recipient can reveal the encrypted message content is called decryption. The encryption and decryption processes are achieved using secret keys that are exclusively exchanged between the sender and recipient. This method can be applied to any form of message such as audio, video, image or text data. The current work applies the well-known RSA algorithm for audio signal encryption and decryption. The performance of the presented algorithm has been tested via experimental implementation which show that the Cpestral Distance Measure (CD), Linear Predicative Code Measure (LPC) and Segmental Spectral Signal to Noise Ratio (SSSNR) reach to 6.8781, 4.9614 and -21.5563 dB respectively using Matlab simulations. The results on the presented technique validated that it is secure, reliable and efficient to be applied in secure audio communications as well as it performed high intelligibility of the recovered audio signal.

Fundamentally, cryptosystems can be categorized to two main types based on the way in which encryption and decryption processes are carried out in the cryptosystem: symmetric key (secret key) cryptosystems and asymmetric key (public key) cryptosystems. In symmetric key cryptosystems, the same key is shared between the transmitter for encryption and the receiver for decryption the data. The strength of symmetric algorithms depends on the size of the secret key. Blowfish, Advanced Encryption Standard (AES) and Data Encryption Standard (DES) are examples of symmetric key encryption techniques. In asymmetric key cryptosystems, each user in the system has two different keys: private which is used for encryption at the transmitter and public which is used for decryption at the receiver. Although these two keys are different but they are mathematically related. Thus, reconstructing of the original message by decrypting it is feasible. Asymmetric cipher has several advantages over conventional symmetric ciphers. It means that if the opponent can have both the algorithm of encryption and the public key, he will still need to the private key to decrypt the original message which is available only with the intendent recipient. The disadvantage of this type of encryptions is that they are need more computations than symmetric ciphers. Hence, encryption and decryption processes may take longer time. For a short message, this is not suitable, but for bulk data encryption, it certainly does. RSA is an example of asymmetric key encryption methods (Rahman et.al, 2012, Khalil, 2016. New techniques have been presented recently for data encryption using RSA algorithm. As examples, the researchers in (Rahman et.al, 2012), presented a new idea to implement RSA algorithm on speech encryption/decryption. Different speech words were saved in a wave file after they were recorded from different speakers. Encryption and decryption processes are performed in this method on the extracted data from those words after saving them as integer data in a text file. In (Khalil, 2016), two different encryption and decryption techniques are applied to an audio signal. RSA algorithm is the first one while a new suggested technique that depends on the concept of symmetric cryptography is the second one. The suggested method gives better results than RSA method since it produce an audio signal of high quality as the original signal. In (Christina C et.al, 2016), RSA algorithm is used to encrypt video data while transmitting it over the internet. The video will be encrypted via public key after converting it to several bytes then it will be sent to the receiver in the text form. The receiver will decrypt the encrypted video via private key after applying paging technique to accelerate encryption and decryption processes. In (El Bakry et.al, 2016), voice calls are encrypted using RSA encryption approach to maintain the security. The voice call is converted in this method from analog to digital from after receiving it from the microphone via analog to digital converter circuit. Then, the output signal is sent to digital to analog converter circuit to convert it again to its analog form after encrypting it using RSA. The receiver will apply the reverse processes in decryption to get the original voice call. In (Sayyad et.al, 2017), video encryption scheme that based on Pseudo Noise (PN) sequence and RSA is introduced. Two layers of encryption are utilized on the source after separating the video and audio components to increase the security. The first encryption layer is RSA while the second one is Pseudo Noise (PN) sequence. In (Sharma & Rani, 2017), a hybridization algorithm that based on three layers of encryption algorithms is proposed to improve speech data security. The first layer is RSA and the second is DES while the third is a combination of both RSA and DES algorithms. Finally, genetic algorithm is applied for optimization purpose. The results are evaluated in sense of MSE and PSNR.
The current work presented a new encryption/decryption technique to ensure end to end secrecy and security of the audio signal, as well as to preserve the good quality of the recovered signal while storing or transmitting throughout any communication system by applying the RSA asymmetric key algorithm.
This scheme is organized as following: Section 1 has been already presented. RSA algorithm with its encryption and decryption techniques is briefly illustrated in section 2. The proposed methodology and its implementation are introduced in section 3. Section 4 gives the measurements criteria that used to evaluate the presented audio cryptosystem. Experimental results and discussion are explained in section 5 and finally the main conclusions of this work are summarized in section 6.

RSA Algorithm
RSA is basically an authentication system and Internet encryption method. This algorithm was developed by its inventors in 1977 (Ron Rivest, Adi Shamir and Leonard Adleman). It is one of the most common asymmetric key cryptosystems that it is included as a part from Netscape and Microsoft of the Web browsers. Initially, two large prime numbers are chosen and multiplied in this algorithm to create the public and the private keys pair which are further used in the encryption and decryption operations. There is no need to send the private key throughout the Internet if RSA algorithm is used. The private key is utilized to decrypt the secret message at the receiver which has been ciphered or encrypted by using the public key at the transmitter. Everyone can know the public key which is used to encrypt the messages, but the encrypted messages by the public key can be decrypted only with the private key. Three steps are involved in RSA which are key generation, encryption and decryption processes (El Bakry et.al, 2016, Priyanka & Hemalatha, 2016).
• Key generation: The following steps illustrate the key generation in RSA algorithm: • Choose two large prime integers and . The modulus can be computed from these two numbers, = * . The number pair ( , ) which represents the modulus and the encryption or public exponent is referred to the public key while the number pair ( , ) which represents the modulus and the decryption or private exponent that should be kept secret is referred to the private key.
, ∅( ) have to be kept secret because these parameters may be utilized to compute (Sayyad et.al, 2017, Kaur & Singh, 2013. Encryption Process: The public key ( , ) is used to encrypt the plain message at the transmitter to produce the cipher message by using the formula: Then, this ciphered or encrypted message is transmitted to the intended receiver.
Decryption Process: The private key ( , ) is used to decrypt the ciphered message at the receiver to produce the plain message by using the formula (Khatri et.al, 2016):

The Proposed Methodology
The proposed methodology consists of two stages: encryption and decryption of the audio signal using RSA algorithm. Public and private keys are generated previously and then the public key is used to encrypt the acquired speech or audio samples at the transmitter. The ciphered or encrypted audio samples are sent to receiver sequentially through a communication channel who will decrypt each sample by employing the private key. For simplicity, it is assumed that the transmission or communication channel is ideal or free of noise. The block diagram of the presented methodology is shown in Figure 1. Where and represent the vectors of LPC coefficients for the original and the encrypted audio blocks respectively, and V represent the autocorrelation matrix for the original audio block (Mahdi et.al, 2016).

Segmental Spectral Signal to Noise Ratio (SSSNR):
Segmental Spectral Signal to Noise Ratio (SSSNR) can be calculated using the equation: Where represent the DFT for the original and the encrypted audio signals respectively (Abdullah et.al, 2015).

Simulation Results and Discussion
The test results are presented and discussed in this part for evaluating the performance of the presented work. The audio signals which are used in this simulation are extracted from TIMIT database which have sampling frequency of 16 KHz and signal duration of 1.5250 seconds (24400 samples), 2.4850 seconds (39760 samples), 3.9250 seconds (62800 samples) and 4.1950 seconds (67120 samples) respectively and also, all the silence periods are eliminated from them. Different values were tested of and to produce the key pair. In this simulation, the values of and that were used to compute encryption and decryption keys are set as 3 and 11 respectively because they produced better results for encryption. The encryption key value is selected to be 7. Hence, the public and the private keys ( , ) ( , ) will be (33, 7) and (33, 3) respectively. The plotted diagrams shown in Fig. 2 are yielded from the simulation process in the presented work that represent the original, ciphered and deciphered audio signals respectively. It is obvious from Fig.  (2b) that the original information has been completely destroyed in the ciphered signal because it is impossible to understand the words by live hearing while hearing the deciphered signal in Fig.   [Yousif *, Vol.5 (Iss.7) (2c) is precisely evident as the original signal in Fig. 2a. MATLAB (R2013a) is used as a programming language to implement all the simulations in the presented cryptosystem.  Table 1. From the results given in this table, it can be observed that the SSSNR value is very low (negative value) while the CD and values are high for all ciphered audio files. This means that the residual intelligibility in the presented cryptosystem is low which indicates the high security at the encryption process.

Quality of audio decryption:
The same three quality metrics are used to measure the quality of the decryption algorithm which are CD, and SSSNR. The better is the audio decryption quality as the value of the SSSNR is increased, and the values of CD and are decreased (Alsaad & Hashim, 2013). The results of the introduced cryptosystem are listed in Table 2. It can be noticed from Table 2, that the SSSNR value is very high (positive value) while the CD and values are low for all decrypted audio files. This means that the recovered audio signal is of good precision and high quality. Histogram analysis: Histogram represents the distribution of information values in the system. The analysis of histogram is made by testing distribution of information in various fields. Encrypted information is represented as numbers in the histogram in the encryption practices. If the distributions of these numbers are close, then the performing of encryption process is good (Abd Elzaher et.al, 2016). The histograms of the original and encrypted audio signals are presented in Figs. 3a and 3b respectively. From these figures, it can be noticed that the histogram of the encrypted audio signal using RSA algorithm is significantly different from that of the original one and it's fairly uniform. This means that the presented cryptosystem provides good encryption quality which demonstrates high level of security.

Conclusions
Accessibility, reliability, confidentially and secrecy of data are the main aspects that should be maintained in audio security. Protecting audio systems from modification, disruption, extermination as well as the illegal access is the main goal of audio security. A secure and efficient communication system for audio signals that based on RSA public-key cryptosystem is designed in this work. The presented cryptosystem is implemented and its performance is evaluated using different audio quality metrics in both encryption and decryption processes. The results obtained demonstrated that the residual intelligibility in the encrypted audio signal is low while the quality of the recovered audio signal is maintaining good with a satisfying level which confirm the suitability, reliability, high security and effectiveness of the introduced scheme to be applied in practical applications like audio data encryption/decryption.