## 3 The Proposed IoMT Model
### Secure Data Transmission and Storage
Net Pixel Change Rate (NPCR) and Unified Average Changing Intensity (UACI) were used as metrics for measuring HMCC's resistance to cryptanalysis attack. The NPCR and UACI were determined using the formula in Equations (3) and (4), respectively, for two ciphertexts C1 and C2 of length \(l\). Figure 2:5 (3) Figure 2:6 (4) where \(W(i)= \begin{cases}0,\ if\ C1(i)=\text{C2}(i)\\ 1,\ if\ C1(i)\
eq\text{C2}(i)\end{cases} \) The following procedures were followed for the differential cryptanalysis of MCC:

1. Encrypt a sample of plaintext P using MCC encryption module to obtain ciphertext C1;
2. Change a symbol of P to another character to obtain a new plaintext P1;
3. Encrypt the plaintext P1 using MCC encryption module to obtain ciphertext C2;
4. Determine \(NPCR=\frac{\sum_{i=1}^{l}W(i)}{l}\times 100\) where \(W(i)= \begin{cases}0,\ if\ C1(i)=\text{C2}(i)\\ 1,\ if\ C1(i)\
eq\text{C2}(i)\end{cases} \);
5. Determine \(UACI=\frac{100}{l\times 256}\sum_{i=1}^{l}\lvert\text{C1}(i)-\text{C2}(i)\rvert\) ;
6. **HMCC Information Entropy Analysis:** All of the 256 ASCII symbols are used by HMCC, so the expected maximum entropy is 8 when the formula in Equation (5) is used for entropy calculation. \[H(m)=\sum_{i=0}^{2^{N}-1}P(m_{i})\log_{2}\biggl{(}\frac{1}{P(m_{i})}\biggr{)}\] (5) where N signifies the bit size of message m, \(2^{N}\) represents the symbols' sample space, \(P(m_{i})\) denotes the probability of \(m_{i}\), and \(\log_{2}\) represents the logarithm in base 2. The entropy is expressed in bits. The entropy \(H(m)\) of a message m encrypted with a \(2^{N}\) symbol sample space is N if Equation (5) is applied. The following procedures were used to carry out the entropy analysis of the MCC cipher:

1. Encrypt a sample of plaintext P using HMCC encryption module to obtain ciphertext C;
2. Find distinct unique ASCII characters Ptext and Ctext from P and C, respectively;
3. Determine the frequency of each of the unique characters in Ptext and C text from P and C to respectively obtain frequency and cfrequency;4. Determine the probability of each unique character in P and C, respectively, using the formula pcharprobability [i] = pfrequency[i]/LENGTH(P) for I = 1 to LENGTH(P) and ccharprobability [i] = cfrequency[i]/LENGTH(C) FOR i = 1 to LENGTH(C);
5. Determine the entropies of the plaintext and ciphertext by applying Equation (5): \[\textit{i.}\qquad\textit{H}(\textit{P})=\sum_{i=0}^{2N-1}\textit{pcharprobability }\left[i\right]\times\textit{log}_{2}\Big{(}\frac{1}{\textit{pcharprobability }\left[i\right]}\Big{)}\] \[\textit{ii.}\qquad\textit{H}(\textit{C})=\sum_{i=0}^{2N-1}\textit{ ccharprobability }\left[i\right]\times\textit{log}_{2}\Big{(}\frac{1}{\textit{ccharprobability }\left[i\right]}\Big{)}\]
6. Compare H(P) and H(C) with the maximum entropy value. 5. **Autocorrelation Analysis of HMCC:** The autocorrelation function is used to define the resemblance of two sequences. Cryptanalysts use autocorrelation to calculate secret key length in classical ciphers. A cipher that is resistant to autocorrelation attacks will produce ciphertext that has more uniform and lower autocorrelation than plaintext. The following steps were taken in order to carry out autocorrelation analysis: 1. Encrypt a sample plaintext P to obtain ciphertext C; 2. Find distinct unique ASCII characters Ptext and Ctext from P and C, respectively; 3. Determine the frequency of each of the unique characters in Ptext and Ctext from P and C to respectively obtain prefrequency and cfrequency; 4. Plot the graph of the ASCII values of characters in Ptext against prefrequency and the ASCII values of Ctext against cfrequency; 5. Compare the two graphs. 6. **Strict Avalanche Criterion of HMCC** Two variants of SAC, namely Strict Plaintext Avalanche Criterion (SPAC) and Strict Key Avalanche Criterion (SKAC), were used to measure the strength of HMCC. Here, SKAC was adopted and also adapted for SPAC. Data sets as input of SKAC and SPAC tests were produced by the recommendation of [62].