SlideShare a Scribd company logo
International Journal of Network Security & Its Applications (IJNSA) Vol. 10, No.4, July 2018
DOI: 10.5121/ijnsa.2018.10402 11
A METHOD FOR ENCRYPTING AND
DECRYPTINGWAVE FILES
Mohamad M. Al-laham1
, Mohamad a. Mai'iteh2
, Hasan Rashaideh3
, Ziad Al-Qadi4
1&2
Department of MIS, Al-Balqa Applied University, Jordan
3&4
Department of computer science, Al-Balqa Applied University, Jordan
ABSTRACT
This paper aims at presenting a novel method for encrypting and decrypting wave files. Basically, the
target files are sound files. First, the files are fetched, then a two-dimensional matrix of the double data
type is created to maintain the values that correspond to the sample range; these values are placed in a
column matrix then they are kept in the two dimensional-matrix already created. The double 2D matrix will
be encrypted using matrix multiplication with a private double matrix key [1]. Having been encrypted, the
data will be sent in wave file format and decrypted using the same 2D matrix private key.
KEYWORDS
security, encrypting, decrypting, wave files.
1. INTRODUCTION
Waveform Audio File Format (WAVE) is an application of RIFF or Resource Interchange File
Format which stores audio bit streams in “chunks”. Linear Pulse Code Modulation (LPCM)
format is used to encrypt WAVE [2] [3]. The Sound is a pressure wave or mechanical energy
characterized by pressure variance in an elastic medium. The variance propagates as either
compression the pressure exceeds the ambient pressure or as reification when pressure is less than
the ambient pressure. In the same manner, a WAVE file just represents the sampled sound waves
which happen to be above or below the equilibrium or ambient air pressure. In this paper, one and
two channels of wave files will be used to show the proposed technique of encrypting the sound
file in various matrix formats [4][5]. The most popular characteristics used to analyze wave files
are:(1) Estimating the mu of the Population(mu), (2) Estimating Sigma, (3) Peak Factor (Crest
Factor), (4) Dynamic Range, (5) Power Spectral Density, and (6) Zero-Crossing Rate.
The rest of this paper are is organized as follows: in section 2 we introduce a basis on how to
analyze wave files. Our proposed method is presented in section 3. Section 4 presents the
experimental environment. Section 5 presents and discusses the results. Finally, conclusions are
drawn in section 6.
2. WAVE FILE ANALYSIS
2.1. ESTIMATING THE MU OF THE POPULATION(MU)
Figure 1 shows an overview of all the relationships. In step 1, in the upper left-hand corner of
Figure 1, Sampling Distribution of the Mean (SAQ) is conducted as a normal distribution. In step 2,
International Journal of Network Security & Its Applications (IJNSA) Vol. 10, No.4, July 2018
12
we do a research project on spatial ability. This is equivalent to taking a sample of size(n)from this
population of SAQ scores. So, in step 3 a statistic on the sample data is calculated. Hence, we
calculate the mean [6].
The estimate of the population means mu is the sample mean. Unfortunately, it gets messier by
estimating population variance as shown in Figure 1.
Figure 1. Calculating mu Parameter
2.2. ESTIMATING SIGMA
The standard deviation, sigma, is the next parameter to be estimated. The formula shown in
Figure 2 is used to calculate an estimate of the population standard deviation (sigma) from sample
[7].
Figure 2. Calculating Sigma Parameter
2.3. Peak Factor (Crest Factor)
The crest factor of an audio signal is defined as the dB difference between the peaks and the Root
Main Square (RMS) value of the signal. The RMS is defined as the “heating value” of the signal-
the voltage that would generate the same heat as a DC (Direct Current) signal- over the same time
[8]. RMS value of a complex signal must be read with an RMS voltmeter. Alternatively, the
International Journal of Network Security & Its Applications (IJNSA) Vol. 10, No.4, July 2018
13
signal can be digitally sampled, and the samples are summed to yield the RMS value.
Furthermore, the RMS value of a complex signal can be calculated from the “area under the
curve” of a signal.
2.4. DYNAMIC RANGE (DR)
DR, or DNR, is defined as the ratio between the largest and smallest possible values of a
changeable quantity, such as in signals like sound and light. It is measured as a ratio, or as a base-
10 (decibel) or base-2 (doublings, bits or stops) logarithmic value [9].
2.5. POWER SPECTRAL DENSITY (PSD)
For continuous signals that describe, for example, stationary physical processes, it is more
convenient to define a Power Spectral Density (PSD). It describes how the power of a signal or
time series is distributed over different frequencies, as given in the previous simple example.
Also; here, power can be the real physical power, or more often, for convenience with abstract
signals, can be defined as the squared value of the signal [10][11].
2.6. ZERO-CROSSING RATE
The Zero-Crossing Rate is defined as the rate of sign-changes along a signal, i.e., the rate at
which the signal changes from positive to negative or vice versa. This feature has been heavily
used in both speech recognition and music information retrieval; being a main feature to classify
percussive sounds [12].
3. THE PROPOSED TECHNIQUE TO WAVE FILES ENCRYPTION/
DECRYPTION
Wave files can be treated as one column matrix (mono sounds: one channel) or two columns
matrix (stereo sounds: two channels). The proposed technique is based on this idea and consists
of two phases: Phase 1: Encryption and Phase 2: Decryption.
3.1. ENCRYPTION PHASE
This phase will be implemented as shown in figure 3 by applying the following steps:
I. Capture the original wave file.
II. Calculate the wave file size.
III. If the wave file size is not a square number, increase the size to the nearest square
number.
IV. Pad zeros to the wave file if the size is increased.
V. Convert the wave file to a 2D square matrix.
VI. Generate a 2D double matrix to be used as a private (secret) key.
VII. Apply matrix multiplication to get the encrypted matrix.
VIII. Resize the encrypted matrix, and then change the2D matrix to a1D matrix to get
the encrypted wave file.
International Journal of Network Security & Its Applications (IJNSA) Vol. 10, No.4, July 2018
14
Figure 3. Encryption Phase
3.2. DECRYPTION PHASE
This phase will be implemented as shown in figure 4 by applying the following steps:
I. Get the encrypted wave file.
II. Calculate the encrypted wave file size.
III. If the decrypted wave file size is not a square number, increase the size to the nearest
square number.
IV. Pad zeros to the encrypted wave file if the size is increased.
V. Convert the encrypted wave file to a2D square matrix.
VI. Use the inverse of the secret key as a private key.
VII. Apply matrix multiplication to get the decrypted matrix.
VIII. Resize the decrypted matrix, and then change the2D matrix to a1D matrix to get the
decrypted original wave file.
International Journal of Network Security & Its Applications (IJNSA) Vol. 10, No.4, July 2018
15
Figure 4: Decryption Phase
4. EXPERIMENTAL ENVIRONMENT
To analyze the proposed technique, the following tools are used:
 The Personal computer (i7 processor with 4Gbyte RAM)
 MATLAB package.
 MATLAB programs and functions to be used for variant methods of analysis and for
encryption and decryption.
5. EXPERIMENTAL RESULTS
During the implementation, we focus on the issues in the following subsections.
5.1 ACCURACY:
Accuracy means approaches zero error between the original wave file and the decrypted one to
make sure that there is no loss of information during the process of encryption-decryption. The
proposed technique is implemented and tested several times using deferent wave files with
deferent sizes and channels. Each time of testing, the correlation coefficient among the original
wave file and the decrypted one and the value of the correlation coefficient is always zero, which
means that the decrypted wave file 100% matches the original wave file.
Table 1 shows some sample values of the original, encrypted and decrypted files:
International Journal of Network Security & Its Applications (IJNSA) Vol. 10, No.4, July 2018
16
Table 1. Sample Values of the Wave File
The original wave file and the decrypted one are graphically represented using deferent forms and
Figures 5 and 6 show that the original file and the decrypted one are the same.
Figure 5. Representation of the original wave file
0 0.5 1
-1
0
1
Time, s
Normalizedamplitude
Original voice signal in the time domain
Time, s
Frequency,Hz
Spectrogram of original voice signal
0.2 0.4 0.6 0.8
0
5000
10000
Magnitude,dB
-100
-50
0
10
0
-200
-150
-100
-50
0
Amplitude Spectrum of original voice signal
Frequency, kHz
Amplitude,dBV
0 5 10 15
-150
-100
-50
0
50
Frequency (kHz)
Power/frequency(dB/Hz)
Power Spectral Density
International Journal of Network Security & Its Applications (IJNSA) Vol. 10, No.4, July 2018
17
Figure 6. Representation of the Decrypted Wave File
The most popular characteristics of the wav file are calculated for the original file and the
decrypted one and they are always the same. Table 2 shows sample:
Table 2. Sample of Wave File Characteristics
5.2 SECURITY
Information Security is the process of protecting data from unauthorized access, disclosure,
destruction, modification and disruption. The common goals of information security are:
protecting the confidentiality, integrity, and availability of information. However, there are some
slight differences between them. The proposed technique uses a very huge 2D matrix with double
values as a private (secret) key for encryption and decryption. This key will be generated
randomly and saved, and it is very difficult, or even impossible, to hack or guess it as shown in
the next example:
HACKING TIME CALCULATION EXAMPLE:
Suppose we have the following random double matrix to be used for encryption-decryption:
0 0.5 1
-1
0
1
Time, s
Normalizedamplitude
Decrypted voice signal in the time domain
Time, s
Frequency,Hz
Spectrogram of decrypted voice signal
0.2 0.4 0.6 0.8
0
5000
10000
10
0
-200
-150
-100
-50
0
Amplitude Spectrum of decrypted voice signal
Frequency, kHz
Amplitude,dBV
0 5 10 15
-150
-100
-50
0
50
Frequency (kHz)
Power/frequency(dB/Hz)
Power Spectral Density
Magnitude,dB
-100
-50
0
International Journal of Network Security & Its Applications (IJNSA) Vol. 10, No.4, July 2018
18
 The probability of guising each digit (P) =1/104
 The probability of guising the 9 digits (PP) =1/104×9
=10-36
 For the best case: the number of guising = 1036
 For the worst case: the number of guessing=1

The average number of guessing=(1+1036
)/2 ~ 5 × 10 35
 Suppose the matrix multiplication requires 10-9
seconds, so the hacking time will be:
5 × 10 35
×10-9
= 5 × 10 26
sec = 5 × 10 26
/60= 8.3333×1024
min= 8.3333×1024
/60=1.3889×1023
hours = 1.3889×1023
/24= 5.7871 ×1021
days=5.7871 ×1021
/365.25=1.5844×1019
years
The calculation results lead us to conclude that it is impossible or even very hard to hack the key
which is always greater than 3 by 3 random matrix.
5.3 EFFICIENCY
The proposed technique is implemented using different wave files with different sizes.
Each time the encryption/decryption time is calculated, and some samples of time
calculation are listed in table 3:
Table 3. Encryption-Decryption Time
From the results in Table 3, we find out that the results of the different sizes of wave files vary
proportionally to the size of wave file. Encryption time increases as the file size increases in
multiples of file size. The implementation results are compared with the results in [13] as shown
in Table 4 and Figure 7.
Table 4:Encryption Time Comparisons
International Journal of Network Security & Its Applications (IJNSA) Vol. 10, No.4, July 2018
19
Figure 7. Comparison Results
From table 4, we can compare the proposed technique results with the results of the other two
methods by calculating the speedup as shown in table 5:
Table 5:Speedup Calculation
6. CONCLUSIONS
An efficient and secure technique for wave file encryption- decryption is proposed, implemented,
tested and compared with the other method of encryption-decryption and from the obtained
results we can conclude the following:
- The proposed technique can easily be used to encrypt-decrypt both mono and stereo
wave files with any size.
- The proposed technique is very secure and it is hard or even impossible to hack the
private key.
- The proposed technique provides zero error; thus, there is no loss of information
during the process of encryption-decryption.
- The proposed technique is very efficient being compared with other techniques and
satisfies a high-speed up.
10 12 14 16 18 20 22 24 26 28 30
0
1
2
3
4
5
6
7
8
9
x 10
4
File size (MB)
Encryptiontime(Msec)
Proposed
DEC
Blowfish
International Journal of Network Security & Its Applications (IJNSA) Vol. 10, No.4, July 2018
20
REFERENCES
[1] Dastoor, Sarosh. "Comparative Analysis of Steganographic Algorithms Intacting the Information in
the Speech Signal for Enhancing the Message Security in Next Generation Mobile Devices", IEEE
Xplore Digital Library, in proceedings of The World Congress on Information and Communication
Technologies. Mumbai, India, 11-14 Dec.2011: pp. 279-284.
[2] Dey, Sandipan, Ajith Abraham, and SugataSanyal. "An LSB Data Hiding Technique Using Natural
Numbers", in proceedings of IEEE Third International Conference on Intelligent Information Hiding
and Multimedia Signal Processing. IIHMSP, Nov. 26-28, 2007, Kaohsiung City, Taiwan, vol.2: pp.
473-476.
[3] Nosrati,Masoud, RonakKarimi, HamedNosrati and Ali Nosrati, "Taking a Brief Look at
Steganography: Methods and Approaches", Journal of American Science, vol.7, no. 6, 2011: pp. 84-
88.
[4] SandipanDey, Ajith Abraham, BijoyBandyopadhyay and SugataSanyal. "Data Hiding Techniques
Using Prime and Natural Numbers", Journal of Digital Information Management, vol. 6, no. 3, pp.
463-485, 2008.
[5] Stern, Richard M. Fu-Hua Liu, Yoshiaki Ohshima, Thomas M. Sullivan, and AlexAcero, “Multiple
Approaches to Robust Speech Recognition”, in proceedings of DARPA Speech and Natural Language
Workshop, Feb. 1,1992: pp.274-279 .
[6] Chatzimisios, P., Verikoukis, C., Santamaria, I., Laddomada, M., Hoffmann, O. (eds.). Mobile
Lightweight Wireless Systems. In proceedings of The Second International ICST Conference,
Mobilight, May 10-12, 2010, Barcelona, Spain, Revised Selected Papers. Springer. p. 164.
[7] Wu, Bin, Jianwen Zhu and FaridNajm, “Dynamic-Range Estimation”. IEEE Transactions on
Computer-Aided Design of Integrated Circuits and Systems, vol. 25, Issue 9, Sept. 2006, pp.1618-
1636.
[8] Wu, Bin, Jianwen Zhu and FaridNajm, “An Analytical Approach for Dynamic-Range Estimation”,
inProceedings of the 41st DAC AnnualDesign Automation Conference, San Diego, California, USA,
June 7-11, 2004: pp. 472-477
[9] Wu, Bin, Jianwen Zhu and FaridNajm, “Dynamic Range Estimation for Nonlinear
Systems.”IEEE/ACM. In proceedings of the International Conference on Computer-Aided
Design(ICCAD-04), San Jose, California, Nov. 7-11, 2004.
[10] Miller, Scott and Donald Childers. Probability and Random Processes: With Applications to Signal
Processing and Communications.USA, Academic Press, 2012: pp. 370–375.
[11] Gouyon, F., Pachet, F., Delerue, O., “Classifying Percussive Sounds: A Matter of Zero-Crossing
Rate”, in Proceedings of the COST G-6 Conference on Digital Audio Effects (DAFX-00), Verona,
Italy, Dec. 7–9, 2000.
[12] B.L,Srinivas, Anish Shanbhag and Austin Solomon D’Souza , “A Comparative Performance
Analysis of DES and BLOWFISH Symmetric Algorithm”, International Journal of Innovative
Research in Computer and Communication Engineering, vol.2, Special Issue 5, Oct., 2014:pp.77-88.
International Journal of Network Security & Its Applications (IJNSA) Vol. 10, No.4, July 2018
21
[13] J. Nadir, A. Abu Ein and Z. Alqadi, " A Technique to Encrypt- decrypt Stereo Wave Files",
International Journal of Computer and Information Technology, ISSN: 2279 -0764, Volume 05 Issue
05, September2016
[14] M. Kaur and S. Kaur, "Survey of Various Encryption Techniques for Audio Data", International
Journal of Advanced Research in Computer Science and Software Engineering, vol. 4, pp. 1314-1317,
2014

More Related Content

PPTX
Nsl seminar(2)
PDF
Data Compression using Multiple Transformation Techniques for Audio Applicati...
PDF
Simulation of Direct Sequence Spread Spectrum for Wireless Communication Syst...
PDF
A_Fair_Multiple-Slot_Assignment_Protocol_for_Sched
PDF
Cv4201644655
PPT
PDF
11.design and implementation of distributed space frequency to achieve cooper...
PDF
캡슐 네트워크를 이용한 엔드투엔드 음성 단어 인식, 배재성(KAIST 석사과정)
Nsl seminar(2)
Data Compression using Multiple Transformation Techniques for Audio Applicati...
Simulation of Direct Sequence Spread Spectrum for Wireless Communication Syst...
A_Fair_Multiple-Slot_Assignment_Protocol_for_Sched
Cv4201644655
11.design and implementation of distributed space frequency to achieve cooper...
캡슐 네트워크를 이용한 엔드투엔드 음성 단어 인식, 배재성(KAIST 석사과정)

What's hot (16)

PDF
DWT Based Audio Watermarking Schemes : A Comparative Study
PDF
International Journal for Research in Applied Science & Engineering
PDF
Deep Learning Based Voice Activity Detection and Speech Enhancement
PDF
DIGITAL WATERMARKING TECHNIQUE BASED ON MULTI-RESOLUTION CURVELET TRANSFORM
PDF
IRJET- Wavelet Transform based Steganography
PPTX
Audio Cryptography System
PPTX
DPRoPHET in Delay Tolerant Network
PDF
Deeplearning ai june-sharable (1)
PDF
Dq24746750
PDF
CODE AWARE DYNAMIC SOURCE ROUTING FOR DISTRIBUTED SENSOR NETWORK
PDF
DATA HIDING IN AUDIO SIGNALS USING WAVELET TRANSFORM WITH ENHANCED SECURITY
PDF
DWT-SMM-based audio steganography with RSA encryption and compressive sampling
PPTX
Enhancement and performance evaluation of a multicast routing mechanism in zi...
PDF
Pbcbt an improvement of ntbcbt algorithm
PDF
Ijnsa050209
PPTX
Creating Ever-changing QoS-constrained Dataflows in Tactical Networks: An Exp...
DWT Based Audio Watermarking Schemes : A Comparative Study
International Journal for Research in Applied Science & Engineering
Deep Learning Based Voice Activity Detection and Speech Enhancement
DIGITAL WATERMARKING TECHNIQUE BASED ON MULTI-RESOLUTION CURVELET TRANSFORM
IRJET- Wavelet Transform based Steganography
Audio Cryptography System
DPRoPHET in Delay Tolerant Network
Deeplearning ai june-sharable (1)
Dq24746750
CODE AWARE DYNAMIC SOURCE ROUTING FOR DISTRIBUTED SENSOR NETWORK
DATA HIDING IN AUDIO SIGNALS USING WAVELET TRANSFORM WITH ENHANCED SECURITY
DWT-SMM-based audio steganography with RSA encryption and compressive sampling
Enhancement and performance evaluation of a multicast routing mechanism in zi...
Pbcbt an improvement of ntbcbt algorithm
Ijnsa050209
Creating Ever-changing QoS-constrained Dataflows in Tactical Networks: An Exp...
Ad

Similar to A METHOD FOR ENCRYPTING AND DECRYPTINGWAVE FILES (20)

PDF
Encryption & Decryption of Sound in image format on Matlab
PDF
A flexible method to create wave file features
PDF
Secure image hiding in speech signal by steganography-mining and encryption
PDF
Enhanced security in lossless audio encryption using zigzag scrambling, DNA c...
PDF
Speech signal compression and encryption based on sudoku, fuzzy C-means and t...
PDF
Quality and Distortion Evaluation of Audio Signal by Spectrum
PDF
IJREAMV03I022640.pdf
PDF
Speech signal encryption decryption using noise signal and
PDF
Speech signal encryption decryption using noise signal and
PDF
Speech signal encryption decryption using noise signal and
PDF
Speech signal encryption decryption using noise signal and
PDF
Optimal Communication Of Real Time Data On Secure Cdma Ip...
PDF
Audio Features Based Steganography Detection in WAV File
PDF
Encryption and Compression of Audio-Video Data Using Enhanced AES and J-Bit A...
PDF
Encrypting an audio file based on integer wavelet transform and hand geometry
PDF
A multilevel security scheme using chaos based
PDF
A multilevel security scheme using chaos based encryption and steganography f...
PDF
audio-watermarking-with-encryption-IJERTV6IS090174.pdf
PDF
A GAUSSIAN MIXTURE MODEL BASED SPEECH RECOGNITION SYSTEM USING MATLAB
PDF
HIGHLY SECURE CRYPTOGRAPHY ALGORITHM METHOD TO SAFEGUARD AUDIOS AND VISUALS
Encryption & Decryption of Sound in image format on Matlab
A flexible method to create wave file features
Secure image hiding in speech signal by steganography-mining and encryption
Enhanced security in lossless audio encryption using zigzag scrambling, DNA c...
Speech signal compression and encryption based on sudoku, fuzzy C-means and t...
Quality and Distortion Evaluation of Audio Signal by Spectrum
IJREAMV03I022640.pdf
Speech signal encryption decryption using noise signal and
Speech signal encryption decryption using noise signal and
Speech signal encryption decryption using noise signal and
Speech signal encryption decryption using noise signal and
Optimal Communication Of Real Time Data On Secure Cdma Ip...
Audio Features Based Steganography Detection in WAV File
Encryption and Compression of Audio-Video Data Using Enhanced AES and J-Bit A...
Encrypting an audio file based on integer wavelet transform and hand geometry
A multilevel security scheme using chaos based
A multilevel security scheme using chaos based encryption and steganography f...
audio-watermarking-with-encryption-IJERTV6IS090174.pdf
A GAUSSIAN MIXTURE MODEL BASED SPEECH RECOGNITION SYSTEM USING MATLAB
HIGHLY SECURE CRYPTOGRAPHY ALGORITHM METHOD TO SAFEGUARD AUDIOS AND VISUALS
Ad

Recently uploaded (20)

PPT
Mechanical Engineering MATERIALS Selection
PPTX
Internet of Things (IOT) - A guide to understanding
PDF
Digital Logic Computer Design lecture notes
PPTX
Sustainable Sites - Green Building Construction
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
Safety Seminar civil to be ensured for safe working.
PPTX
UNIT 4 Total Quality Management .pptx
PDF
PPT on Performance Review to get promotions
PDF
Well-logging-methods_new................
PDF
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
PPT
introduction to datamining and warehousing
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPTX
Geodesy 1.pptx...............................................
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PPTX
OOP with Java - Java Introduction (Basics)
PDF
composite construction of structures.pdf
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
Mechanical Engineering MATERIALS Selection
Internet of Things (IOT) - A guide to understanding
Digital Logic Computer Design lecture notes
Sustainable Sites - Green Building Construction
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Safety Seminar civil to be ensured for safe working.
UNIT 4 Total Quality Management .pptx
PPT on Performance Review to get promotions
Well-logging-methods_new................
Unit I ESSENTIAL OF DIGITAL MARKETING.pdf
introduction to datamining and warehousing
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Model Code of Practice - Construction Work - 21102022 .pdf
Geodesy 1.pptx...............................................
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
OOP with Java - Java Introduction (Basics)
composite construction of structures.pdf
Embodied AI: Ushering in the Next Era of Intelligent Systems

A METHOD FOR ENCRYPTING AND DECRYPTINGWAVE FILES

  • 1. International Journal of Network Security & Its Applications (IJNSA) Vol. 10, No.4, July 2018 DOI: 10.5121/ijnsa.2018.10402 11 A METHOD FOR ENCRYPTING AND DECRYPTINGWAVE FILES Mohamad M. Al-laham1 , Mohamad a. Mai'iteh2 , Hasan Rashaideh3 , Ziad Al-Qadi4 1&2 Department of MIS, Al-Balqa Applied University, Jordan 3&4 Department of computer science, Al-Balqa Applied University, Jordan ABSTRACT This paper aims at presenting a novel method for encrypting and decrypting wave files. Basically, the target files are sound files. First, the files are fetched, then a two-dimensional matrix of the double data type is created to maintain the values that correspond to the sample range; these values are placed in a column matrix then they are kept in the two dimensional-matrix already created. The double 2D matrix will be encrypted using matrix multiplication with a private double matrix key [1]. Having been encrypted, the data will be sent in wave file format and decrypted using the same 2D matrix private key. KEYWORDS security, encrypting, decrypting, wave files. 1. INTRODUCTION Waveform Audio File Format (WAVE) is an application of RIFF or Resource Interchange File Format which stores audio bit streams in “chunks”. Linear Pulse Code Modulation (LPCM) format is used to encrypt WAVE [2] [3]. The Sound is a pressure wave or mechanical energy characterized by pressure variance in an elastic medium. The variance propagates as either compression the pressure exceeds the ambient pressure or as reification when pressure is less than the ambient pressure. In the same manner, a WAVE file just represents the sampled sound waves which happen to be above or below the equilibrium or ambient air pressure. In this paper, one and two channels of wave files will be used to show the proposed technique of encrypting the sound file in various matrix formats [4][5]. The most popular characteristics used to analyze wave files are:(1) Estimating the mu of the Population(mu), (2) Estimating Sigma, (3) Peak Factor (Crest Factor), (4) Dynamic Range, (5) Power Spectral Density, and (6) Zero-Crossing Rate. The rest of this paper are is organized as follows: in section 2 we introduce a basis on how to analyze wave files. Our proposed method is presented in section 3. Section 4 presents the experimental environment. Section 5 presents and discusses the results. Finally, conclusions are drawn in section 6. 2. WAVE FILE ANALYSIS 2.1. ESTIMATING THE MU OF THE POPULATION(MU) Figure 1 shows an overview of all the relationships. In step 1, in the upper left-hand corner of Figure 1, Sampling Distribution of the Mean (SAQ) is conducted as a normal distribution. In step 2,
  • 2. International Journal of Network Security & Its Applications (IJNSA) Vol. 10, No.4, July 2018 12 we do a research project on spatial ability. This is equivalent to taking a sample of size(n)from this population of SAQ scores. So, in step 3 a statistic on the sample data is calculated. Hence, we calculate the mean [6]. The estimate of the population means mu is the sample mean. Unfortunately, it gets messier by estimating population variance as shown in Figure 1. Figure 1. Calculating mu Parameter 2.2. ESTIMATING SIGMA The standard deviation, sigma, is the next parameter to be estimated. The formula shown in Figure 2 is used to calculate an estimate of the population standard deviation (sigma) from sample [7]. Figure 2. Calculating Sigma Parameter 2.3. Peak Factor (Crest Factor) The crest factor of an audio signal is defined as the dB difference between the peaks and the Root Main Square (RMS) value of the signal. The RMS is defined as the “heating value” of the signal- the voltage that would generate the same heat as a DC (Direct Current) signal- over the same time [8]. RMS value of a complex signal must be read with an RMS voltmeter. Alternatively, the
  • 3. International Journal of Network Security & Its Applications (IJNSA) Vol. 10, No.4, July 2018 13 signal can be digitally sampled, and the samples are summed to yield the RMS value. Furthermore, the RMS value of a complex signal can be calculated from the “area under the curve” of a signal. 2.4. DYNAMIC RANGE (DR) DR, or DNR, is defined as the ratio between the largest and smallest possible values of a changeable quantity, such as in signals like sound and light. It is measured as a ratio, or as a base- 10 (decibel) or base-2 (doublings, bits or stops) logarithmic value [9]. 2.5. POWER SPECTRAL DENSITY (PSD) For continuous signals that describe, for example, stationary physical processes, it is more convenient to define a Power Spectral Density (PSD). It describes how the power of a signal or time series is distributed over different frequencies, as given in the previous simple example. Also; here, power can be the real physical power, or more often, for convenience with abstract signals, can be defined as the squared value of the signal [10][11]. 2.6. ZERO-CROSSING RATE The Zero-Crossing Rate is defined as the rate of sign-changes along a signal, i.e., the rate at which the signal changes from positive to negative or vice versa. This feature has been heavily used in both speech recognition and music information retrieval; being a main feature to classify percussive sounds [12]. 3. THE PROPOSED TECHNIQUE TO WAVE FILES ENCRYPTION/ DECRYPTION Wave files can be treated as one column matrix (mono sounds: one channel) or two columns matrix (stereo sounds: two channels). The proposed technique is based on this idea and consists of two phases: Phase 1: Encryption and Phase 2: Decryption. 3.1. ENCRYPTION PHASE This phase will be implemented as shown in figure 3 by applying the following steps: I. Capture the original wave file. II. Calculate the wave file size. III. If the wave file size is not a square number, increase the size to the nearest square number. IV. Pad zeros to the wave file if the size is increased. V. Convert the wave file to a 2D square matrix. VI. Generate a 2D double matrix to be used as a private (secret) key. VII. Apply matrix multiplication to get the encrypted matrix. VIII. Resize the encrypted matrix, and then change the2D matrix to a1D matrix to get the encrypted wave file.
  • 4. International Journal of Network Security & Its Applications (IJNSA) Vol. 10, No.4, July 2018 14 Figure 3. Encryption Phase 3.2. DECRYPTION PHASE This phase will be implemented as shown in figure 4 by applying the following steps: I. Get the encrypted wave file. II. Calculate the encrypted wave file size. III. If the decrypted wave file size is not a square number, increase the size to the nearest square number. IV. Pad zeros to the encrypted wave file if the size is increased. V. Convert the encrypted wave file to a2D square matrix. VI. Use the inverse of the secret key as a private key. VII. Apply matrix multiplication to get the decrypted matrix. VIII. Resize the decrypted matrix, and then change the2D matrix to a1D matrix to get the decrypted original wave file.
  • 5. International Journal of Network Security & Its Applications (IJNSA) Vol. 10, No.4, July 2018 15 Figure 4: Decryption Phase 4. EXPERIMENTAL ENVIRONMENT To analyze the proposed technique, the following tools are used:  The Personal computer (i7 processor with 4Gbyte RAM)  MATLAB package.  MATLAB programs and functions to be used for variant methods of analysis and for encryption and decryption. 5. EXPERIMENTAL RESULTS During the implementation, we focus on the issues in the following subsections. 5.1 ACCURACY: Accuracy means approaches zero error between the original wave file and the decrypted one to make sure that there is no loss of information during the process of encryption-decryption. The proposed technique is implemented and tested several times using deferent wave files with deferent sizes and channels. Each time of testing, the correlation coefficient among the original wave file and the decrypted one and the value of the correlation coefficient is always zero, which means that the decrypted wave file 100% matches the original wave file. Table 1 shows some sample values of the original, encrypted and decrypted files:
  • 6. International Journal of Network Security & Its Applications (IJNSA) Vol. 10, No.4, July 2018 16 Table 1. Sample Values of the Wave File The original wave file and the decrypted one are graphically represented using deferent forms and Figures 5 and 6 show that the original file and the decrypted one are the same. Figure 5. Representation of the original wave file 0 0.5 1 -1 0 1 Time, s Normalizedamplitude Original voice signal in the time domain Time, s Frequency,Hz Spectrogram of original voice signal 0.2 0.4 0.6 0.8 0 5000 10000 Magnitude,dB -100 -50 0 10 0 -200 -150 -100 -50 0 Amplitude Spectrum of original voice signal Frequency, kHz Amplitude,dBV 0 5 10 15 -150 -100 -50 0 50 Frequency (kHz) Power/frequency(dB/Hz) Power Spectral Density
  • 7. International Journal of Network Security & Its Applications (IJNSA) Vol. 10, No.4, July 2018 17 Figure 6. Representation of the Decrypted Wave File The most popular characteristics of the wav file are calculated for the original file and the decrypted one and they are always the same. Table 2 shows sample: Table 2. Sample of Wave File Characteristics 5.2 SECURITY Information Security is the process of protecting data from unauthorized access, disclosure, destruction, modification and disruption. The common goals of information security are: protecting the confidentiality, integrity, and availability of information. However, there are some slight differences between them. The proposed technique uses a very huge 2D matrix with double values as a private (secret) key for encryption and decryption. This key will be generated randomly and saved, and it is very difficult, or even impossible, to hack or guess it as shown in the next example: HACKING TIME CALCULATION EXAMPLE: Suppose we have the following random double matrix to be used for encryption-decryption: 0 0.5 1 -1 0 1 Time, s Normalizedamplitude Decrypted voice signal in the time domain Time, s Frequency,Hz Spectrogram of decrypted voice signal 0.2 0.4 0.6 0.8 0 5000 10000 10 0 -200 -150 -100 -50 0 Amplitude Spectrum of decrypted voice signal Frequency, kHz Amplitude,dBV 0 5 10 15 -150 -100 -50 0 50 Frequency (kHz) Power/frequency(dB/Hz) Power Spectral Density Magnitude,dB -100 -50 0
  • 8. International Journal of Network Security & Its Applications (IJNSA) Vol. 10, No.4, July 2018 18  The probability of guising each digit (P) =1/104  The probability of guising the 9 digits (PP) =1/104×9 =10-36  For the best case: the number of guising = 1036  For the worst case: the number of guessing=1  The average number of guessing=(1+1036 )/2 ~ 5 × 10 35  Suppose the matrix multiplication requires 10-9 seconds, so the hacking time will be: 5 × 10 35 ×10-9 = 5 × 10 26 sec = 5 × 10 26 /60= 8.3333×1024 min= 8.3333×1024 /60=1.3889×1023 hours = 1.3889×1023 /24= 5.7871 ×1021 days=5.7871 ×1021 /365.25=1.5844×1019 years The calculation results lead us to conclude that it is impossible or even very hard to hack the key which is always greater than 3 by 3 random matrix. 5.3 EFFICIENCY The proposed technique is implemented using different wave files with different sizes. Each time the encryption/decryption time is calculated, and some samples of time calculation are listed in table 3: Table 3. Encryption-Decryption Time From the results in Table 3, we find out that the results of the different sizes of wave files vary proportionally to the size of wave file. Encryption time increases as the file size increases in multiples of file size. The implementation results are compared with the results in [13] as shown in Table 4 and Figure 7. Table 4:Encryption Time Comparisons
  • 9. International Journal of Network Security & Its Applications (IJNSA) Vol. 10, No.4, July 2018 19 Figure 7. Comparison Results From table 4, we can compare the proposed technique results with the results of the other two methods by calculating the speedup as shown in table 5: Table 5:Speedup Calculation 6. CONCLUSIONS An efficient and secure technique for wave file encryption- decryption is proposed, implemented, tested and compared with the other method of encryption-decryption and from the obtained results we can conclude the following: - The proposed technique can easily be used to encrypt-decrypt both mono and stereo wave files with any size. - The proposed technique is very secure and it is hard or even impossible to hack the private key. - The proposed technique provides zero error; thus, there is no loss of information during the process of encryption-decryption. - The proposed technique is very efficient being compared with other techniques and satisfies a high-speed up. 10 12 14 16 18 20 22 24 26 28 30 0 1 2 3 4 5 6 7 8 9 x 10 4 File size (MB) Encryptiontime(Msec) Proposed DEC Blowfish
  • 10. International Journal of Network Security & Its Applications (IJNSA) Vol. 10, No.4, July 2018 20 REFERENCES [1] Dastoor, Sarosh. "Comparative Analysis of Steganographic Algorithms Intacting the Information in the Speech Signal for Enhancing the Message Security in Next Generation Mobile Devices", IEEE Xplore Digital Library, in proceedings of The World Congress on Information and Communication Technologies. Mumbai, India, 11-14 Dec.2011: pp. 279-284. [2] Dey, Sandipan, Ajith Abraham, and SugataSanyal. "An LSB Data Hiding Technique Using Natural Numbers", in proceedings of IEEE Third International Conference on Intelligent Information Hiding and Multimedia Signal Processing. IIHMSP, Nov. 26-28, 2007, Kaohsiung City, Taiwan, vol.2: pp. 473-476. [3] Nosrati,Masoud, RonakKarimi, HamedNosrati and Ali Nosrati, "Taking a Brief Look at Steganography: Methods and Approaches", Journal of American Science, vol.7, no. 6, 2011: pp. 84- 88. [4] SandipanDey, Ajith Abraham, BijoyBandyopadhyay and SugataSanyal. "Data Hiding Techniques Using Prime and Natural Numbers", Journal of Digital Information Management, vol. 6, no. 3, pp. 463-485, 2008. [5] Stern, Richard M. Fu-Hua Liu, Yoshiaki Ohshima, Thomas M. Sullivan, and AlexAcero, “Multiple Approaches to Robust Speech Recognition”, in proceedings of DARPA Speech and Natural Language Workshop, Feb. 1,1992: pp.274-279 . [6] Chatzimisios, P., Verikoukis, C., Santamaria, I., Laddomada, M., Hoffmann, O. (eds.). Mobile Lightweight Wireless Systems. In proceedings of The Second International ICST Conference, Mobilight, May 10-12, 2010, Barcelona, Spain, Revised Selected Papers. Springer. p. 164. [7] Wu, Bin, Jianwen Zhu and FaridNajm, “Dynamic-Range Estimation”. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, vol. 25, Issue 9, Sept. 2006, pp.1618- 1636. [8] Wu, Bin, Jianwen Zhu and FaridNajm, “An Analytical Approach for Dynamic-Range Estimation”, inProceedings of the 41st DAC AnnualDesign Automation Conference, San Diego, California, USA, June 7-11, 2004: pp. 472-477 [9] Wu, Bin, Jianwen Zhu and FaridNajm, “Dynamic Range Estimation for Nonlinear Systems.”IEEE/ACM. In proceedings of the International Conference on Computer-Aided Design(ICCAD-04), San Jose, California, Nov. 7-11, 2004. [10] Miller, Scott and Donald Childers. Probability and Random Processes: With Applications to Signal Processing and Communications.USA, Academic Press, 2012: pp. 370–375. [11] Gouyon, F., Pachet, F., Delerue, O., “Classifying Percussive Sounds: A Matter of Zero-Crossing Rate”, in Proceedings of the COST G-6 Conference on Digital Audio Effects (DAFX-00), Verona, Italy, Dec. 7–9, 2000. [12] B.L,Srinivas, Anish Shanbhag and Austin Solomon D’Souza , “A Comparative Performance Analysis of DES and BLOWFISH Symmetric Algorithm”, International Journal of Innovative Research in Computer and Communication Engineering, vol.2, Special Issue 5, Oct., 2014:pp.77-88.
  • 11. International Journal of Network Security & Its Applications (IJNSA) Vol. 10, No.4, July 2018 21 [13] J. Nadir, A. Abu Ein and Z. Alqadi, " A Technique to Encrypt- decrypt Stereo Wave Files", International Journal of Computer and Information Technology, ISSN: 2279 -0764, Volume 05 Issue 05, September2016 [14] M. Kaur and S. Kaur, "Survey of Various Encryption Techniques for Audio Data", International Journal of Advanced Research in Computer Science and Software Engineering, vol. 4, pp. 1314-1317, 2014