Abstract

Background

The existing techniques for simultaneous encryption and compression of images refer lossy compression. Their reconstruction performances did not meet the accuracy of medical images because most of them have not been applicable to three-dimensional (3D) medical image volumes intrinsically represented by tensors.

Methods

We propose a tensor-based algorithm using tensor compressive sensing (TCS) to address these issues. Alternating least squares is further used to optimize the TCS with measurement matrices encrypted by discrete 3D Lorenz.

Results

The proposed method preserves the intrinsic structure of tensor-based 3D images and achieves a better balance of compression ratio, decryption accuracy, and security. Furthermore, the characteristic of the tensor product can be used as additional keys to make unauthorized decryption harder.

Conclusions

Numerical simulation results verify the validity and the reliability of this scheme.

Keywords

Background

In recent years, numerous studies on encryption of medical images, such as computed tomography (CT) and magnetic resonance imaging (MRI), have been reported [1–6], although most of them did not consider compression during encryption. The storage, transmission, and retrieval of massive bio-information should meet several compulsory requirements [7]: (1) high efficiency for rapid transmission and prompt retrieval; (2) strict information security to guarantee users’ privacy; and (3) high data fidelity to preserve the pathological information. It requires decreasing the quantity of data to be transmitted (compression) and protecting such data against unauthorized access (encryption). Therefore, simultaneous compression and encryption technology of medical images that are represented as three-dimensional (3D) volumes has additional meanings.

Existing simultaneous compression and encryption algorithms are typically applied to ordinal images rather than medical images, because they refer to lossy compression. Alfalou et al. proposed a series of representative algorithms for the simultaneous compression and encryption of 3D images. The latest and most effective algorithm is based on spectral fusion and discrete cosine transform (DCT) [8]. However, the decryption error increases rapidly along with the increase of the number of images, indicating that it cannot handle large amounts of images simultaneously. Emerging algorithms for simultaneous encryption and compression are based mainly on compressed sensing (CS), which can activate compression during the sampling process [9]. An example being Valerio et al., who proposed a multiclass encryption by CS to withstand the common attack [10, 11]. To further enhance security, CS-based encryption algorithms were constructed by combining the chaos map and some optical encryption techniques, such as double random phase encryption (DRPE), fractional Fourier transform (FrFT), and fractional Mellin transform (FrMT) [12–19].

The medical images are different from other images because of their particular properties. There are legal and strict regulations applied to medical multimedia information due to the health of a patient depending on the correctness and accuracy of this information [20]. The quality of the decrypted and compressed data must be adequate to allow for a correct diagnosis when it is reconstructed. However, the existing algorithms did not meet this requirement because most of them have not been applicable to 3D images intrinsically represented by tensors. Conventional CS theory relies on data representation in the form of one-dimensional vectors. Application of CS to higher dimensional data representation is typically performed by conversion of the data to very long vectors that must be measured using very large sampling matrices, thus destroying the intrinsic structure and imposing a huge memory burden.

Recently, Cesar et al. propose a tensor CS (TCS) based on higher order singular value decomposition (HOSVD) that introduces a direct reconstruction formula to recover a tensor from a set of multi-linear projections, which are obtained by multiplying the data tensor by a different sensing matrix in each mode [21]. This HOSVD-based TCS achieved more accurate and efficient reconstruction results when compared to other existing sparsity-based TCS methods [22–24]. Indeed, we believe that, if it was used to design TCS-based encryption of 3D images better performance would occur.

We further introduce alternating least squares (ALS) into HOSVD-based TCS [21], and control the measurement matrices by 3D Lorenz [25–27]. Such a simultaneous compression and encryption algorithm for 3D medical images has two main advantages: (1) the preservation of intrinsic structures of the tensor data for the purpose of reducing the decryption error and increasing the compression ratio; (2) the keys consist of those generated by tensor decomposition, and 3D Lorenz. Particularly, the order of the tensor product used in the TCS can be used as additional keys to make unauthorized decryption harder.

This paper is organized as follows: in “Theory” section, the related notation, definition and basic results used throughout the paper, are introduced; in “Proposed encryption” section, the encryption and decryption algorithms are proposed; in “Numerical simulation results” section, several numerical results based on 3D lung CT images are provided, to corroborate our theoretical results and evaluate the stability and robustness of our proposed scheme, in “Conclusion” section, the main conclusions drawn from the present work are outlined.

Theory

HOSVD

The higher-order singular value decomposition (HOSVD) provides a generalization of the low-rank approximation of matrices to the case of tensors [28–30]. To facilitate the distinction between scalars, vectors, matrices and higher dimensional tensors, the type of a given quantity will be reduced by its representation: scalars are denoted by lower-case letters (\(a\)), vectors are written as capitals (\({\mathbf{a}}\)), matrices corresponding to bold-face capitals (\({\mathbf{A}}\)) and tensors are written as calligraphic letters (\({\mathbf{\mathcal{A}}}\)).

A tensor is a multidimensional array with the number of modes represented by the tensor order. For instance, tensor \({\mathbf{\mathcal{A}}} \in R^{{M_{1} \times \cdots \times M_{d} }}\) has order \(d\) and the dimension of its i-th mode is \(M_{i}\).

3D Lorenz

Mohmad et al. [25, 26] propose a 3D discrete Lorenz system, which has a high order and also low complexity when implemented in digital hardware. The discrete Lorenz attractor employed here is given by the following difference equations

where U, V, W are three state variables, A, B, C are parameters, and \(g1,\;g2,\;g3\) are gains (step size). The calculating method of (5) is finite difference.

Proposed encryption

The proposed system can be split into encryption and decryption algorithms as illustrated in Fig. 1. The compression and decompression procedures are embedded in the encryption and decryption, respectively.

Fig. 1

Illustration of the proposed simultaneous compression and encryption system of 3D images

To solve this problem, it is sufficient to find \(\varPhi_{i}\)’s satisfying \(\varPhi_{i}^{T} \varPhi_{i} = I\). The reconstruction algorithm as Eq. (2) of HOSVD-based TCS achieved a more accurate solution than that as Eq. (1) of HOSVD. To further improve the reconstruction accuracy, we use an alternating least squares (ALS) approach to solve Eq. (7).

2.

For \(k = 0\), iterate Eqs. (8)–(11) until \(\varPhi_{i}^{{}}\) converges or the maximum iteration is achieved:

where \(\varphi_{i,k}\) is the k-th element of \(\phi_{i}\)(\(\phi_{i}\) is the vectorization of \(\varPhi_{i}\), i.e. \(\phi_{i} = vec\left( {\varPhi_{i} } \right)\)). The initial conditions \(U_{0} ,\;V_{0} ,\;W_{0} ,\;\) parameters A, B, C, and g1, g2, g3 are known by both transmitter and receiver. The transmitted signal is the U state variable, and the objective is to retrieve \(\varphi_{i,k}\) from this signal at the receiver. Feedback is used to update the state variables at the receiver to synchronize the system and allow decryption of subsequent data values.

Decryption accuracy and compression ratio

Our experiments are conducted on lung CT sequences in lung image database consortium (LIDC) [31]. Each frame of one CT sequence is preprocessed to have 512 × 512, where 512 frames were chosen. The CT sequence together is represented by a 512 × 512 × 512 tensor and has 134,217,728 voxels in total. The randomly constructed Gaussian measurement matrix for each mode is now of size \(512 \times m_{i}\) (\(i = 1,2,3\)). Thus, the compression ratio is given by:

$$\gamma = \frac{{m_{1} m_{2} m_{3} }}{512 \times 512 \times 512}$$

The quantitative measure of the decryption error is the peak signal noise ratio (PSNR), which is based on the root mean square error (RMSE) between the decrypted data and ground truth and can be represented as:

$$PSNR = 20\log_{10} \frac{255}{RMSE}$$

(20)

To further evaluate the performance of decryption, the structural similarity index (SSIM) is used as another indicator.

In this section, we compare the proposed algorithm with state of the art algorithms to show its superiority. These algorithms are presented briefly as follows:

1.

As demonstrated previously [13], an encryption based on 2D_CS in the FrMT domain (algorithm 1) stands out for its efficient, robust, and secure encryption performance. In this algorithm, the 2D CS is based on a 2D wavelet, measuring matrices with Logistic map and a 2D NSL0 reconstruction algorithm. Notably, although the security of FrMT is better than that of FrFT, its decryption accuracy is less than the later. In order to verity the decryption accuracy and compression ratio of our tensor-based algorithm, we replaced FrMT with FrFT in algorithm 1.

2.

Additionally, we chose an encryption algorithm based on HOSVD-TCS [21] with FrFT (algorithm 2).

3.

Also, as previously shown [8], an encryption algorithm based on spectral fusion and DCT obtained a better PSNR when compared with previous compression-encryption implementations. Accordingly, this became algorithm 3.

A visual evaluation of the decryption results under frames 117, 138 and 159 of one CT sequence at the compression \(\gamma = 0.125\) is shown in Figs. 2, 3, 4, 5, 6. As shown in Fig. 3, all the tissues within the lung volume are clear. Our clinical experts did not find distinct differences between the decrypted and the original CT images. The quantitative summaries of the above algorithms are shown in Tables 1, 2 and Fig. 7, where the advantages of the proposed algorithm are highlighted. It is evident that the advantages of the proposed algorithm over the other methods increase with the compression ratio. Case in point is in algorithm 3, where improving the compression ratio requires a large number of frames. However, the PNSR rapidly decreases with the increase of the number of frames. Thus, the algorithm cannot handle large number of frames.

Comparison of SSIM between the proposed algorithm and state to the art methods

Methods

Compression ratio

\(\frac{{(256)^{3} }}{{(512)^{3} }} = 0.125\)

\(\frac{{(352)^{3} }}{{(512)^{3} }} = 0.33\)

\(\frac{{(384)^{3} }}{{(128)^{3} }} = 0.42\)

\(\frac{{(416)^{3} }}{{(512)^{3} }} = 0.54\)

\(\frac{{(448)^{3} }}{{(512)^{3} }} = 0.67\)

\(\frac{{(480)^{3} }}{{(512)^{3} }} = 0.82\)

Algorithm 1

0.1406

0.2198

0.3060

0.4378

0.6090

0.8000

Algorithm 2

0.8293

0.9004

0.9195

0.9157

0.9259

0.9312

Algorithm 3

0.7474

0.8664

0.8945

0.9165

0.9314

0.9474

Proposed algorithm

0.9122

0.9468

0.9508

0.9533

0.9544

0.9549

Fig. 7

PSNR (dB) comparison of the four algorithms at compression ratio values ranging from 0.125 to 0.98

We also compared the computation times (the average computation time of the experiments with all compression ratio and noise level) required in each case. The comparison shows that algorithm 3 provides a much faster computation (Table 3), while the proposed algorithm requires slightly longer computation time because it contains a procedure of iteration. Fortunately, this iteration is much simpler than those of algorithms 1 and 2.

Table 3

Comparison of computation time (s) between the proposed algorithm and state to the art methods

Methods

Computation time (s)

Algorithm 1

896

Algorithm 2

188

Algorithm 3

164

Proposed algorithm

220

Histograms and statistical analysis

Histograms

The histograms of two CT sequences and the encrypted images of their composed parts are shown in Figs. 8 and 9, respectively. The intensity distribution of the histograms of the encrypted images is completely dissimilar from that of the histogram of the original CT, which indicates that an intruder cannot perceive any useful information based on statistical properties. The histograms of the two original CT sequences are evidently different from each other, whereas the histograms of their corresponding encrypted images are similar. The security analysis effectively illustrates the robustness of the proposed method.

Fig. 8

Histograms of 3D images and encrypted parts of CT No. 1. a Original CT sequence No.1. b Histogram of original CT. c Histogram of ciphertext

Fig. 9

Histograms of 3D images and encrypted parts of CT No. 2. a Original CT sequence No.1. b Histogram of original CT. c Histogram of ciphertext

Statistical analysis

Statistical properties of the images can also be evaluated by the computation of the correlation between two adjacent pixels. By selecting randomly P pixels of the image, the correlation coefficient is computed as:

$$r_{xy} = \frac{{\text{cov} (x,y)}}{{\sqrt {D(x)D(y)} }}$$

(21)

where \(x\) is the value of a selected pixel and \(y\) is the value of the correspondent adjacent pixel, \(D(x)\) is the mean square error.

It is expected that an image will have a correlation coefficient close to 1 before being submitted to the encryption; it is desirable that the correlation coefficient of a ciphered image be as close to 0 as possible. In Table 4, where the simulation results for P = 125,000 are shown, we verify that the above described premise is satisfied. This indicates that the proposed encryption scheme is secure against statistical attacks.

Table 4

Correlation coefficients of the original volume (\(r_{xy}\)) and the corresponding ciphered volume (\(\tilde{r}_{xy}\)); (v), (h) and (d) are related to vertical, horizontal and diagonal adjacency respectively

\(r_{xy} (v)\)

\(\tilde{r}_{xy} (v)\)

\(r_{xy} (h)\)

\(\tilde{r}_{xy} (h)\)

\(r_{xy} (d)\)

\(\tilde{r}_{xy} (d)\)

0.9838

−0.0006

0.9863

−0.0002

0.9958

0.0005

Normalized entropy

where P is the number of different values that the pixels of the ciphered image can assume, \(N_{i}\) is the amount of pixels of the ciphered image that assume value i, and N is the total amount of pixels of the ciphered image. During the experiments, we found that the ciphered pixels’ intensity of all the algorithms mentioned in the paper are almost equiprobable, so their normalized entropy are all approximate to 1.

Rate-distortion

Rate-distortion (RD) is an important indicator to evaluate the performance of compression. In a previous study [32], the following mathematical model of CS RD was constructed:

The proposed TCS-based algorithm falls into the CS category, so the model in Eq. (23) applies for our algorithm. Because there are some differences between traditional vector-based CS and the proposed tensor-based CS, we recalculate some parameters as follows:

where \(\gamma^{\prime} = \frac{K}{{m_{1} m_{2} m_{3} }}\), \(\mu^{\prime} = \frac{{M_{1} M{}_{2}M_{3} }}{K}\), \(\sigma_{\varPhi }^{{}}\) is the singular value of the measurement matrix and \(R\) is the rate. It is important to note that in 3D case, there is \(\sigma_{{\varPhi_{1} }}^{{}} \approx \sigma_{{\varPhi_{2} }}^{{}} \approx \sigma_{{\varPhi_{3} }}^{{}}\) because the three matrices obey a uniform Gaussian distribution. The RD diagram at several compression ratio points is shown in Fig. 10.

Fig. 10

RD diagram at varying compression ration

Secret keys

Key space

The keys of the proposed algorithm consist of those generated by the three measurement matrices with 3D Lorenz and the unfolding mode \(n\) of the core tensor \({\mathbf{\mathcal{W}}}\). The Key that are used on \(\varPhi_{i}\) with 3D Lorenz are the initial values for the three state variables, the \(U_{0} ,\;V_{0}\) and \(W_{0}\), the parameters \(A,\;B\) and \(C\), and \(g_{i}\) for each of the state equations. As shown in [25], the key length is 39 decimal digits, with a key space of 1039. The order of the tensor product can be used as an additional key, which has 18 combinations (which will be introduced in detail in “Key sensitivity”).

The total key space of the proposed algorithm is larger than \(10^{39} \cdot 18 > > 2^{30}\), which is large enough to withstand a brutal attack.

Key sensitivity

The key sensitivity of measurement matrices with 3D Lorenz has been analyzed in detail to demonstrate their advantages [15, 24–26]. Here we emphasize the key sensitivity of the order of the tensor product. Although \({\mathbf{W}}_{(n)}\) is easy to be distinguished from \(D_{\varPhi n}\), the ciphertexts are still difficult to decode due to both \({\mathbf{W}}_{(n)}\) and \(D_{\varPhi n}\) having three models. Hence there are a totally of 18 combinations of all \({\mathbf{W}}_{(n)}\) and \(D_{\varPhi n}\). Equation (16) indicates that only three combinations are correct, with 15 wrong combinations listed in the following:

The average MSE of the 15 wrong combinations is 7.2895 × 103. It is clear from the MSE values of the different combinations that the proposed system is sensitive to the order of the tensor product.

The 3D Lorenz system is similar to that in [26]. The 3D image is encrypted with initial conditions \(U_{0} = 0.1,\;V_{0} = 0,\;W_{0} = 0,\;\) and parameters A = 10, B = 28, C = 8/3, and g1 = g2 = g3 = 0.01. The maximum Lyapunov value according to the parameters and initial conditions is 0.8024 (larger than 0), the system is chaotic. The 3D distribution of the Lorenz system is also depicted in Fig. 11. Table 5 gives the sensitivity of each parameter. Any change in a parameter greater than its sensitivity will prevent an eavesdropper from decrypting message.

Fig. 11

3D distribution of Lorenz system

Table 5

Key sensitivity of measurement matrices with 3D Lorenz

Keys

\(\Delta U_{0} = 10^{ - 6}\)

\(\;\Delta V_{0} = 10^{ - 6}\)

\(\;\Delta W_{0} = 10^{ - 6}\)

\(\;\Delta A = 10^{ - 4}\)

\(\;\Delta B = 10^{ - 4}\)

\(\;\Delta C = 10^{ - 4}\)

\(\;\Delta g1 = 10^{ - 7}\)

\(\;\Delta g2 = 10^{ - 7}\)

\(\;\Delta g3 = 10^{ - 7}\)

MSE

8.50 × 103

8.39 × 103

8.61 × 103

9.01 × 103

8.67 × 103

8.22 × 103

8.96 × 103

9.00 × 103

8.65 × 103

Resistance against attacks

Common attacks include known-plaintext attack and chosen-plaintext attacks. It has been proven [10, 11] that despite the linearity of its encoding, CS may be used to provide a limited form of data protection. The TCS used in the paper is a multi-linear (non-linear) extension of the traditional CS, which further enhances the anti-attack ability. Although the attackers have access to some plaintext-ciphertext pair, they will be unable to reproduce the system without knowledge of the order of tensor product. Furthermore, the 3D Lorenz, which was introduced in the system, has the ability to withstand these common attacks [25, 26]. Therefore, the proposed system based on TCS with 3D Lorenz has the ability to resist these common attacks.

We ran an experiment on known-plaintext attack to evaluate the anti-attack performance. The decryption result of known-plaintext attack with the keys generated from a chosen CT sequence, which was treated as fake tensor, is displayed in Fig. 12. The frame 256 of the original and fake CT sequences are shown in Fig. 12a, b, respectively. The attack result using fake decryption keys with all correct parameters is shown in Fig. 12c. It can be seen that the retrieved image is noise-like signal. We first analyze the number of pixels rate: all pixels assumed to be an even distribution, because the retrieved image was noise-like signal. The unified average changing intensity was also used to evaluate the difference among the original and decrypted images:

Fig. 12

Decryption result of known-plaintext attack with the keys generated from a chosen CT sequence. a Original image. b Image used for attack. c Decrypted image with fake decryption keys

We used the gray level to represent intensity, ranging from 0 to 255. Because the intensity value per pixel of the tensor was up to \(\xi = 80\), we assume that there is a substantial difference between the original and retrieved images.

Conclusions

In this paper, we proposed an algorithm of simultaneous encryption and compression, as applied to 3D CT volumes. This scheme has the advantages of TCS and 3D Lorenz. Its outstanding advantage is that it achieves a high precision of decryption at a big compression ratio. The security of the proposed algorithm conformed to the requirements of the common encryption technology. Moreover, the unfolding mode, which is a unique feature of the tensor product, can be used as an additional secrete key other than traditional encryption algorithms to make unauthorized decryption harder.

Declarations

Authors’ contributions

Conceived and designed the experiments: QW. Performed the experiments: XC and MW. Analyzed the data: ZM. Wrote the paper: QW. All authors read and approved the final manuscript.

Acknowledgements

Not applicable.

Availability of data and materials

The LIDC datasets used in the experiments of this article are available for download, upon request, from https://public.cancerimagingarchive.net/ncia/dataBasketDisplay.jsf. If the users have opened the website, they can tap the submenu “Simple search” of menu “Search images”, and then chose the “LIDC-IDRI” of item “Collection(s)”. The Subject ID of the CT set used in the paper is “LIDC-IDRI-1004”.

Competing interests

The authors declare that they have no competing interests.

Ethics approval and consent to participate

This experiment was approved by the China-Japan Union Hospital of Jilin University Medical Research Ethics Committee, Changchun, China.

Funding

This study was funded by National Natural Science Foundation of China (61301257).

Open AccessThis article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The Creative Commons Public Domain Dedication waiver (http://creativecommons.org/publicdomain/zero/1.0/) applies to the data made available in this article, unless otherwise stated.