A secure healthcare data sharing scheme based on two-dimensional chaotic mapping and blockchain

This part will perform security analysis for the threat model proposed in System model. The dataset used and the system environment used in this work are as follows:The system environment is Windows 11 system, CPU: Intel i7-8700 3.20 GHz, GPU: NVIDIA GeForce RTX 3090 with 8GB RAM. MATLAB R2021b, Python 3.10.9, Go 1.20.4. The blockchain used is Hyperledger Fabric 2.2.5.The dataset used ESC-50 dataset and the local healthcare dataset. ESC-50 is a widely used audio dataset, with audio files in .wav format. We will randomly select some audio files from ESC-50 to participate in the simulation experiments. The local healthcare dataset is healthcare data for a certain region from 2022 to 2023. All data were desensitised before use.In this section, we will randomly select three audio files from the ESC-50 dataset as IVA and three segments of data from the local healthcare dataset as SD.Key sensitivitySecure encryption algorithms require a high degree of sensitivity to the key. Small differences in the key can also directly affect the result of the encryption. This reflects the ability of the encryption algorithm to withstand brute force breaking attacks. About 2CME, \(K_A = Hash256(P_{A1})\) as the input of 2D-ILM, the output of 2D-ILM \(X\),\(Y\) as the key stream. The sensitivity of 2CME to the key is guaranteed by the high sensitivity of the 2D chaotic mapping 2D-ILM to the initial conditions. Where the change of the final ciphertext caused by the key difference is defined as:$$\begin{aligned} \frac{\Delta C}{C}=\frac{|2CME(2D-ILM(K_A))-2CME(2D-ILM(K_A+\Delta K))|}{C} \end{aligned}$$
(13)
Apply different one-bit difference values \(\Delta K_i\), \(\Delta K_j\) to \(K_A\) to obtain different ciphertexts \(C_i\),\(C_j\). The length of the ciphertexts is \(N\), and the ciphertext difference rate (\(Cdr\)) is calculated as:$$\begin{aligned} Cdr=\frac{Diff(C,C_i)+Diff(C,C_j)}{2N} \end{aligned}$$
(14)
$$\begin{aligned} Diff(A,B)=\sum _{i=0}^{N-1}Difp(A(i),B(i)) \end{aligned}$$
(15)
$$\begin{aligned} Difp(A(i),B(i))={\left\{ \begin{array}{ll}1,A(i)=B(i)\\ 0,A(i)\ne B(i)\end{array}\right. } \end{aligned}$$
(16)
A and B represent two ciphertexts of the same length and \(A(i)\) represents the ith element. The key sensitivity of the proposed 2CME is reflected by obtaining the \(Cdr\) value. The original key is \(K_o\) and the new keys with minor modifications are \(K_1\),\(K_2\),\(K_3\),\(K_4\).$$\begin{aligned} K_o&=f8247deb44ff5d9581cfed6ff3fc02c1c53f8ddba45bc7bf24249a5f071b909f \\ K_1&=f9247deb44ff5d9581cfed6ff3fc02c1c53f8ddba45bc7bf24249a5f071b909f \\ K_2&=fa247deb44ff5d9581cfed6ff3fc02c1c53f8ddba45bc7bf24249a5f071b909f \\ K_3&=78247deb44ff5d9581cfed6ff3fc02c1c53f8ddba45bc7bf24249a5f071b909f \\ K_4&=e8247deb44ff5d9581cfed6ff3fc02c1c53f8ddba45bc7bf24249a5f071b909f \end{aligned}$$The \(Cdr\) test results are as follows Table 3. From the results, it is seen that 2CME maintains more than 99% for the key sensitivity, which can show that the 2CME algorithm based on 2D-ILM has excellent key sensitivity.Table 3 Key sensitivity testing for 2CME.Differential attack analysisDifferential attacks belong to the category of statistical attacks. In the proposed 2CME algorithm, the obfuscation of 2D-ILM is directly related to the resistance of the final encryption result to statistical attacks. If the output result of 2D-ILM can make the ciphertext data of IVA randomly distributed in space, then it is able to resist differential attacks. Where the chaotic performance of 2D-ILM depends on the initial value sensitivity and traversal of the algorithm. Regarding the chaotic performance of 2D-ILM can can be evaluated using Lyaponov exponent and attractor.The chaotic behavior of 2D-ILM reflects its security characteristics. In this work, it is compared with three existing 2D chaotic maps: 2D-LNIC25, 2D-LSM38 and 2D-ICM39. By examining the dynamic behaviors of different systems, the chaotic behaviors of various 2D chaotic maps are compared under the same parameter space and control parameters.

(1)

Lyapunov exponent (LE)
For two-dimensional chaotic systems, there are two Lyapunov exponents corresponding to the exponential growth or decay rates of the system in two orthogonal directions. Typically, systems with positive Lyapunov exponents are considered chaotic, while systems with multiple positive Lyapunov exponents are considered hyper-chaotic. Used the Jacobian matrix to calculate the Lyapunov exponents of different two-dimensional chaotic mappings in two orthogonal directions. If both \(LE_x\) and \(LE_y\) are greater than 0, the mapping is considered hyper-chaotic. Based on the actual data range of selected audio files, we used the control parameter \(\mu _1\) as the independent variable, with a data range of [10, 80], and randomly selected four \(\mu _2\) values within this range, with \(x_0\) and \(y_0\) as initial values. The Lyapunov exponents of 2D-ILM and other compared two-dimensional mappings are shown in Fig. 3. From the simulation results, it can be observed that within the same parameter range, the Lyapunov exponents of 2D-ILM are all greater than 0 and exhibit an increasing trend. This indicates that 2D-ILM is in a hyper-chaotic state within the parameter range, and its trajectory is extremely difficult to infer. Figure 3 also compares the Lyapunov exponents of 2D-ILM with other mappings, showing that the LE values in both directions of 2D-ILM are greater than those of other mappings, indicating that 2D-ILM exhibits better chaotic behavior compared to other mappings.Fig. 3Lyapunov exponents of 2D-ILM. (a) \(\mu _2\)=5.4 (Sequence X,Y). (b) \(\mu _2\)=38 (Sequence X,Y). (c) \(\mu _2\)=63.5 (Sequence X,Y). (d) \(\mu _2\)=78.0 (Sequence X,Y).

(2)

Attractor
The attractor of a chaotic map refers to a collection of stable and attracting trajectories in the chaotic map, which tend to evolve towards these numerical values under different initial conditions. The attractor phase diagram illustrates the stable state of the chaotic system after long-term evolution. Two-dimensional chaotic maps with good chaotic behavior typically exhibit attractor phase diagrams with complex and irregular shapes, distributed uniformly in phase space and occupying a large area.
In this part, simulations of attractor phase diagrams were conducted for 2D-ILM and three comparative mappings. The control parameters were set to \(\mu {}_1\) = 22 and \(\mu {}_2\) = 5.4, and attractor phase diagrams were generated after 2000 iterations. The results, as shown in Fig. 4, indicate that the attractor of 2D-ILM uniformly covers the two-dimensional phase plane space ranging from [-1,1]. This demonstrates that 2D-ILM exhibits excellent chaotic behavior, capable of generating unpredictable trajectories more effectively within the parameter space.Fig. 4Attractor phase diagram (a) \(\mu _1\)=22, \(\mu _2\)=5.4 (2D-ILM). (b) \(\mu _1\)=22, \(\mu _2\)=5.4 (2D-ICM). (c) \(\mu _1\)=22, \(\mu _2\)=5.4 (2D-LNIC). (d) \(\mu _1\)=22, \(\mu _2\)=5.4 (2D-LSM).Table 4 Differential attack analysis of 2CME.

(3)

Differential attack
In a data sharing network, attackers exploit differentials between encrypted ciphertexts obtained from original and modified data to decipher encryption algorithms. This type of attack is known as a differential attack. In cryptography, NPCR and UACI are commonly used to assess the resistance of encryption algorithms against such attacks. The calculation formulas are as follows, where \(C^1\) represents the original data, \(C^2\) represents the modified data, and T denotes the data length.$$\begin{aligned} {D(i)} = {\left\{ \begin{array}{ll} 0, & C^1(i) \ = \ C^2(i) \\ 1, & C^1(i) \ \ne \ C^2(i) \end{array}\right. } \end{aligned}$$
(17)
$$\begin{aligned} NPCR = \sum _i \dfrac{D(i)}{T} \text {100\%} \end{aligned}$$
(18)
$$\begin{aligned} UACI = \sum _i \dfrac{\left| C^1(i) – C^2(i)\right| }{T} \text {100\%} \end{aligned}$$
(19)
In reference40, the authors provide acceptable ranges for NPCR and UACI. The acceptable range for NPCR is 99.5875–100%, while the acceptable range for UACI is 33.3648–33.5623%. NPCR and UACI values falling within these ranges indicate that the algorithm possesses good resistance against differential attacks. As shown in Table 4, this paper calculates the NPCR and UACI values for both the signature plaintext and data plaintext after being processed by 2CME. The experimental results demonstrate that 2CME exhibits strong resistance against differential attacks.

Chosen plaintext attackSelective plaintext attacks usually analyse the relationship between ciphertexts generated by plaintexts with small differences. In order to ensure the security of the algorithm, it is usually required that the ciphertexts generated by different plaintexts have large differences between them. The ability of the encryption algorithm to resist a chosen plaintext attack is tested by the methods described below.Two segments of \(P_A\), namely \(A_1\) and \(A_2\), two segments of \(P_D\), namely \(D_1\) and \(D_2\), these data are processed separately by XOR operation. The resulting outputs are used as inputs to obtain the corresponding ciphertexts \(T_{A1}\), \(T_{A2}\), \(T_{D1}\) and \(T_{D2}\). If the following conditions hold:$$\begin{aligned} {\left\{ \begin{array}{ll} A_1 \oplus A_2 \ne T_{A1} \oplus T_{A2}\\ D_1 \oplus D_2 \ne T_{D1} \oplus T_{D2} \end{array}\right. } \end{aligned}$$
(20)
Fig. 5\(P_A\) Chosen Plaintext attacks analysis of 2CME. (a) Audio of 1-12654-A-15.wav XOR 1-110389-A-0.wav. (b) Audio of 1-208757-A-2.wav XOR 1-13572-A-46.wav. (c) Audio of 1-116765-A-41.wav XOR 1-101336-A-30.wav.Table 5 Chosen attack analysis of 2CME.It indicates that 2CME can resist chosen-plaintext attacks. In the chosen-plaintext attack resistance test, the plaintext and ciphertext of 2CME are shown in Fig. 5. NPCR can assess the difference between plaintext and ciphertext. The experimental results of the selected data are shown in the table. It can be seen from Table 5 that 2CME can resist chosen-plaintext attacks and four classical attacks.Correlation analysisIn 2CME, adjacent elements of plaintexts have some relationship with each other, but adjacent elements of secure ciphertexts should exhibit low correlation with each other to avoid statistical attacks. The correlation between adjacent elements can be expressed by the correlation coefficient, which is calculated as follows:$$\begin{aligned} r_{(X,Y)} = \dfrac{Cov(X,Y)}{S_XS_Y} \end{aligned}$$
(21)
where \(Y\) represents the adjacent elements of \(X\), \(\textit{Cov}(X,Y)\) denotes the covariance of the two samples, \(S_X\) and \(S_Y\) represent the standard deviations of the two samples. Randomly extract 4000 pairs of adjacent elements from IVA as the IVA sample, and use the full data of SD as the SD sample. Test the correlation coefficients of the plaintext and ciphertext for the selected samples. The test results are as follows.Fig. 6Correlation coefficients of 1-34094-A-5.wav. (a) Plaintext between \(A_n\) and \(A_{n+1}\). (b) Plaintext between \(A_n\) and \(A_{n+2}\). (c) Plaintext between \(A_n\) and \(A_{n+3}\). (d) Ciphertext between \(C_n\) and \(C_{n+1}\). (e) Ciphertext between \(C_n\) and \(C_{n+2}\). (f) Ciphertext between \(C_n\) and \(C_{n+3}\).Table 6 Correlation coefficients of 2CME.As shown in Fig. 6 and Table 6, there is a high correlation in \(P_{A}\) and \(P_{D}\). After processing with 2CME, not only is the correlation between adjacent elements in the ciphertext reduced to a low value, but the correlation between non-adjacent elements is also eliminated. This indicates that 2CME has good resistance to statistical attacks.Information entropy analysisThe information entropy can reflect the randomness of the information contained in the data cipher, analysing the information entropy can show the degree of randomness of the information distribution. The information entropy is calculated as follows:$$\begin{aligned} H(s)=\sum _{i=1}^{2^n}P(S_i)log(\frac{1}{P(S_i)}) \end{aligned}$$
(22)
\(2^n\) denotes the total number of states in the data source, \(S_i\) denotes a single state and \(P(S_i)\) denotes the probability of occurrence of \(S_i\).In the entropy experiments conducted in this paper, the more chaotic the information distribution, the closer the entropy value is to the theoretical value. The entropy of 2CME is shown in Table 7. From the experimental results, it can be observed that regardless of whether the entropy of the IVA and SD before encryption is high or low, the entropy of the ciphertext obtained after passing through 2CME is close to the theoretical value. This indicates that 2CME exhibits a good encryption effect, making it difficult for attackers to obtain plaintext information from \(C_{IVA}\) or \(C_{SD}\).Table 7 Information entropy of 2CME.Noise attack analysisWhen data is transmitted, attackers may employ noise attacks to interfere with the data transmission, which can affect the quality of the decrypted information. The more plaintext information that can be recovered when the ciphertext is subjected to interference, the stronger the algorithm’s resistance to noise attacks. The ciphertext is interfered by adding pretzel noise of different densities. Mean Square Error (MSE) and Peak Signal to Noise Ratio (PSNR) are used to calculate the effect of noise on the ciphertext, MSE and PSNR are defined by the following equations:$$\begin{aligned} MSE=\frac{1}{N}\sum _{i=1}^N(P_i-C_i)^2 \end{aligned}$$
(23)
$$\begin{aligned} PSNR=10\log _{10}(\frac{Max_{P}^{2}}{MSE}) \end{aligned}$$
(24)
where \(P_i\) represents the original plaintext, \(C_i\) is the plaintext obtained by decrypting the scrambled ciphertext, \(N\) represents the data length. \(Max_P\) is the maximum value of the original plaintext data.Two segments of audio data were selected from the dataset as IVA. Salt-and-pepper noise with levels of 0.0005, 0.001, and 0.005 was added to the ciphertext, and then the decryption was performed. Figure 7a,b,c,d show the corresponding original IVA and the decrypted IVA after adding noise. Similarly, Fig.7e,f,g,h show the IVA before and after decryption. The NPCR values between Fig.7a,b,c,d are 0.3342%, 0.4077% and 0.5433% respectively. The NPCR values between Fig.7e,f,g,h are 0.3574%, 0.4549% and 0.5279% respectively. The NPCR values obtained from the tests are all less than 1% indicating that the difference between the data after adding noise decryption and the original data is not significant. The data in Table 8 show that both IVA segments present lower MSE values and higher PSNR values. The experimental results indicate that the \(C_{IVA}\) of 2CME can still obtain most of the original information after the decryption algorithm following a noise attack, demonstrating that 2CME has excellent robustness.Table 8 The MSE and PSNR test of 2CME.Fig. 7Noise attack analysis of 2CME. (a) Original audio of 1-34094-A-5.wav . (b) The (a) with 0.0005 salt & pepper noise. (c) The (a) with 0.001 salt & pepper noise. (d) The (a) with 0.005 salt & pepper noise. (e) Original audio of 1-97392-A-0.wav. (f) The (e) with 0.0005 salt & pepper noise. (g) The (e) with 0.001 salt & pepper noise. (h) The (e) with 0.005 salt & pepper noise.

Hot Topics

Related Articles