Abstract

Scrambling transform is an important tool for image encryption and hiding. A new class of scrambling algorithms is obtained by exploiting negative integer as the base of number representation to express the natural numbers. Unlike Arnold transform, the proposed scrambling transform is one-dimensional and nonlinear, and an image can be shuffled by using the proposed transform to rearrange the rows and columns of the image separately or to permute the pixels of the image after scanned into a sequence of pixels; it can be also applied to shuffle certain part region of an image. Firstly, the transformation algorithm for converting nonnegative integers in base to the corresponding integers in base is given in this paper, which is the computational core of scrambling transform and the basis of studying scrambling transform. Then, the three kinds of transforms are introduced, that is, negative base transform (abbreviated as NBT), modular negative base transform (MNBT), and local negative base transform (LNBT) with three parameters, where NBT is an injection and MNBT a surjection and LNBT a bijection. The minimum transform periods of LNBT are calculated for some different values of the three parameters, and the algorithm for calculating the inverse transform of LNBT is given. The image scrambled by LBNT can be recovered by the transform period or the inverse transform. Numerical experiments show that LNBT is an efficient scrambling transform and a strong operation of confusing gray values of pixels in the application of image encryption. Therefore, the proposed transform is a novel tool for information hiding and encryption of two-dimensional image and one-dimensional audio.

1. Introduction

Because of the properties of visibility, intuitive, abundance in information expression and so on, digital images are widely applied in more and more fields such as remote sensing and geographical information, medical image, audiovisual art, radar navigation, copyright, and trademark; therefore, secure transmission and confidential storage of digital images have been gotten more and more attention by government, industry, and academia. Security protection of digital image includes mainly data encryption and information hiding. Image scrambling is a technique of image encryption or auxiliary encryption [19], and also an important method of preprocessing and postprocessing in image hiding, sharing, and digital watermarking [7, 1017]. Particularly in the application of robust digital watermark, scrambling technique is a very effective method against cropping attack by shuffling watermark image so that the pixels are dispersed in the position space of carrier image. The popular image scrambling methods include Arnold transform [13, 1012, 18], Fibonacci transform [7, 10, 13, 14], Peano-Hilbert space filling curve [19], knight's tour [8, 20], Lucas transform [16], magic square transform [9, 17], Gray code [21, 22], cellular automata [15, 2325], Baker map [46, 26], subaffine transform [27], and sampling technology [28].

Most of image scrambling transforms are two-dimensional, such as Arnold transform, baker map, Peano-Hilbert curve, John Conway game, knight's tour, magic square transform, and Fibonacci-Q transform [10]. For two-dimensional scrambling transforms, the popular scrambling transform is Arnold transform, but it requires the sizes of images are the form of [10]; Fibonacci-Q transform is the special case of Arnold transforms [10]. Unlike Arnold transform, knight’s tour [8] and Peano-Hilbert curve [19], John Conway game [15], and magic square transform [9] are not easy to calculate and are rarely used in the application of image scrambling. In general, if using John Conway game to shuffle images we first need to generate a random matrix of 0 and 1, and thus there are difficulties to restore scrambled images. In fact, Baker map is usually exploited to generate chaotic sequence on the interval [4], and if using baker map to shuffle images we must modify the formula of baker map.

One-dimensional scrambling transform can also be used in two-dimensional image encryption and information hiding. Battisti used Fibonacci transform to construct Fibonacci-Haar matrix and then studied digital watermarking and encryption algorithms in Fibonacci-Haar domain [7], while Li and Tsai exploited Fibonacci transform to shuffle watermark information [13, 14]. Gunjal combined Fibonacci transform with Lucas transform to construct Fibonacci-Lucas transform which is applied to shuffle watermark image [16]. Zou investigated a class of generalized Gray code and applied it to scramble color image. Two-dimensional scrambling transform or higher-dimensional scrambling transform [10] generally require that the shape of the region of scrambled image must be rectangular (i.e., the size of ) or even square such as Arnold transform. One-dimensional scrambling transform can not only permute a sequence of data, but also permute the pixels in an image region of any shape. In fact, as long as the pixels in the image region are scanned into a sequence in accordance with certain rule, we can exploit one-dimensional scrambling transform to permute these pixels.

In this paper, we use negative number as the base of numeral system to represent the natural numbers and then define negative base transform (abbreviated as NBT) with respect to radix ; construct modular negative base transform (abbreviated as MNBT) with respect to radix ; and modulo followed by constructing local negative base transform (abbreviated as LNBT) whose radix is and modulo and shift , where is an integer greater than 1 and , are natural numbers. In particular, LNBT is a bijective map from the subset of natural numbers to the subset itself. Since LNBT is one-dimensional and nonlinear, we can use it to shuffle one-dimensional audio signal and also to shuffle two-dimensional image. The rest of the paper is organized as follows. Section 2 studies the conversion rules and conversion algorithms from base integers to the corresponding base integers, which is the key of calculating NBT, MNBT, and LNBT. Section 3 gives the definitions of NBT, MNBT, and LNBT and then studies their properties and inverse transforms and last calculates the minimum transformation period of LNBT for some parameter values. Section 4 verifies the scrambling effect of LNBT by simulation experiments, which includes three kinds of scrambling algorithms: scrambling separately along x- and y-direction, scrambling a sequence of pixels after image scanned to a sequence line-by-line or scanned in zigzag order, and then tests the effect against cropping attack in digital watermarking application and the effect of image encryption by shuffling the binary bits of image pixels. Section 5 analyzes the scrambling effect and compares it with other scrambling algorithms; finally, the conclusion is given.

2. Using Negative Base to Express Nonnegative Integers

2.1. Principle of Number Representation with Negative Base

If selecting a negative integer () as the base of number representation, we only need figures to express all nonnegative integers, that is, we can use the symbols to express all nonnegative integers [29]. In this paper, for convenience, the notation is used to denote an -digit integer in base , where is an integer of absolute value greater than 1, and , . For the convenience of description, we also call the th digit of . The rest of this paper, we always suppose is an integer greater than 1. Next, we shall discuss the calculation for conversion from nonnegative integers in base to integers in base .

2.2. Conversion Calculation from Base B Integer to Base −B Integer

Assuming that is an integer greater than 1, a base integer can be converted directly to the corresponding decimal integer expressed by the sum of the product which the th power of is multiplied by the th digit value, as do a base integer to decimal integer, namely,The method of seeking remainder can achieve the conversion from decimal integers to base integers [29]. Next, we shall investigate the algorithm for converting base integers to base integers. Although we can apply the method in [29] to convert successfully base integers to base integers after the base integers being converted to decimal integers, we still need to investigate the method of straightforward conversion of base integers to base integers. There are two main reasons. First, Theorem 7 needs to use the conclusion of Theorem 1, that is, we need to get the relation of the digit capacities between any base integer and the corresponding base integer. Second, sometimes we need to convert base integers directly to base integers. The proposed algorithm can achieve simply the conversion from base integers to base integers; especially the conversion method from binary integers to negabinary integers is simpler. We will consider the issue of the digit capacity of the base integer converted from a known base integer, that is, there is Theorem 1 as follows.

Theorem 1. Suppose is a positive integer in base to be converted, where , while is the converted integer in base , where , then .

Proof. First, holds obviously, followed by must be even, since if is odd, which contradicts .
Next, we prove is not greater than . Denoted by the minimum of digits integers in base for all satisfying . It is obvious that the value of the positive integer as expressed by is smallest only if , , , and there isAssume , i.e., , since , we have, from (2)The above inequality shows that cannot be converted to such a base integer of digit capacity greater than .

Theorem 1 shows that can be converted to a base integer with ()-digit at most, that is, when be converted, there may be carries from the nth digit place to the th digit place or the th digit place, but not to the th digit place. To be more exact, there is the following Corollary 2.

Corollary 2. Suppose . If is even, then can be converted to the forms of or ; if is odd, then can be only converted to the form of .

Proof. It is obvious that cannot be converted to the form of such that . Then according to Theorem 1, can be only converted to three forms as follows:If is even, it is clear that the form of (6) is likely to appear, for example, if , (), there is ,   () after converted to the corresponding integer in base . On the other hand, if taking , , (), there is , , , , (); this indicates that can be possibly converted to the form of (4). Since it can be deduced from that , the form of (5) cannot occur.
If is odd, it is clear that cannot converted to the forms of (4) and (6); otherwise, there is . So is only converted to the form of (5).

When an integer in base is converted to the corresponding integer in base , we suppose the conversion process is from right to left digit-by-digit. Then Corollary 2 shows that, when being converted, there may be two carries need to be carried to the th digit place and the th digit place if is even; otherwise, there is only a carry to the th digit place. From Corollary 2, we can get the following conversion rules, namely, Corollary 3.

Corollary 3 (conversion rules of base integer to base integer). Suppose is a base integer that needs to be converted, where , and is the converted base integer, where and are likely to be zeros. Let be a sequence of carries in the process of conversion, and initial values (). Then, in accordance with the following rules, base integer can be correctly converted to the corresponding base integer.
(i) When is even, if , then , , ; otherwise, .
(ii) When is odd, if , then ; otherwise, , .

The left arrow “” in the above denotes that the value of the expression on the right side is assigned to the variable on the left side. In the following, we shall prove that Corollary 3, in fact, only proves that the converted integer in base is equal to the original base integer.

Proof. If is even and , there isCorollary 2 indicates , and from , we have , i.e., . Corollary 2 tells us again that, when is converted, there is only a carry from the th digit place to the kth digit place, and when is converted, there are two carries at most from the digit place to the th digit place and the th digit place. That is to say, when being converted, the initial values . Therefore, it follows from (7) that , . If , obviously, there isi.e., .
If is odd and , then , and the inequality indicates that is true. If , we haveThe inequality and (9) imply that and there is a carry 1 from the current digit place to the th digit place. In addition, it can be known from Corollary 2 that, when being converted, maybe there exist two carries from the th digit place to the th digit place and the th digit place, namely, may not be equal to 0 when being converted. Therefore, need to accumulate the carry 1, i.e., is true.

So we can obtain Algorithm 1 from Corollary 3.

Require: % the sequence of digits of a base B integer
% the base of the numeral system
Ensure: % the sequence of digits of the base integer
Remark: % satisfying
While    do
end while
while  
if  k is even  then
if    then
else  
end if
else  
if    then
else  
end if
end if
end while

For binary, the conversion process is more concise, and the specific conversion rules are described in the following Corollary 4.

Corollary 4 (conversion rules of binary positive integers to negabinary integers). Suppose is a binary positive integer to be converted, where ; is the converted negabinary integer, and the initial values for . Then the following conversion rules hold.
(i) When is odd and , if , then , ; otherwise .
(ii) When is even and , if , then ; otherwise , , .
(iii) If , then the value of keeps changeless.

3. Scrambling Transform Based on Negative Base

Image scrambling, which can change a certain image into another meaningless image, is a special transform from a subset of natural numbers to the subset itself. Rearranging the position of the pixels in the position space of image by permutation on a finite set of the natural numbers can achieve the purpose of scrambling image, such as Arnold transform, baker map, and knight’s tour. Next, we define a new class of scrambling transforms based on the principle of number representation in negative bases.

3.1. Negative Base Transform

Unlike the common image scrambling transform, the scrambling transform studied in this paper is one-dimensional, which is such a transform of a certain subset of the natural numbers to the subset itself. First, we define negative base transform in the following.

Definition 5 (negative base transform). For any , if transform satisfiesthen is referred to as negative base transform with respect to base , abbreviated as NBT, and is called transformation parameter of NBT, where is the digit place of the converted integer in base corresponding to .

From Definition 5, we know that, for computing , the natural number must be converted to the form of , and then calculate . For example, since , then . Table 1 gives the values of NBT with parameter of the natural numbers from 0 to 15. According to Table 1, we can know that, after the natural numbers between 0 and 15 is transformed by NBT, the order of the transform is already different from the original order of independent variable, and some of are no longer in the set , e.g., .

3.2. Modular Negative Base Transform

Assume denote a subset of the natural numbers from to , where , , and denotes the set of natural numbers. In general, Image scrambling transform is a bijective map from a finite set to . Unfortunately, NBT is an injective map from the set of natural numbers to itself, but not surjective, and cannot be used directly in application of image scrambling. Hence we shall make some modifications for NBT so that the modified transform is a bijective map from to . According to the transform NBT, we shall introduce another new transform from to as follows.

Definition 6 (modular negative base transform). For , if transform satisfiesthen transform is called modular negative base transform with respect to base and modulo , abbreviated as MNBT, where is an integer greater than 0.

Obviously, MNBT is a surjection from to , but not an injection. In order to make MNBT a bijection, it is necessary to restrict the definition domain of MNBT such that Theorem 7 is true in the following.

Theorem 7. If the definition domain of MNBT is , then MNBT is a bijective map from to .

Proof. Suppose is an MNBT as defined in (11). In fact, we only need to prove that is injective if , that is, prove thatSince any integer in can only be expressed as a -digit integer in base at most, it follows from Theorem 1 that and only are represented as a -digit integer in base at most. Without loss of generality, we expressed and as -digit integers in base ; if the number of digits is not enough, we fill 0 in front of them, that is,where for and , is possibly equal to 0. Let Assume is not an injection; there is such that , namely, . Therefore, we can infer thatSince implies , then there must beIf we can prove that (16) is not true, the fact that is an injective map is proven, i.e., we complete the proof of the theorem.
In accordance with (15), there isIf , then, from (17), there isThis contradicts obviously ; thus this shows .
If , then, from (17) and , there isThis also contradicts and shows that is not true. Therefore we have already completed the proof of Theorem 7.

It is noteworthy that MNBT is a bijective map from to , but not from to the set itself. If taking , then MNBT is a bijective map from to , but in this case, MNBT will map some points to themselves, i.e., the transformation periods of these points are 1, for example, . Thus MNBT cannot be used directly in the application of image scrambling and need to be modified further. In fact, combining MNBT with translational transform with respect to shift , we can obtain a permutation from to , which is of course a bijective map.

3.3. Local Negative Base Transform

Local negative base transform can be constructed by combining MNBT with a translational transform with shift .

Definition 8 (local negative base transform). If the map satisfiesthen is called local negative base transform with respect to base , modulo , and shift , abbreviated as LNBT.

In Definition 8, is also referred to as LNBT with parameter . Obviously, if , LNBT is simplified as MNBT. The following corollary is easily established in accordance with Theorem 7.

Corollary 9. LNBT is a bijective map from to , i.e., LNBT is a permutation on .

Corollary 9 shows that LNBT is a scrambling transform from to itself. Next, we describe the calculation method of LNBT, shown as the Algorithm 2.

Require: % the nonnegative integer
% the parameters of LNBT
Ensure: % the value of LNBT
Remark: %   satisfying
=Converting base B integer to base B integer  
%   satisfying

For example, if we take , we can calculate easily the values of LNBT according to Algorithm 2, and the calculated results as shown in Table 2, where in Table 2 is defined as (20).

It is obvious that scrambling transform LNBT can map the subset of to ; moreover, LNBT can map (scatter) uniformly the entries of the subset to the set after many times of LNBT. Figure 1 is the result after 19 times of permutation by LNBT, and it can be seen that the black pixels have been scattered uniformly onto the entire position space of the images; especially, the effect is better in the case of implementing transformation after the image is scanned into one-dimensional sequence (the form of row vector). Generally, as long as is even and is large enough, the scrambling effect is very good. When the pixels are permuted along x-direction, the positional relationship between adjacent pixels at y-direction cannot be changed. Likewise, when permuting the pixels along y-direction, the positional relationship between adjacent pixels at x-direction cannot be changed. Therefore, the pixels shuffled along x- and y-directions separately will result in the black pixels aligned, as shown in Figures 1(b) and 1(f).

3.4. Minimum Transformation Period and Inverse Transformation

In the application of digital watermarking and image encryption, it is often necessary to restore the scrambled image. There are two kinds of methods for restoring scrambled image, that is, by inverse scrambling transform and by minimum transformation period.

3.4.1. Minimum Transformation Period

Like Arnold transform, MNBT and LNBT exist transformation periods, as shown in Theorem 10. In Theorem 10, we use the notations and , which are defined bywhere and as defined by (11) and (20).

Theorem 10 (period existence theorem for LNBT and MNBT). There exists a positive integer such that for any and a positive integer such that for any .

Proof. We only prove that exists the transformation period and can also use the same method to prove . Since the number of entries in the set is finite, we only prove that, for any , there is such that ; in fact, the transform period of is the common multiple of all .
Suppose for any positive integer there is such that . Let , for any positive integer , we have, from the fact that is bijective,On the other hand, let , , from and pigeonhole principle; we know that there is such that . Without loss of generality, assume , then from the fact that is a bijective map and , we can conclude , namely, . This contradicts (22). Therefore, there must exist a positive integer such that . The proof of this theorem has already completed.

If using the periodicity of scrambling transform to restore scrambled image, we must find the minimum transformation period of LNBT, but Theorem 10 does not give a calculation method of the minimum transform period. In general, it is not easy to determine the minimum transform period of MNBT and LNBT. Table 3 is the minimum transform periods of MNBT and LNBT withfor . For example, for , the minimum transformation periods of all entries on are 3 and 6, respectively. Then the minimum transformation period of LNBT with parameter is 6 as shown Table 3.

Looking at Table 3, we can get the conclusion as shown in Proposition 11.

Proposition 11. The set is the definition domain of LNBT, where is nonnegative. For different and , there is the following conclusion.
(i) The minimum transformation periods of LNBT are not greater than . If B=2,4,8 and is odd, or is even and , the minimum transformation periods of LNBT is equal to .
(ii) If is even, the difference between and the minimum transformation period is bigger.
(iii) If is odd, the difference between and the minimum transformation period is also bigger.

Conclusion (i) in Proposition 11 is very important, and in the application of image scrambling, we often take as an even number and as an odd number; especially, take and . In general, the effect is better if the difference between and the minimum transformation period is smaller. In fact, is often a transformation period of LNBT with parameter , but is not necessarily the minimum transformation period. For example, LNBT with parameter is a cycle on the set , namely, , and this shows that the minimum transformation period of LNBT with parameter is equal to 8. Figure 2 is the experimental results by using minimum transformation period to restore scrambled image, where the parameter values are in (b) and (c).

3.4.2. Inverse Transforms of MNBT and LNBT

It is not easy to compute the minimum transformation period of MNBT and LNBT for different parameters ; on the other hand, although the minimum transformation period is sometimes known, but the minimum transformation period is possibly large, so that the computational complexity of restoring scrambled image becomes large. For example, if we use LNBT with parameters to shuffle the pixels of an image of size after scanned into a sequence, then the minimum transformation period is 262144. Therefore, the calculation is sometimes difficult by using the periodicity of LNBT to restore scrambled image, while the calculation of restoring scrambled image is more concise and faster by inverse transform of LNBT.

Let ; (10) implies , i.e., and . Thus, from (10), the inverse map of NBT is obtained directly, namely,and satisfies the condition . Equation (24) tells us the process of calculation, which convert to an integer in base and then calculate the expression of right side in (24).

Suppose the definition domain of MNBT is . Next, we consider the calculation for the inverse map of . According to Theorem 1 and (11), we can conclude that there exists a nonnegative integer such that . From (24), we can get the inverse map of MNBT, namely,where satisfies . In order to compute in (25), we must first determine the value of . In fact, the selected must make the calculated from (25) satisfy , and from the fact that MNBT is permutation on , we know that is uniquely determined.

From (25) and (20), we can get the inverse map of LNBT, namely,Therefore, the inverse transform can be calculated from (26), (27), and (28), and the specific details are depicted as Algorithm 3.

Require: % non-negative integer
% the parameters of inverse LNBT
Ensure: % the value of inverse LNBT
Remark: %   satisfying
while   or   do
% converting into the sequence of base
7: end while

Figure 3 is the experimental results of image scrambled by LNBT and image restored by inverse LNBT, where the parameter is and the size of image is 512×512. Image (b) is the scrambled image by 19 times of LNBT along x- and y-direction separately and image (c) is the restored image by 19 times of inverse transform of LNBT.

4. Experiments of Image Scrambling

4.1. Scrambling along X- and Y-Direction Separately

Unlike Arnold transform, LNBT is a bijective map from the definition domain to definition domain itself, and if using LNBT to shuffle two-dimension image, we can permute the pixels of image along x- and y-direction. Selection of parameter is relation to the size of image to be scrambled; suppose the size of image is , we should select at y-direction and at x-direction and take as an odd number. For example, Figure 4(a) is an image of size 216×256; then we can select the parameter at x-direction and at y-direction. Figure 4(e) is another image of size 256×256; then we can select the same parameter both x- and y-direction. From Figure 4, we find that the scrambled pixels are aligned along x- and y-direction, respectively.

4.2. Scrambling after Scanned into a Sequence

(i) Scan Line-by-Line. In order to eliminate the alignment phenomenon of pixels as described above after image was scrambled along x- and y-direction separately, the easiest method is that we use LNBT to permute the sequence of pixels after two-dimensional image is scanned into a one-dimensional sequence line-by-line. Figure 5(a) is an image of size 216×216, and after being scanned into a one-dimensional vector, the length of the corresponding one-dimension vector is ; thus we select the parameter to shuffle the pixels. Figure 5(e) is another image of size 256×256, and we can select the parameter to shuffle the pixels after being scanned into a one-dimension vector. From Figures 4 and 5, we find that the smaller the parameter B is, the better the scrambling effect is.

(2) Scan in Zigzag Order. After scanning a two-dimension image into a sequence of pixels line-by-line, if taking we can obtain a good scrambling result by many times of LNBT, as shown in Figure 5(h), but if selecting , the scrambling effect is not very good. In Figure 6, we first use the zigzag scan technique to change a two-dimension image into the corresponding one-dimension vector and then use LNBT to permute this sequence of pixels; last, we use the same zigzag order to arrange the scrambled sequence and obtain the corresponding scrambled image. Compared with Figure 5, we find the effect of image scrambling becomes better in Figure 6.

4.3. Irregular Region Scrambling of Image

We consider two cases that the size of image cannot express as the form of and the image region to be shuffled is irregular. Since LNBT is a kind of one-dimensional scrambling transform from to , if using LNBT to permute two-dimensional image, we must change the image into the corresponding one-dimensional sequence of pixels, and then we permute the sequence of pixels; of course, we can also permute an image along the horizontal and vertical direction separately. Therefore, we can shuffle image region of any shape and images of any size. In the application of part information hiding and encryption of image (e.g., sensitive area scrambling) [3032], unlike Arnold transform, LNBT can shuffle image region of any shape.

(i) Case 1: Irregular Size. If the size of image cannot be expressed as the form of , we cannot use directly LNBT with parameter to permute the x-coordinate and with parameter to permute the y-coordinate. Therefore, such size of image is called irregular size in this paper. Suppose the size of an image is , and for any positive integers and satisfying or any positive integers and satisfying . Without loss of generality, we suppose cannot be expressed as the form of , then there exist , , , and such that where and thus the set can be divided into subsets. For the first subsets, we select LNBT of parameters to shuffle where , . For the last subset , first, extend the left end of to ; then shuffle the extended subset after the first subsets were shuffled. Figure 7 is the scrambling result of the image of size 720648. First, permute x-coordinate between 1 and 512 as shown in Figure 7(b), and next, permute x-coordinate between 209 and 720 as shown in Figure 7(c). The results of permuting y-coordinates are shown in Figures 7(d) and 7(e).

(2) Case 2: Irregular Shape. Sometimes we require shuffling a certain region of image [3032]; in this case, the region to be shuffled may be irregular with respect to size or shape, and therefore it is difficult for two-dimensional scrambling transform to shuffle such irregular region. Unlike Arnold transform, baker map, John Conway game, knight’s tour, magic square transform, and Peano-Hilbert curve, LNBT can be exploited to shuffle region with irregular shape of image, and specific operations are divided into two steps. First, the pixels of the region of image to be scrambled are scanned as one-dimensional sequence; second, use the above scrambling method for irregular size to shuffle the one-dimensional sequence. In Figure 8, we scan the pixels of image region into one-dimensional sequence and then permute these pixels of the sequence. Figure 8 is the results of three shapes by 19 times of LNBT.

4.4. Scrambling on Bit Plane along x- and y-Direction

Permuting the pixel position of an image can only destroy the correlation of adjacent pixels but cannot change the statistical properties of the image, such as histogram and information entropy. This is because scrambling transform based on pixels cannot change the gray value of pixels. If the binary bits of the image pixels are scrambled, it can cause the pixel values to change and thereby can change the statistical properties of the image. If we use binary number of 8 bits to express the value of a pixel, then we can use 0 and 1 to represent a certain image. Therefore the size of a gray image of is and each pixel can be represented by binary block of size 2 × 4 or 4 × 2, 1 × 8, 8 × 1. For example, if we use a binary block of 2 × 4 to express a pixel of a gray image of size , we can get a binary matrix of size , and then use LNBT to permute the position of 0 and 1 in the binary matrix corresponding to the gray image. In Figure 9, we first convert original image to a binary matrix where the size of binary block of a pixel is 2 × 4; next, apply LNBT to shuffle the binary matrix along x- and y-direction separately; finally, we convert the scrambled binary matrix to a scrambled image, i.e., a binary block of size is converted to a pixel. From Figure 9, we see that the scrambling transform based on bit plane not only makes the scrambled image meaningless but also changes the statistical properties of the original image. Thus this shows that LNBT is also a tool of image encryption.

4.5. Digital Watermarking against Cropping Attack

In the robust watermarking of digital images, image scrambling is a powerful method for resisting cropping attack. LSB (least significant bit) algorithm is a simple digital watermarking technology, but as a large amount of data hiding method, LSB has a significant position. Figure 10 is the experimental result of combining LNBT with LSB algorithm. The implementation process is as follows. First, use 19 times of LNBT to shuffle the carrier image, then embed the bits of the watermark image into the least significant bits of the scrambled carrier image, and finally, use the inverse transform of LNBT to obtain the watermarked image (b). Images (e), (g), (i), and (k) are the extracted watermarks from the watermarked imaged after attacked by cropping, and Figure 10 shows that LNBT is effective against cropping attack.

5. Analysis and Conclusions

5.1. Correlations between Adjacent Pixels

The goal of image scrambling is to remove the correlation between the pixels of a plaintext image, and therefore the correlation value between adjacent pixels of image is an important index for evaluating the performance of the image scrambling algorithm. Assuming that and are two sequences consisted of horizontal or vertical or diagonally adjacent pixels, their correlation value can be calculated by [6]where is the length of sequences. Obviously, if the correlation value is close to 1, it indicates that there is a higher correlation between adjacent pixels. If the correlation value is close to 0, then the two adjacent pixel sequences have a lower correlation. Therefore, the smaller the correlation value is, the better the performance of the scrambling algorithm is.

To measure the performance of LNBT scrambling algorithm by using the correlation values of neighboring pixel sequences. First, we use other common scrambling algorithms and the proposed algorithm in this paper to perform a 32-round scrambling transformation on the Lena image. Then pick out the largest value of GDD (see Section 5.2) in the 32-round transforms as the last results of each scrambling algorithm for comparison. Finally, we randomly select 5000 pairs of horizontally adjacent pixels, vertically adjacent pixels, and diagonally adjacent pixels and then calculate the correlation values of the neighboring pixel sequences of the three directions in the original image and the correlation values of the three directions in the scrambled images, respectively. Columns 4, 5, and 6 of Table 4 are correlation values of adjacent pixel sequences of the three directions in the original image and in the scrambled images, where LNBT-1 denotes the LNBT scrambling algorithm of permuting separately along x- and y-direction; LNBT-2 denotes the LNBT scrambling algorithm after scanned line-by-line; LNBT-3 denotes the LNBT scrambling algorithm after scanned in zigzag order. We can know from Table 4 that the LNBT scrambling transform can successfully remove the correlation between adjacent pixels. Figures 11(a), 11(b), and 11(c) display the gray-scale distributions of 5000 pairs of horizontally adjacent pixels, of vertically adjacent pixels, and of diagonally adjacent pixels, respectively, which are selected randomly from original image. (d), (e), and (f) are the gray-scale distributions of an adjacent pixel sequence pairs for horizontal, vertical and diagonal directions in the scrambled image using LNBT-1; (g), (h), and (i) show the gray distributions of an adjacent pixel sequence pairs for the three directions in the scrambled image using LNBT-2; (j), (k), and (l) are the gray-scale distributions using LNBT-3. The results of Table 4 and Figure 11 show that LNBT can successfully remove the correlation between adjacent pixels of plaintext image

5.2. Scrambling Degree

Unlike correlation values, scrambling degree can be used to evaluate the correlation of adjacent pixels of a whole scrambled image. If a scrambling algorithm can obtain a large scrambling degree, the algorithm can achieve high confusion and diffusion properties. Image scrambling degree is determined by the gray difference between adjacent pixels [25]. Assuming that is the gray value of the pixel at position , the gray difference of pixel can be calculated using [2325]where , , and the image size is . We use to represent the average gray-scale difference of whole image; obviously, can be calculated using Assume that represents the average gray-scale difference of plaintext image and represents the average gray-scale of the scrambled image. Then, according to paper [25], image scrambling degree can be calculated as follows:From (32), it can be seen that the value of is between -1 and 1, and the larger the value of is, the better the performance of the scrambling algorithm is. The data in the third column of Table 4 is the maximum value in 32-round transform for each scrambling algorithm. The remark below Table 4 shows that GDD does not accurately evaluate the performance of a scrambling algorithm, and sometimes there is a large visual difference. Figure 12 is the scrambled images using scrambling algorithms to shuffle Lena image. The scrambling effect of Figures 12(e), 12(g), 12(k), and 12(l) is obviously better. Therefore, it can be seen from Table 4 and Figure 12 that LNBT has good image scrambling performance.

5.3. Conclusions

This paper gives a new kind of scrambling transform, which is one-dimensional and is called LNBT with three parameters. LNBT is bijective, and thus LNBT is invertible and is a permutation on a finite subset of the natural numbers. Since LNBT has good scrambling performance, it can be used to shuffle two-dimensional image; in fact, it can be directly used to scrambled one-dimensional audio signal and also used as a tool of encryption.

Conflicts of Interest

These authors declare that there are no conflicts of interest regarding the publication of this paper.

Acknowledgments

This work is supported by the National Natural Science Foundation of China under Grant 61170320, the Natural Science Foundation of Guangdong Province of China under Grant S2011040002981, and the Science and Technology Development Fund of Macau under Grant 048/2016/A2 and Grant 0012/2018/A1.