1 Introduction

Encryption of .wav file is one of the challenging issue in the field of network security. Through noisy channel it is very much difficult to send such kind of file. With the help of transformation firstly we convert the file into digital format that means analog to digital conversion [1] can take place, to do so we use pulse code modulation technique. To get back the original sound in terms of .wav file apply pulse code demodulation technique. At the last we compare both the files that they sound similar or not. But there is a scope to encrypt the encoded combination of zero, one in 8 bit ASCII character then shuffling then to produce more encrypted form. To do this project we use MATLAB 2014(a).

2 Methodology

See Fig. 1.

Fig. 1
figure 1

Flow chart of proposed method

3 PCM Encoding and Decoding Process

Pulse code modulation (PCM) [2] is basically a 3 steps process for analog to digital conversion which includes sampling [3], quantization [3], and encoding. In this paper we use PCM modulation and PCM demodulation technique for encrypting and decrypting a .wav file in terms of combination of zeros, ones and reveres respectively.

3.1 Sampling

In case of sampling [4], the .wav file (continuous time and continuous amplitude) can be converted into discrete time continuous amplitude which is the next input to the quantization process. In practically it is impossible to digitize the .wav file which has infinite number of sample points. So we have to sample the continuous time into discrete time with time interval T.

$${\text{F}}_{\text{s}} = \frac{1}{T}\,{\text{Samples per second HZ}})$$
(1)

where sampling interval is T and the sampling frequency is Fs.

To avoid aliasing must satisfy nyquist interval rate where Fs ≥ 2Fmax.

3.2 Quantization

Using quantization [5] we convert the discrete time continuous amplitude signal (output after sampling) into discrete time and discrete amplitude signal. To do so we have to perform the following

$$\Delta = \frac{{{\text{xmax}} - {\text{xmin}} }}{\text{L}}$$
(2)
$${\text{L}} = 2^{ \wedge } {\text{m}}$$
(3)
$${\text{i}} = {\text{round}}\,(\frac{{{\text{x }} - {\text{xmin}} }}{\Delta })$$
(4)
$${\text{Xq}} = {\text{x}}_{ \text{min} } + {\text{i}}\Delta ,\quad {\text{for i}} = 0,\,1 \ldots \,{\text{L}} - 1$$
(5)

where the maximum value is xmax and minimum value is xmin of the analog input signal x. L denotes the number of quantization levels [6]. m is the number of bits used in analog to digital conversion (ADC). Here step size the of the quantizer or the ADC resolution is delta denoted by the symbol ∆. Quantization level is denoted by Xq, and index i is corresponding to the binary code.

3.3 Encoding

After getting the discrete time and discrete amplitude values produced by quantization process converted into combination of zero and ones row vector which will produce the encoded signal.

3.4 Decoding

To decode the encoded combination of zero one we apply the reverse procedure that means initially convert the binary data to decimal data. Then we regain the quantized value by which the demodulated .wav file can re generate.

4 Encryption and Decryption [7]

For encrypting the zero one matrix convert into m × (n = 8 bit) matrix where m is the number of rows and n is the number of column [8]. So after getting the matrix with 8 bit in each row we can easily convert it in their corresponding extended 8 bit ASCII, one row at a time (Figs. 2 and 3).

Fig. 2
figure 2

16 bit to 8 bit data in each row conversation then ASCII values

Fig. 3
figure 3

Encryted form of .wav file

For decrypting the message we can apply the reverse procedure that means convert ASCII to m × (n = 8 bit) matrix, then again covert it to its original size matrix m × n. Then to regain the original .wav file we again have to transfer the matrix m × n into serial row vector (Fig. 4).

Fig. 4
figure 4

Row vector

After getting the serial data given by row vector then converted into its decimal form to get back the quantized values which will reproduce the demodulated .wav signal.

5 Result

In our proposed method initially we listen the original .wav file, then using PCM it convertes into its binary combination of zeros and ones and then encrypts. To reform the .wav file we apply the reverse procedure then again we recheck the waveform and sound it as the original one or not. Here we found it sound like the original one. So we can conclude that the correctness of the encoding and decoding process maintain here. In this paper we used MATLAB (R2014a) as an experimental tool (Figs. 5 and 6).

Fig. 5
figure 5

Original signal, sampled signal, quantized signal

Fig. 6
figure 6

Encoded signal, demodulated signal

6 Conclusion

In this proposed method we encode and decode a .wav file then check the original file and demodulated .wav files spectra and compare they sound technically same. Due to greater size of .wav file encryption is much more complex so we can proceed to the AES encryption standard by which higher bit 16, 64, 128 bit data can easily be encrypted.