## 3 The Proposed IoMT Model
### Secure Data Transmission and Storage
This implies that the privacy of the patient's information is preserved. To search for a particular piece of information from the encrypted data in the cloud, the user only needs to analyse the sid and vid components of the record keys. Only the records that meet up with the criteria searched for will be decrypted, and not the entire data. A user can only access information pointed to by the key on the cloud. Retrieving a particular piece of information from the cloud uses Algorithm 10. The user chooses which information to retrieve from the cloud and the search is made, followed by decryption of the file. ```
Input: ssk, patientid
1. START
2. INPUT sid, vid
3. LET found = FALSE
4. WHILE found = FALSE
5. x = CONCATENATE sid and vid
6. k = SELECT key from the list available to the user and extract sid and vid component of the key
7. IF x = k THEN found = TRUE
8. DECKYPT the file with the key using ssk
9. ENDWHILE
10. STOP. ```

**Algorithm 10** Searching for a particular file on the cloud with B+ file organization

The presented privacy model has the following advantages:

1. The space on the cloud is preserved as there is no need to store encrypted data redundantly, contrary to the approach in [59];
2. Access to the data on cloud is based on B+ file organization which can be done both sequentially and randomly. Hence, search time is greatly reduced;
3. There is no need for intensive computation on the encrypted data for searching purposes. This is an improvement to the existing FHE implementations;
4. B+ tree is a self-balancing data structure for executing accurate and faster searching, inserting, and deleting procedures on data;
5. B+ trees do not waste space;
6. It takes an equal number of disk accesses to fetch records;
7. B+ trees have redundant search keys, and storing search keys repeatedly is not possible;
8. Faster search queries as the data are stored only on the leaf nodes. ### Analysis of the Proposed IoMT Model

The HMCC was examined on a Hewlett Packard laptop equipped with an AMD E1-1200 APU with Radeon(TM) HD Graphics 1.40 GHz, 4.00 GB (3.59 GB useable), a 64-bit Windows 10 operating system, and an x64-based processor. The Scientific Python Development Environment (Spyder), Copyright 2009-2020, was utilized during the development and analysis. The proposed IoMT system was subjected to security testing against a variety of attacks. The following subsections discuss various security analyses carried out on the proposed IoMT model. 1. **Some samples of plaintext were carefully used as input into HMCC**. The output ciphertexts obtained were analysed by examining how the cryptosystem handled these known plaintexts. Samples of plaintext used were plaintext with the same characters all through, plaintext with repetitive terms, and plaintext with non repetitive terms. Analysis of the output ciphertexts from HMCC were carried out using the following procedure:

1. Encrypt a block of plaintext P1 that contains the same characters throughout;
2. Encrypt a block of plaintext P2 that contains repetitive characters;
3. Encrypt block of plaintext P3 that contains distinct characters;
4. Examine the ciphertext of each block obtained from steps 1 and 3. 2. **Spectral Frequency Analysis of Modified Caesar Cipher:** Information regarding plaintext, key, or both can be obtained by cryptanalysts by making use of frequency analysis of ciphertexts. HMCC resistance to frequency analysis attacks was carried out using spectral frequency analysis. Frequency analysis of some samples of plaintext and of the ciphertext produced when the plaintext passed through the encryption algorithm of HMCC were examined by plotting the histogram of the frequencies of the characters in the plaintext and ciphertext. 3. **Differential Cryptanalysis of HMCC:** HMCC resistance to differential attacks was evaluated. The encryption results when two plaintexts that differ only by one bit were encrypted with the same key were analysed.