Keywords

1 Introduction

With the rapid development of the market economy, fake and inferior products have become rampant and seriously infringe the rights and interests of consumers. Therefore, in order to resist fake and inferior products a lot of research has been done in the past 20 years, anti-counterfeiting technology has developed rapidly. At present, the most widely used Quick Response code [1,2,3] and barcode anti-counterfeiting methods can realize automatic identification fast, but it is easy to copy and imitate because of its surface printing. However, the research hotspot in the field of anti-counterfeiting at present – RFID anti-counterfeiting technology [4,5,6] are difficult to apply to the market due to its high cost. In view of the existing problems of anti-counterfeiting technology, some engineers have proposed a new anti-counterfeiting technology–authentic anti-counterfeiting technology [7].

Authentic work anti-counterfeiting is a new anti-counterfeiting technology which makes use of special textpatterns. Each word in the selected phrase is rotated at random angles and then carved randomly according to the text to form a unique text pattern. This kind of unique character design tag made randomly is used for anti-counterfeiting [8].

In this paper, the anti-counterfeiting tags are encrypted and stored in the cloud on the basis of authentic work anti-counterfeiting. Experiments show that the security performance of encrypted anti-counterfeiting tags is improved without loss of robustness [9]. Compared with the low-dimensional chaotic system which has the defect of small secret keyspace and low security [10, 11], the high dimensional chaotic image encryption algorithm proposed in this paper has higher complexity, randomness, and unpredictability, and able to resist attacks such as brute attack and other deciphering methods better.

2 The Fundamental Theory

2.1 Logistic Map

The logistic map is one of the most famous chaotic maps, which is a simple dynamic nonlinear regression with chaotic behavior. Even small changes in the initial value can cause significant differences in the output sequence [10,11,12], and it has statistical properties similar to white noise. Its mathematical definition can be expressed as follows:

$$ x_{k + 1} = \mu x_{k} (1 - x_{k} ) $$
(1)

where \( 0 \le \mu \le 4 \) and \( xk\;{ \in }\; ( 0 , 1 ) \) are the system variable and parameter respectively, and k is the number of iteration. Logistic Map system works under haotic condition when \( 3. 5 6 9 9 4 5 \le \mu \le 4 \). It can be seen that a small difference in initial conditions would lead to a significant difference of chaotic sequences. These statistical characteristics are the same as white noise, so the above sequence is an ideal secret key sequence. In this paper, we set \( \mu = 4 \), and the chaotic sequences are generated by different initial values.

2.2 Chen’s Chaotic System

In 2002, Lü et al. connected the Lorenz system and Chen’s system with a new three-dimensional chaotic system [13], calling it a unified chaotic system. Its mathematical definition can be expressed as follows:

$$ \left\{ {\begin{array}{*{20}l} {\dot{x} = (25a + 10)(y - x),} \hfill \\ {\dot{y} = (28 - 35a)x - xz + (29a - 1)y,} \hfill \\ {\dot{z} = xy - (8 + a)z/3} \hfill \\ \end{array} } \right. $$
(2)

Where \( (x,y,z) \in R^{3} \) is the state of the system,and the system parameter \( a \in [0,1] \). The unified system has the characteristic of regional chaos. When \( a \in [0,0.8] \) the system belongs to the generalized Lorenz system; when \( a = 0.8 \) the system belongs to the generalized Liu system; when \( a \in [0.8,1] \) the system belongs to the generalized Chen’s system [14]. Here we take \( a = 1 \) to construct the encryption key of the image with the chaotic sequence generated by the generalized Chen’s system. Chen’s chaotic system is very similar to Lorenz chaotic system, but it is not topological equivalent to Lorenz chaotic system, which is a new system with more complex dynamic characteristics than Lorenz chaotic system [15]. Here we take x(0) = 0, y(0) = 1, z(0) = 0 as the initial value; integration time step h = 0.001 [16]. The fourth-order Runge-Kutta method is used to solve the differential Eq. (2) to obtain the trajectory curve of the system phase space. As shown in Fig. 1, it can be seen that the phase space trajectory of Chen’s chaotic system is composed of many discrete points, which indicates that the system has complex chaotic characteristics.

Fig. 1.
figure 1

Chaotic behavior of Chen’s system: \( x\left( n \right),y\left( n \right),z\left( n \right) \) are the Chen’s chaotic sequences.

2.3 The Discrete Wavelet Transform (DWT)

The wavelet transform is a time-frequency transform, which can be used for multiresolution analysis. It is aimed to use the wavelet function to decompose the signal. The discrete wavelet transform is obtained by discretization of scale and shift of basic wavelet. Define the wavelet function \( \psi_{a,b} (t) \) as the base, and the wavelet transform of \( f \in L^{2} (R) \) by is defined as:

$$ W_{f(a,b)} = \int_{R} {f(t)\bar{\psi }_{a,b} } (t)dt\;\;k \in Z $$
(3)

Where the wavelet function \( \psi_{a,b} (t) \) is obtained by translating and scaling the same base \( \psi \).

$$ \psi_{a,b} (t) = \left| a \right|^{ - 1/2} \psi ((t - b)/a)\;\;a,b \in R,a \ne 0 $$
(4)

Where \( \psi \) is called the base wavelet, a is the dilation factor, b is the translation factor. Mallat wavelet algorithm decomposition formula is as follows:

$$ c_{j + 1,k} = \sum\limits_{n = Z} {c_{j,n} } \bar{h}_{n - 2k} \;\;k \in R $$
(5)
$$ d_{j + 1,k} = \sum\limits_{n = Z} {c_{j,n} } \bar{g}_{n - 2k} \;\;k \in Z $$
(6)

Mallat wavelet algorithm reconstruction formula is as follows:

$$ c_{j,k} = \sum\limits_{n = Z} {c_{j + 1,n} } h_{n - 2k} + \sum\limits_{n = Z} {d_{j + 1,n} } g_{n - 2k} \;\;\;k \in Z $$
(7)

After one-level wavelet decomposition is performed on the image, a low-frequency subgraph and three high-frequency subgraphs can be obtained.

2.4 The Discrete Cosine Transform (DCT)

The discrete cosine transform (DCT) is similar to the Fourier transform. The discrete cosine transform takes only the real part of the Fourier transform. Discrete cosine transform has a very important property–energy concentration characteristics: After discrete cosine transform of the image, the energy is concentrated in the low-frequency part of the spectrogram. When applied to an M × N size image or matrix, the 2D-Discrete Cosine Transform (DCT) is as follows:

$$ \begin{aligned} F(u,v) = c(u)c(v)\sum\limits_{x = 0}^{M - 1} {\sum\limits_{y = 0}^{N - 1} {f(x,y)} } \cos \frac{\pi (2x + 1)u}{2M}\cos \frac{\pi (2y + 1)v}{2N} \hfill \\ \;\;u = 0,1, \cdots ,M - 1;v = 0,1, \cdots ,N - 1; \hfill \\ \end{aligned} $$
(8)

In the formula:

$$ c(u) = \left\{ {\begin{array}{*{20}l} {\sqrt {1/M} } \hfill & {u = 0} \hfill \\ {\sqrt {2/M} } \hfill & {u = 1,2, \cdots ,M - 1} \hfill \\ \end{array} } \right. $$
$$ c(v) = \left\{ {\begin{array}{*{20}l} {\sqrt {1/N} } \hfill & {v = 0} \hfill \\ {\sqrt {2/N} } \hfill & {v = 1,2, \cdots ,N - 1} \hfill \\ \end{array} } \right. $$

Where \( \text{M} \times \text{N} \) is the anti-counterfeiting image size, \( f(x,y) \) correspond to the value of the anti-counterfeiting image at the point \( (x,y) \) and \( F(u,v) \) is the DCT coefficient at the point \( (u,v) \) in the frequency. The Formula shows that the sign of the DCT coefficient is related to the phrase of the component.

3 The Algorithm

In this paper, an authentic work anti-counterfeiting tag is selected as the original anti-counterfeiting tag. It is written as \( F = \left\{ {F(i,j)\left| {F(i,j) \in [0,255];1 \le i \le M,1 \le i \le N} \right.} \right\} \), where \( F(i,j) \) represents the pixel grayscale value of the original authentic work anti-counterfeiting tag. The specific algorithm is as follows. The algorithm process is shown in Fig. 2.

Fig. 2.
figure 2

Automatic identification of encryption security tag based on transform domain.

3.1 Establishing an Encrypted Anti-counterfeiting Tag Feature Database

Original Authentic Work Anti-counterfeiting Tag Encryption.

The encryption algorithm flow is shown in Fig. 3.

Fig. 3.
figure 3

Original anti-counterfeit tag encryption process.

The anti-counterfeiting tag is encrypted as follows:

  • Step 1: The DWT transform is performed on the anti-counterfeiting tag to obtain \( f_{A} ,f_{B} ,f_{C} ,f_{D} \) subband wavelet coefficients.

    $$ \left\{ {f_{A} ,f_{B} ,f_{C} ,f_{D} } \right\} = DWT2(F(i,j)) $$
    (9)
  • Step 2: The DCT transform is performed on wavelet subband coefficients \( f_{A} ,f_{B} ,f_{C} ,f_{D} \) to obtain DCT coefficients \( FD(i,j) \).

    $$ FD(i,j) = DCT2(f_{A} ,f_{B} ,f_{C} ,f_{D} ) $$
    (10)
  • Step 3: Generate chaotic sequence \( G(j) \) from the initial value by using Logistic map, and binarize it to get \( T(j) \), from the initial \( x(0),y(0),z(0) \), Chen’s chaotic real-valued sequence \( x(n),y(n),z(n) \) is generated by the Runge-Kutta fourth-order method. Selecting one of Chen’s chaos sequences such as \( x(n) \) and performing point multiplication with \( T(j) \) to obtain a double chaotic sequence \( H(j) \).

  • Step 4: Construct a binary sequence. According to the chaotic sequence \( H(j) \), a threshold function \( sng(x) \) is set to obtain a sequence of binary symbols, and a binary matrix \( H(i,j) \) is formed according to the size of the anti-counterfeiting tag, where \( 1 \le i \le M \), \( 1 \le j \le N \).

    $$ sng(H(j)) = \left\{ {\begin{array}{*{20}l} 1 \hfill & {H(j) \ge 0.5} \hfill \\ { - 1} \hfill & {H(j) < 0.5} \hfill \\ \end{array} } \right. $$
    (11)
  • Step 5: Multiply the coefficient matrix with the binaries matrix to obtain \( D(i,j) \).

    $$ D(i,j) = FD_{{}} (i,j).*H(i,j) $$
    (12)
  • Step 6: Perform inverse DCT transformation on \( D(i,j) \) to obtain an encrypted anti-counterfeit tag \( ED^{{\prime }} (i,j) \) and obtain an encrypted sub band wavelet coefficient sequence matrix after reconstruction.

    $$ ED^{{\prime }} (i,j) = IDCT\;\;2(D(i,j)) $$
    (13)
  • Step 7: Perform IDWT transformation on \( ED^{{\prime }} (i,j) \) to obtain an encrypted anti-counterfeiting tag.

    $$ E(i,j) = IDWT2(ED^{{\prime }} (i,j)) $$
    (14)

Figure 4 shows 8 different authentic work anti-counterfeiting tags, and Fig. 5 shows the corresponding encrypted anti-counterfeiting tags. The original image of the encrypted image is invisible to the naked eye, so it is of no value to others after the leak. In this way, the security and reliability of anti-counterfeiting tags are improved.

Fig. 4.
figure 4

8 different anti-counterfeit tags.

Fig. 5.
figure 5

8 corresponding encrypted anti-counterfeit tags.

Key Sensitivity and KeySpace.

The initial values of the chaotic system used for decryption are: \( \text{x}^{{\prime }} \left( 0 \right) = \text{x}\left( 0 \right) + 10^{ - 8} , \, \text{y}^{{\prime }} \left( 0 \right) = \text{y}\left( 0 \right)\;\text{and}\;\text{z}^{{\prime }} \left( 0 \right) = \text{z}\left( 0 \right). \, \). Only \( \text{x}^{{\prime }} \left( 0 \right) \) differs by 10−8 from the value \( \text{x}\left( 0 \right) \) used for encryption, the decryption results are shown in the figure below. As you can see, the subtle differences in the key make it undecipherable. The sensitivity test results to \( \text{y}\left( 0 \right) \) and \( \text{z}\left( 0 \right) \) indicate that when \( \text{y}\left( 0 \right) \) and \( \text{z}\left( 0 \right) \) change 10−8 respectively, they cannot be decrypted. The above results show that the algorithm is highly sensitive to keys. If the initial value of the chaotic system is the initial key, represented by a double-precision real number that is accurate to 9 decimal places, so the key space is 109 × 109 × 109 = 1027 ≈ 290 which equivalents to a 90-bit long keyspace. It means that extending the key space of 90 bits long on the basis of one-dimensional chaos. Therefore, the password system is strong enough to resist attacks such as brute-force attack and other deciphering methods.

Extract the Feature Vector of the Encrypted Anti-counterfeiting Tag.

First, we carry out the first level DWT transform of the original anti-counterfeiting tag to obtain four subgraphs. Second, we take the low-frequency subgraph for global DCT transform. Then the low intermediate frequency coefficient is extracted after transformation. “one” is used to represent the positive coefficients, and “zero” is used to represent the negative coefficients. Thus, we can obtain a series of binary logic sequences based on the DWT-DCT transformed coefficient symbols. We take this binary logical sequence as the feature vector of the authentic anti-counterfeiting tag. In order to verify the robustness of the feature vector extracted by this method. We selected eight number of DWT-DCT to transform low intermediate frequency coefficients (C1, C2, …, C8), which is shown in the third column to the tenth column of Table 1. The corresponding binary logical sequence is shown in column eleven of Table 1. We can see the normalized correlation coefficient (NC) of the feature vectors obtained under various types of attacks is relatively large with that of the feature vectors of the original encrypted tag from column twelve in table one. In conclusion, we can think that DWT-DCT transform after the coefficient symbol sequence can be used as tag’s feature [17, 18].

Table 1. Change of DWT-DCT low-frequency coefficients under different attacks to encrypted tag.

The DWT-DCT coefficient unit is 1.0e+002, and the correlation coefficient is 64 bit.

From Table 2, it is not hard to find that the correlation coefficient is 1, only when the encrypted anti-counterfeiting tag is compared with their own, which is smaller when the encrypted tag is compared with other tags. Those with a minimum of −0.23 and a maximum of 0.42 are generally less than 0.5. The more similar the tag is, the greater the correlation coefficient is, and vice versa. Therefore, it can be seen that it is feasible to select the low medium frequency coefficient as the feature vector of the encrypted anti-counterfeiting tag.

Table 2. Correlation coefficients of feature vector of different encrypted tags.

3.2 Automatic Identification of Encrypted Anti-counterfeiting Tags

An anti-counterfeiting tag \( F^{{\prime }} (i,j) \) is selected to be tested, which perform the same encryption processing and feature extraction as the steps described in the previous section, and we get the feature vector \( V^{{\prime }} \left( j \right) \) to be measured. Then calculate the peak signal-to-noise ratio (PSNR) and the normalized correlation coefficient (NC). The PSNR reflects the quality of the anti-counterfeit tag image after being attacked. The higher the PSNR value, the better the image quality. The NC value reflects the similarity between the two graphs. The larger the NC value, the higher the similarity between the two graphs.

$$ PSNR = 10\;\lg \left[ {\frac{{MN\;\;\mathop {\hbox{max} \left( {I_{(i,j)} } \right)^{2} }\limits_{i,j} }}{{\sum\limits_{i} {\sum\limits_{j} {\left( {I_{(i,j)} - I_{(i,j)}^{{\prime }} } \right)} } }}} \right] $$
(15)
$$ NC = \frac{{V(i) \times V^{{\prime }} (j)}}{{V^{2} (j)}} $$
(16)

Where \( I(i,j) \) is the pixel value of each image, \( \Gamma \left( {i,j} \right) \) is the average pixel value of the image and M and N are the rows and columns of the texture image. Finally, determine whether NC value is greater than 0.5. If the NC value is greater than 0.5, the detected maximum NC value and his corresponding tag are returned to the consumer. If the NC value is less than 0.5, a message is returned to the consumer: the product is false.

4 Simulation and Analysis

In the MATLAB R2016a simulation platform, we selected an encrypted anti-counterfeiting tag to perform a common attack and geometric attack simulation experiments. Select 1000 sets of independent pseudo-random binary logic sequences(values 1 or 0) with a length of 32 bits. Among these 1000 sets of data, one set (this article uses the 500th set of data) is selected as the embedded feature vector. The original encrypted anti-counterfeit tag is shown in Fig. 6 who is denoted as \( F(i,j), \, 1 \le \text{i} \le 220,1 \le \text{j} \le 76 \). The corresponding DWT-DCT coefficient matrix is denoted as \( FD(i,j) \). Considering the complexity and speed of the algorithm, we select the low intermediate frequency 4 × 8 = 32 coefficients for symbolic operations to obtain the feature vector V(j).

Fig. 6.
figure 6

When x(0) error is 1 × 10−8: (a) original anti-counterfeiting tag; (b) decrypted tag.

In the simulation results, the PSNR value is used to measure the quality of the anti-counterfeit tag to be tested, and the NC value is used to evaluate whether the image to be tested is the original encryption anti-counterfeiting tag. We set the determination threshold of the NC value to 0.5. If the NC value is greater than or equal to 0.5, we consider that the encryption anti-counterfeiting tag under test is the original encryption anti-counterfeiting tag. If the NC value is less than 0.5, it is determined that the encrypted anti-counterfeiting tag to be tested is not the original encrypted anti-counterfeiting tag. We can see from Tables 3, 4, 5 and 6, compared with the original anti-counterfeiting tags, the security performance of the encrypted anti-counterfeiting tags is improved without loss of robustness. The NC values between the 1000 available pseudo morph sequences and the extracted feature vector is achieved by using DWT-DCT and symbolic operation.

Table 3. The PSNR and NC values under Gaussian noise.
Table 4. PSNR and NC values under JPEG compression attack.
Table 5. The PSNR and NC values under scaling attack.
Table 6. The PSNR and NC values under shearing attack.

4.1 Gaussian Attack

Gaussian noise intensity coefficient is measured the added noise interference size in the encrypted anti-counterfeiting tag. Under the Gaussian attack, the corresponding NC valuels is shown in the Table 3. NC1 corresponds to the NC value of the encrypted image, while NC2 corresponds to the NC value of the original image. We still can extract the encrypted anti-counterfeiting image at this situation. Table 3 shows that the algorithm can resist Gaussian attack.

4.2 JPEG Compression Attack

The percentage of the compression quality is examined the impact after JPEG compression for the encrypted anti-counterfeiting tag. Under the Gaussian attack, the corresponding NC valuels is shown in the Table 4. NC1 corresponds to the NC value of the encrypted image, while NC2 corresponds to the NC value of the original image. The encrypted anti-counterfeiting image can still be accurate to extract. Table 4 shows that the algorithm can resist JPEG compression attack.

4.3 Scaling Attack

Under the Gaussian attack, the corresponding NC valuels is shown in the Table 3. NC1 corresponds to the NC value of the encrypted image, while NC2 corresponds to the NC value of the original image. We still can extract the encrypted anti-counterfeiting image accurately. Table 5 shows that the algorithm can resist scaling attack.

4.4 Shearing Attack

The encrypted anti-counterfeiting tag is sheared from the Y-axis direction. Under the Gaussian attack, the corresponding NC valuels is shown in the Table 3. NC1 corresponds to the NC value of the encrypted image, while NC2 corresponds to the NC value of the original image. The encrypted anti-counterfeiting image can still be accurate to extract. Table 6 shows that the algorithm can resist shearing attack.

5 Conclusion

In order to improve the security performance of the anti-counterfeiting tag, the paper presents an automatic identification algorithm based on DWT-DCT and Chen’s chaos for anti-counterfeit tags. The feature vector is extracted by a DWT-DCT transform from the encrypted authentic work anti-counterfeiting tags. The identification of anti-counterfeiting tags is completed by calculating the normalized correlation coefficient(NC). Experiments show that the algorithm has the good robustness to common attack and geometric attack and larger keyspace against powerful attacks. Compared with the original anti-counterfeiting tags, the security performance of the encrypted anti-counterfeiting tags is improved without loss of robustness. It has high security and simple operation. This algorithm only requires the use of the Internet and the ordinary photo-taking function to realize the identification of encrypted tags, which is convenient and fast, and it is an identification method adapted to large data [19].