A Novel Selective Encryption Method Based on Skin Lesion Detection

Due to the semitrusted cloud, privacy protection of medical images in medical imaging clouds has become a precondition. For the privacy of patients and the security of medical images in the cloud, this paper proposes a selective encryption based on DNA sequence and chaotic maps for skin lesion image. Initially, we design a transition region-based level set evolution functional which is merged into a variational level set expression with two extra energy functionals, to segment skin lesion image. Once skin lesion detection has been performed, the detected skin lesion pixels are encrypted by employing chaotic systems and DNA sequences. We apply 2D-LASM and 1D-LSS to produce the pseudorandom sequences and use the hash function of the plaintext image to calculate the secret keys of the encryption system. Results demonstrate that the proposed segmentation method is particularly suitable for the detection of skin lesion images with strong noise and complex background. Meanwhile, security analysis also reveals that this selective encryption has a large security key space and high sensitivity to the plaintext image and the secret key.


Introduction
Medical image processing has developed for many years, and there are more and more powerful tools to help dermatologists identify and classify skin lesions [1][2][3][4][5][6]. Among all kinds of skin lesions, melanoma is the most aggressive skin cancer and the one leading to the most deaths. However, in the transmission and storage, there are potential threats to the important content of these images, which makes the protection of important content a challenging problem [7][8][9][10][11].
To achieve confidentiality, encryption as an effective technology includes full encryption [12][13][14][15] and selective encryption [3,[16][17][18][19][20]. Full encryption involves encrypting complete image information, while selective encryption mainly focuses on the encryption of part of the image data. In recent years, selective encryption has been widely studied because of its tradeoff between computational complexity and security. Based on pixels of interest and singular value decomposition, Bhatnagar et al. proposed a selective image encryption scheme [16]. In [17], an edge-based lightweight image encryption scheme is proposed by Zhang et al. which employs chaos-based reversible hidden transform and multiple-order discrete fractional cosine transform. Wen et al. [18] proposed a selective method to encrypt the object of infrared images by using chaotic maps. Furthermore, they protected the salient regions of image by embedding them into a visually meaningful image in the work [19]. Actually, selective encryption is suitable for protecting the important areas of the image, but not the entire image. Most of the existing detection schemes do not have the ability to handle the skin lesions image [20].
In recent years, there are many techniques used for skin lesion detection, such as active contour model [21,22], thresholding [23], fuzzy c-means [24], and neural network [25], and local binary patterns clustering [2]. Rajab et al. [25] introduce the thresholding algorithm and neural network to realize the skin lesion detection. is technique can obtain the efficient result. However, the technique based on neural networks cannot deal with noisy images as the details of the edge were broken. Motivated by these problems, Barcelos et al. [26] posed a detection model for skin lesion image starting from nonlinear diffusion equations. However, in the case of strong noise and complex background, this model has some limitations.
So far, various techniques have been proposed for object detection. e level set method is an important segmentation method which has the advantages of allowing variable topological transformation and flexible numerical implementation. However, this method has the problem of contour initialization and reinitialization. To overcome these problems, Li et al. put forward a segmentation model without reinitialization [27] and distance regularized level set evolution (DRLSE) [28]. e two models employ the corresponding deviation penalty energy to force the level set function approach sign distance function and finally eliminate reinitialization. However, these two models need to initialize the contour. Recently, He et al. [29] proposed a weighted region-scalable fitting (WRSF) model which can handle well on medical images with intensity inhomogeneity, but fails to segment these with strong noises. In a partial differential equation (PDE) formulation, two geometric active contour models are, respectively, proposed by Wen et al. [22,30]. e two models have the ability to segment skin lesion images with blurred boundaries.
Inspired by the works of Wen et al. [22,30], but different from these works, this paper proposes a transition region-(TR-) based energy functional which can compel the level set function to have opposite different inside and outside image target. And then this energy functional is introduced into a variational level set expression with two extra energy functionals. According to the characteristics of significant regions, chaotic systems and DNA are combined to design suitable sensitive encryption algorithms. e main contributions of this paper include the following points: (1) A novel skin lesion detection-based selective encryption method is proposed. is method consists of the detection process of skin lesion image and selective encryption for privacy protection of skin lesion data. (2) In the skin lesion detection scheme, we propose a transition region-(TR-) based energy functional which compels this function to have a different sign inside and outside the image target. And the TRbased functional is introduced into a variational level set expression. (3) In the selective encryption for skin lesion data, we employ chaotic systems and DNA sequence operations. 2D-LASM and 1D-LSS are chosen to generate pseudorandom sequences and determine DNA encoding/decoding rules of the skin lesion region and the key matrix.
e structure of this article is described as follows. e DRLSE model and DNA encoding/decoding rules are introduced in Section 2. Section 3 describes the proposed skin lesion detection-based selective encryption algorithm which contains skin lesion detection based on TR-based energy functional model and selective encryption algorithm. e experimental results and security analysis are depicted in Section 4. e conclusions are given in Section 5.

Related Works
Li et al. [27] extended distance regularized level set evolution (DRLSE) and proposed a variational level set model for image segmentation. In a variational framework, this model is formulated about the level set function ϕ as follows: where μ > 0, λ > 0, α ∈ R are constants, R p (ϕ) is the level set smooth term, and E ext (ϕ) is a certain external energy term. p is a potential (or energy density) function p: [0, ∞] ⟶ R, g(|∇I σ |) � (1/(1 + |∇I σ | 2 )) is an edge indicator function, and I σ � G σ * I is the convolution of the image I and the Gaussian kernel G σ with standard deviation σ.
e function H is the one-dimensional Heaviside function. e term L g (ϕ) computes the length of the zero level set of ϕ in the conformal metric d(s) � g(C(p))|C ′ (p)|dp where C(p) is a parameterized representation of the zero level set of ϕ. e term A g (ϕ) can be viewed as the weighted area of the region x | ϕ(x) < 0 , which forces the zero level set of ϕ to expand or shrink faster during the evolutionary process. Whether the parameter α of A g (ϕ) can be positive or negative depends on the relative position of the object's initial contour. e level set evolution equation corresponding to equation (1) is obtained by the following equation: with initial condition ϕ(x, 0) � ϕ 0 (x), where d p (s) and p(s) are, respectively, defined by

Skin Lesion Detection-Based Selective Encryption Algorithm
is paper proposes a secure and privacy-preserving technique to protect patients' privacy and improve the security of skin lesion images. ere have four stages of the proposed technique, as shown in Figure 1: TR-based energy functional based on adaptive function, skin lesion detection model, selective encryption based on skin lesion detection, and decryption.

Skin Lesion Detection Based on TR-Based Energy Functional Model.
Because of the variation of the shape and appearance of the skin lesions, the detection of the edge of the skin lesions is a very important problem.
is paper proposes a TR-based energy functional model to segment the skin lesion image.

TR-Based Energy Functional.
Introduce an adaptive function via the gray mean of the transition region, which will serve as the weight of the proposed TR-based energy functional.
For an image I: Ω ⊂ R 2 ⟶ R and function ϕ: where M is mean value of the transition region drawn by LE-TREM algorithms [22,30]. As shown in the works [22,30], we observe that the function ](x, y) has opposite sign inside and outside the transition region. A binary image is displayed in Figure 2(a), and the corresponding 3D plot of ](x, y) is described in Figure 2(b). From Figure 2(b), we can really reveal that the function ](x, y) has opposite sign inside and outside the transition region. Now we pose a novel energy (TR-based energy) based on the function ](x, y) defined by (5). Given a level set function ϕ: Ω ⊂ R 2 ⟶ R, we design this external energy as follows: where H ε (ϕ) is the one-dimensional smoothed Heaviside function and g is the edge indicator given by g(s) � e (− s/4) .

Mathematical Problems in Engineering
where the function p is given by (4) and g(s) � e (− s/4) is the edge indicator function, which is different from that used in the DRLSE model.
We employ the gradient descent method to minimize energy functional (7) with respect to ϕ and obtain the associated level set evolution equation: where d p (s) is defined by equation (3).

Selective Encryption Based on Skin Lesion Detection.
In our encryption method, the proposed TR-based energy functional model can be chosen to detect skin lesion images. Further, the extracted significant region is encrypted by employed chaotic maps and DNA sequences.

Encryption and Decryption Process.
Chaotic encryption technology has strong sensitivity. DNA computing has many advantages, such as massive parallelism, huge storage, and ultra-low power consumption. Image encryption method based on DNA encoding integrates biological characteristics, but its encryption principle is closely related to chaotic encryption technology.
Step 1. Construct 1D logistic-sine system (LSS) and 2D logistic-adjusted-sine map (LASM) and by chaotic maps. Logistic map has high sensitivity and chaotic behavior. e sine map has a similar chaotic behavior with the logistic map. We employ 1D logistic-sine system (LSS) [34] and 2D logistic-adjusted-sine map (2D-LASM) [35] by the logistic and sine maps as seed maps: In the LSS system, the parameter r ∈ (0, 4], and mod function is the remainder used to return the division of two numbers. In 2D-LASM system, μ ∈ (0, 1), and y and z are state variables,y, z ∈ (0, 1).
Step 2. Generate the initial values and parameter for 1D-LSS and 2D-LASM.

Mathematical Problems in Engineering
We employ the SHA 256 hash of the plaintext image to generate a 256-bit external secret key. en the 256-bit secret key K is divided into 8-bit blocks (k i ), so K can also be described as follows: en, the initial values can be produced as follows: where mod is the modular operation, μ 0 and r 0 are the system parameters, x 0 , y 0 , and z 0 are initial values, and μ 0 ′ , r 0 ′ , x 0 ′ , y 0 ′ , and z 0 ′ are the given values used as secret keys.
Step 3. Perform DNA dynamic encoding process of the significant region. Let I be an original skin lesion image, and detect the skin lesion region of image I using the proposed method as described in Section 3.1. Design an appropriate rectangle with the size of m × n to cover the skin lesion region.
(1) Convert each pixel in the rectangle block to its binary form, and obtain a binary matrix p of m × 8n.
(4) Group every element of the matrix p, then employ the corresponding encoding scheme in equation (13) to encode these elements, and finally form the encoded DNA a matrix p1 of m × 4n.

Mathematical Problems in Engineering
Step 4. Generate the key matrix K.
(1) Use μ 0 y 0 , and z 0 produced in Step  (2) Employ the matrix V to produce the key matrix K by the following formula: Step 5. Implement DNA XOR between the p1 and the key matrix K by equation (13): where C denote the ciphertext DNA matrix.
Step 6. Decode the matrix C by equation (13) to get the cipher block E.
Step 7. Employ the Arnold transform to make cipher block E have more secure encryption effect. Arnold scrambling is an image encryption technology which disturbs the original image by changing the position of image pixels. In our method, Arnold transform is applied to further disturb the pixel of ciphertext image E, and its definition is represented as follows: where a and b are positive integers, randomly selected scrambling parameters from the positive integers that affect the output value, and usually 1 is selected. N denotes the order of the image matrix. e decryption process is the reverse operation of the encryption process.

Experimental Result and Discussion
In this section, a series of skin lesion images are applied to analyze the performance of the proposed detection. From Table 3, the strengths and limitations of different DNA sequence encryption algorithms are summarized and compared. erefore, the proposed method is superior to other compared encryption schemes in some aspects.

Experimental Results of Skin Lesion Detection.
Without loss of generality, we set default parameters: τ � 1, Δt � 5, μ � 0.04, λ � 20, c � 10, and ε � 1 (for δ ε (z)). e values of σ and α are provided in the following figure. In all the experiments, we simply initialize level set functions to zero function, i.e., ϕ 0 � 0. e following two experiments demonstrate that the diffusion model [26] and our model are applied to extract the lesion areas in several skin lesion images. It is a very important task to extract lesion regions from the background in the field of computer vision. Because of the variation in the shape and appearance of the skin lesions, the detection of the edge of the skin lesions is a very important problem. Other factors such as strong noise and hair, dim edges, or strong asymmetry, or complex texture background also make the segmentation process more difficult. Figure 3 describes that the proposed model can handle well for four skin lesion images and is compared with the diffusion model [26] through the detective results and computing times. For a fair comparison, we select the best scale parameter K and the most suitable high threshold t H (given in the caption of Figure 3) for the diffusion method. Our level set evolution starts with ϕ 0 � 0, so there are no initial contours in the top row of Figure 3. It is clearly seen from the bottom that our model (with parameters σ � 2.4, 2.3, 2, α � 0.99, 0.9, 0.78 for the first three images) obtains the satisfactory segmentation results for four images, which are almost the same as the diffusion model visually, but the important improvement of the proposed method is that computation complexity is lower than that in the diffusion method. Iteration umbers and CPU times of the two methods are exhibited in Table 4. It can be surveyed that iteration numbers and CPU times of the proposed method are all less than those of the diffusion model. Figure 4 shows detective results of our model for ten skin lesions image with blurry boundaries and/or asymmetric lesions areas, as shown in the first and third rows. It is difficult to extract the lesion areas in such images. Here, we do not show the detective results of the diffusion model [26], as the model cannot achieve satisfactory detective results. It can be observed from the second and fourth rows of Figure 4 that our method (σ � 6, 6, 2.3, 2, 2, α � 0.83, 0.81, 0.9, 0.85, 0.99 for images in the first row; and σ � 2, α � 0.85, 0.75, 0.95, 0.85, 0.85 for images in the third row), and for the last two images), stating with a constant function ϕ 0 � 0, accurately extracts the lesion area boundaries.
We conclude this section by simply describing about parameters α and σ; for our model, the parameters α and σ are very important for the function ](x, y). By experiments, our observations are as follows: for skin lesions images, σ is typically about 2, and α is in the range between 0.75 and 0.99.

Experimental Results of Skin Lesion Region Protection.
In this section, we, respectively, exhibit the subjective visual effect and objective data to prove the performance of plaintext encryption. We take four skin lesion images from Figures 3 and 4, as examples using the initial values x 0 , r and x 0 , y 0 , z 0 , μ for the 1D-LSS system and 2D-LASM system. It can be seen from Figure 5 that the proposed method can protect significant regions.

Key Sensitivity Analysis.
e encryption scheme expects a slight change in the key to result in completely different results. Key sensitivity guarantees the uniqueness of the key. e encryption algorithm contains multiple secret keys, and the value contributed by each key is different in the encryption process. e original clear image can be decrypted only when all the keys are correct.
To verify the sensitivity of the encryption algorithm for each key, the key sensitivity is performed by changing just one key in 10 −15 position and keeping the rest same. e   Table 5. It can be obviously seen from this table that when the key has a trivial change, the encrypted image-blocks have a complete change, and more than 99% pixels are modified compared with Figure 5(i), which implies the proposed scheme is highly key sensitive to all the keys.

Histogram of Analysis.
Histogram describes the distribution of pixel values in an image. A secure cipher image encryption method should have a uniform histogram [38][39][40][41]. Generally speaking, a natural image should follow a regular distribution, while the secure encryption method should force the cipher image to follow a consistent distribution. Figure 6 reveals that our method can effectively  e variances of histograms and chi-square values can be calculated as follows [42]: where n i is the occurrence frequency of gray level i, (n/256) is the expected occurrence frequency of each of gray level, and n is the number of all the pixels. Z � z 1 , z 2 , . . . , z 256 is the vector of the histogram values, and z i and z j are the numbers of pixels in which gray values are equal to i and j, respectively.
As shown in ref. [42], according to the chi-square distribution table, at 255 degrees of freedom and 0.05 significance level, χ 2 255,0.05 � 293.2478. With a significance level of 0.05, the chi-square test results are listed in Table 6. e results indicate that the null hypothesis that the distribution is uniform cannot be rejected at 0.05 significance level. In this circumstance, redundancy of the plain images has successfully been concealed and consequently does not provide any clue to apply statistical attacks. Besides, Table 7 lists the comparison of histogram variance among image encryption schemes. From this table, we can observe that the average histogram variance of the proposed method is less than the schemes in ref. [37,42].

Correlation Analysis.
We arbitrarily pick up 2,500 pairs of adjacent pixels in three directions which include horizontal, vertical, and diagonal from the skin lesion region of the plain image and the corresponding cipher image. e correlation coefficients r xy of two adjacent pixels are computed through the following formulas: where x and y are values of the two adjacent pixels in the image. E(x) and D(x) are given by Figure 7 illustrates the correlations of two horizontally, vertically, and diagonally adjacent pixels in the skin lesion region of plaintext image and its cipher image. Besides, Table 8 describes the correlation coefficients of adjacent pixels of the skin lesion region in the plaintext image and cipher image. We can clearly observe from these results that the correlations between adjacent pixels in each direction of cipher image-block are much lower than the corresponding plaintext blocks.

Information Entropy Analysis. Information entropy H(m)
is employed to measure the uniform distribution of pixel grayscale, and its definition is given as follows: where m i denotes the pixel value and the p(m i ) is the probability of m i . If the pixel values are distributed more uniformly, the information entropy is larger. For a gray image in the range of [0, 255], ideally, if all pixel values have an equal probability of occurrence, the upper limit value of image entropy H is 8. From Table 9, we can observe that the entropies of the cipher image-blocks are closed to 8, which have been added to the corresponding plaintexts. erefore, this reveals that our method can defend the entropy cryptanalysis. (d) Figure 6: Skin lesion image, cipher image, the corresponding target, and cipher image-block histograms.

Computational and Complexity Analyses.
Algorithmic complexity is an important reference standard for algorithm performance. We analyze the computational complexity of the proposed scheme and compare it with ref. [36]. For the proposed scheme, the computational complexity has two parts: target extraction and target encryption. In the target extraction process, the main source of time complexity is the numerical solution of level set evolution equation (2). In this paper, we employ a simple explicit finite difference scheme to solve this equation. Its time complexity is O(m × n). e encryption process contains the DNA level diffusion part and the Arnold scrambling further disturbs the pixel of cipher image-block. For the DNA level diffusion part, the complexity of the time-consuming includes generating chaotic sequences and DNA encoding and decoding operations. We, respectively, adopt 1D LSS and 2D-LASM to produce the chaotic sequences for the encoded DNA matrix and the key matrix K in the diffusion steps. e time complexity of generating LSS system-based sequence is O (8), and the time complexity of generating the 2D-LASM system-based sequence is O(2 × m × n). So the total time complexity of generating chaotic sequences is O(2 × m × n). e time complexity of DNA encoding and decoding op- e time complexity of Arnold scrambling is no more than O(m × n). So the total time complexity of the proposed algorithm is For ref. [36], there are three stages of encryption steps, that is shuffling, diffusion, and shuffling. e authors employ the complex hyperchaotic system to generate the chaotic sequences for increasing the strength of encryptions and decryptions, whereas low-dimensional chaotic systems are adopted in our algorithm, and the low-dimensional system is easy to implement and can run faster. As mentioned in ref. [36], the time complexity of the algorithm is O(4 × m × n). erefore, the time complexity of our algorithm is lower than that of ref. [36].

Conclusion
A novel approach for skin lesion detection and privacy protection is presented in this paper. Firstly, a transition region-based level set evolution method is proposed to detect skin lesion image. is idea of the proposed method is to construct the energy functional that compels the level set   Table 9: Information entropy analysis.

Skin lesion image Target
Cipher image-block Figure 5 function to have a different sign inside and outside the image target. en this functional is introduced into a variational level set expression with the other two functionals. en, once skin lesion detection has been performed, the detected skin lesion pixels are encrypted by utilizing DNA sequences and chaotic systems. We employ 2D-LASM and 1D-LSS to make the pseudorandom sequences and use the 256-bit hash value of the plaintext image to generate the initial values and system parameters. Different from these existing encryption algorithms based on DNA computing, the DNA encoding/ decoding rules of the skin lesion region and the key matrix are generated by the skin lesion region, and this may increase resilience to statistical attacks. Experimental results of skin lesions detection show that the proposed method is particularly suitable for the detection of skin lesion images with strong noise and complex background. Meanwhile, security analyses reveal that our selective encryption method has a good encryption effect.

Data Availability
e data used to support the findings of this study have not been made available.

Conflicts of Interest
e authors declare that they have no conflicts of interest regarding the publication of this paper.

Authors' Contributions
D.A. conceptualized the study, was responsible for methodology, and was involved in funding acquisition; J.L. was responsible for software and was involved in visualization; S.Z. validated and investigated the data; Y.L. performed formal analysis, reviewed and edited the manuscript, and supervised the study; J.L. and S.Z prepared the original draft.