Robust Audio Encryption Method for MPEG-2 AAC ...

3 downloads 0 Views 712KB Size Report
Dolby Digital Audio Compression. I. Introduction. With the advancement of the multimedia technologies and the increased demand for multimedia data the need.
International Review on Computers and Software (I.RE.CO.S.), Vol. 10, N. 1 ISSN 1828-6003 January 2015

Robust Audio Encryption Method for MPEG-2 AAC Audio Based on Module Arithmetic and Chaotic Maps Ali Abdulgader, Mahamod Ismail, Nasharuddin Zainal Abstract – For audio distribution over the network, a secure audio compression format is required. In this paper a novel encryption scheme with low computational complexity is proposed to achieve security level for Advanced Audio Coding (AAC). In this scheme, the modular multiplication and circularly shifts are used to encrypt the selected quantized spectral coefficients and scale factors in the AAC encoding process. The proposed algorithm used chaos theory to generate the necessary random key for audio encryption. The Experimental results show that the encryption algorithms provide good audible distortion because each frame is encrypted by using different key. The proposed algorithms have very large key space and it's sensitive to any modification in the secret key. The proposed algorithms are strong against most attacks and have a high security which is due to combination of the quantized spectral coefficients encryption algorithm and the scale factors encryption algorithm depending on the characteristics of the chaotic system and it is suitable for transmit audio signal in secure way. Copyright © 2015 Praise Worthy Prize S.r.l. - All rights reserved.

Keywords: Chaotic Map, MPEG Audio Encryption, AAC Encoding, Quantized Spectral

This type of encryption scheme may not be efficient enough to meet the real-time requirements; also the structure of multimedia data may be destroyed by these encryption schemes [1], [2]. Audio coding and encryption have much significance in the current digital communication system. However, only few studies of selective encryption were conducted for audio data especially in the compression domain. A number of encryption schemes were proposed in the last decades to encrypt audio data in compressed domain. Servetti et al.[3] proposed a frequency selective partial encryption of compressed audio, where the spectral content of the audio data were obtain by low pass filters. The complexity of the algorithm is high and it takes more time for encryption and decryption. Perceptual based approach for MPEG Audio Layer III (MP3) encryption is proposed by Torrubia and Mora [4]. In this approach, the Huffman’s code bits were changed in such a way that the decoder could construct the corresponding 576 frequency lines. The Huffman’s codes are replaced by another codeword of same size and then encrypted by XOR with the pseudo random bit-stream. For security reason, this technique is not suitable for real time application because the encryption technique is vulnerable against the Brute Force Attack. Progressive audio scrambling in compressed domain was proposed by Yan et al [5], where raw audio and MP3 audio were scrambled with a set of the key that generated by using Arnold matrix. But this method is vulnerable to known plaintext attack, chosen cipher text attack and brute force attack. Wang et al. proposed an index based selective audio encryption system for wireless multimedia sensor

Nomenclature AAC DES AES MPEG MP3 XOR MDCT DTV SFBs SF ESC gcd DSF mod SNR CR CCR AC3

Advanced Audio Coding Data Encryption Standard Advanced Encryption Standard Moving Picture Experts Group MPEG Audio Layer III Exclusive OR operation Modified Discrete Cosine Transform Digital Television Scale Factor Bands Scale Factor Escape code sequence Greatest common divisor Difference scale factors Modulo operation Signal-to-Noise-Ration Compression Ratio Changed compression ratio Dolby Digital Audio Compression

I.

Introduction

With the advancement of the multimedia technologies and the increased demand for multimedia data the need for secure transmission of multimedia signal has received significant attention in the last several years. A straightforward way to protect the media data is to apply the traditional cryptographic algorithms such as Data Encryption Standard (DES) and Advanced Encryption Standard (AES) to encrypt the whole bit stream. However, due to the large file size of the media data.

Copyright © 2015 Praise Worthy Prize S.r.l. - All rights reserved

80

Ali Abdulgader, Mahamod Ismail, Nasharuddin Zainal

network [6], the scheme protects data transmissions by incorporating both resource allocation and selective encryption based on Modified Discrete Cosine Transform (MDCT) ([13]-[15]). The analytical and simulation results demonstrated that proposed selective encryption approach with unequal resource allocation improves the network real-time performance and computational efficiency, and also reduces the energy consumption under the same audio transmission quality. Because MPEG Advanced Audio Coding (AAC) is used widely in broadcast, movie, Digital Television (DTV) and portable device, our research on how to encrypt the audio data in AAC compression domain .The paper is organized as follows. In Section II, we introduce the AAC compression. In Section III, we describe the proposed selective encryption technique for AAC audio. Results and conclusions are presented in Section IV and V respectively.

II.

In AAC encoding, the compressed signal can be represented as: 3

 T 4 X s   2 4 X i 

(1)

where T is the scale factor calculated by the perceptual model and Xi (i=1, …, 1024) represents the quantized data. The quantization parameters are specified by scale factor T and the global gain g. the scale factors T are coded by taking the difference of neighboring scale factors and then transmitted with variable length coding. Quantized spectral coefficients in each band are assigned with an index and then this index is encoded into Huffman code. There are 12 codebooks in the AAC standard, each of which indicates the information including the largest absolute value able to be encoded, dimension and signed or unsigned. There are two special codebooks, the one is “zero” codebook, indicating that neither scale factors nor quantized data will be transmitted. The other is the ESC codebook, which can indicates values larger than 16. In the ESC codebook, quantized coefficient with absolute value ranging from 0 to 15 is encoded according to its actual value, while the absolute values are larger than or equal to 16, an escape sequence is needed, which consists of an escape prefix of N +1 followed by an escape separator of one zero, and an escape code word of N +4 bits representing an unsigned integer value. At the decoder, an escape sequence of 00000 would decode as 16, an escape sequence of 01111 would decode as 31, one of 1011111 as 63, and so on. In AAC stream structure, single_channel_element describes the main channel information, including three groups of essential parameters: global_gain, scale_factor_data, and spectral_data [7], [8].

The AAC Encoding

The Advanced Audio Coding (AAC) standard is part the MPEG-2 family and it used for lossy digital audio compression. The Advanced Audio Coding (AAC) standard is part the MPEG-2 family of audio coding standards [7]. The AAC encoding consists of frequency transform, quantization, entropy coding, and bitstream multiplexing steps. The procedure of AAC encoding is summarized as follows: firstly, converted the time domain audio signal into the frequency domain spectrum using the Modified Discrete Cosine Transform (MDCT) with 50% windowed overlap. This is done by using filter banks that take 1024 time samples per frame and convert them to frequency samples (spectral coefficients), at the same time, the block type of the current frame, masked thresholds, and other controlling coefficients are calculated according to the psychoacoustic model. Then the MDCT coefficients are quantized in two iteration loops, the inner loop quantizes the input data and controls the number of bits needed to encode a frame within the available bits by modulating the global scale factor, while the outer loop checks that the distortions introduced by the quantization do not exceed the threshold defined by the psychoacoustic model by adjusting the scale factors within each scale factor band. The 1024 frequency samples in each time frame are separated typically into 49 scale factor bands (SFBs).As not all 1024 coefficients are relevant for the perception of the decoded signal by the human ear, not all coefficients are quantized. Within each scale factor band, all coefficients are quantized using the same scalar quantizer. The quantizer step size is controlled by a Scale Factor (SF) selected from a range of typically 60 SFs. Finally, Huffman coding is applied to encode the quantized coefficients and the scale factors, together with other information to output the AAC bitsream.

III. Proposed Encryption Technique In this work, the proposed scheme explores the possibility of working directly in the compression domain. The proposed scheme is selective encryption, small portions of audio data are only needs to be encrypted to achieve high security, because meaningful arithmetic decoding at any location of compressed code stream depends on the complete knowledge of all the previous bits. A particular requirement is that the encrypted audio data must still be compatible to the corresponding audio standard. To meet these requirements, the relevant parts of an audio stream have to be selected specifically according to the media type and its file format. The encryption process is applied to the MPEG audio at the encoder and decoder sides on a frame by frame. In this work, we propose three algorithms to encrypt audio data. The most suitable components for encryption are spectral coefficients at low frequency bands and also the difference scale factor value. By encrypt these data the

Copyright © 2015 Praise Worthy Prize S.r.l. - All rights reserved

International Review on Computers and Software, Vol. 10, N. 1

81

Ali Abdulgader, Mahamod Ismail, Nasharuddin Zainal

audio quality it will be affect. The basic structures of the encoding/encryption and decoding/decryption procedure and in AAC are shown in Figs. 1.

Mathematically it is define as:

xn 1  r  sin   xn 

where r is a parameter between 0 and 1, x0 is the initial condition and the output/input with a range of [0, 1]. The chaotic behaviors of sine map achieved when the parameter r∈[0.867, 1]. The Description of the Generator as following 1) The initial values (x0 and y0) of logistic and sin map are consider as the user keys and they are input to key generation process. 2) The random number sequences (S) produced by iteration the chaotic maps n time. Then multiplied each value by non zero integer factor F and then take round and modular arithmetic of these values to the integer: S   floor  x  F   mod 256 (4)

III.1. Key Generation The first step in designing the proposed encryption algorithm is to generate an n-valued keystream generator that used for encryption from the user key of the length L. In this proposed encryption algorithm, the onedimensional chaotic maps that used for key generator are the non linear logistic and sine map [9], [10]. For the encryption process with m-time repetition, m key are generated in the encryption process that is symmetric with the decryption one. The key generation process is applied both in the encryption and decryption processes. The logistic and sine map are described by III.1.1.

Logistic Map

where F is a factor equal to 104. 3) The random number sequences that drive from Logistic map used as key for encrypt the quantized spectral coefficients and the random number sequences that drive from sin map used as key to encrypt the scale factor in AAC audio encoding.

Logistic map was developed in 1974 by Mitchell Feigenbaum. Mathematically, the logistic map is defined as: xn 1    xn  1  xn  (2) where λ is a control parameter and λ [0, 4], n is number of iteration, x0 is the initial value within range [0, 1]. The chaotic behavior of logistic map can be achieved when parameter λ > 3.57. III.1.2.

(3)

III.2. Encryption Process for Quantized Spectral Coefficients (Algorithm 1) The description of each step of the proposed quantized spectral coefficients encryption algorithm and decryption process are shown as follows:

Sine Map

The sine map is another chaotic map that is used in the proposed method to increase randomly in PRGA.

(a)

(b) Figs. 1. (a) The block diagram of the AAC audio encoding and encryption, (b) Decoding and decryption

Copyright © 2015 Praise Worthy Prize S.r.l. - All rights reserved

International Review on Computers and Software, Vol. 10, N. 1

82

Ali Abdulgader, Mahamod Ismail, Nasharuddin Zainal

1. At the encoder side, for each frame in audio signal, the 1024 frequency samples in each time frame are convert to the frequency domain spectrum using the Modified Discrete Cosine Transform (MDCT) with 50% windowed overlap and then separated typically into 49 Scale Factor Bands (SFBs). 2. Select the quantized spectral coefficients in the lower scale factor bands for encryption. The quantized spectral coefficients in low frequency bands are chosen for encryption because the scale factor bands in high frequency band usually use Huffman codebook No. 0. In our case we select the scale factor bands of the length of {4, 8, and 16} for encryption. 3. Generate random key sequence k = {k1, k2, k3,…, kj}, kj∈{0, 256} randomly by using Logistic map and used as encryption key. The proposed scheme uses the modular multiplication for the encryption and modular multiplicative inverse during decryption. Consider p*k (mod b) is modular multiplication where p is plaintext p, and k is the random key sequence that has gcd(k,b)=1, Where k and b are relatively prime b is the modular value. Modular multiplicative inverse is define as p*k^-1 (mod b).The Extended Euclidean algorithm can be used to find the multiplicative inverse of k. 4. The quantized spectral coefficients (L) of the scale factor bands are encrypt by the multiplication with the encryption key (K) as following: for low frequency SFB(4,8 and 16) Generate random key sequence K of the length of SFB using chaotic maps Take the quantized spectral coefficients of the sfb but it in array if length(array) = (4 or 8 or 12 or 16) do for i = 1 to length:

Li 1  Li  K mod N

Addition with random key. There are 49 scale factors in MPEG AAC encoding. At the entropy process in the encoder side, the scale factors are coded by taking the difference of neighboring scale factors and then transmitted with variable length coding. To encrypt scale factors by the proposed algorithm, the scale factor values first are shift to left side one bit and then the difference scale factors are selected to be encrypted in the small range to keep the change in the bitstream as small as possible. TABLE I MPEG-2 AAC HUFFMAN CODEBOOKS Codebook Index Maximum Absolute Value Signed Values 0 0 1 1 yes 2 1 yes 3 2 no 4 2 no 5 4 yes 6 4 yes 7 7 no 8 7 no 9 12 no 10 12 no 11 16(ESC) no

The encryption steps as the following: Step1: shift the non zeros scale factors data on bit to the left scale_factors=bitshift(scale_factors,-1,). Step 2: Generate random key (PS). Step 3: select the non zeros of difference scale factors Step 4: for i=1 to number of nonzeros of difference scale factors (DSF) if (PS mod 2)~=0 DSFencryption(i)= DSF (i) * (-1); %change the sign of DSF else if abs(DSF (i))>=4 && abs(DSF (i))=8 && abs(DSF (i))=16 && abs(DSF (i))