# Tokens Shuffling Approach for Privacy, Security, and Reliability in IoHT under a Pandemic
## 3 Proposed Approach (TSA)
### Algorithm of TSA
In the normal case, all data are stored with the user himself and are not sent to the service provider, and this will save a lot of time and processing and improve performance and privacy. \[\text{E}=-\sum_{i=0}^{\text{k}}\text{Pi}*\text{Log2}(\text{Pi})\]0 (11)
* It will not affect the accuracy of the queries at all, even the dynamic ones, as he sends an aggregated set of queries at once. * It perfectly employs the cache in the user's device to improve performance and privacy. * It does not require trust in any party (peer, fog, and SP), and it complicates the process of cooperation between more than one malicious party. * It provides data security and privacy and ensures data integrity from tampering. ### Summary of the Results

Figure 3 shows a comparison between the previous approaches in terms of E, which can also represent EE. Figures 4 and 5 show the comparison in terms of performance, where Figure 4 is compared in terms of the number of queries sent and Figure 5 is compared in terms of time. \[\text{E}=-\sum_{i=0}^{\text{k}}\text{Pi}*\text{Log2}(\text{Pi})\]1 Performance Level Comparison based on the Number of Sent Queries. \[\text{E}=-\sum_{i=0}^{\text{k}}\text{Pi}*\text{Log2}(\text{Pi})\]2 Privacy Level Comparison based on the Entropy Metric. Figure 3 depicts the change in the Entropy (E) value over time (after a specific number of minutes). TSA (The New Approach) has Max (E) like BTP and SPF when the user does not send his query to the service provider. As for the dummy or obfuscation approach, the level of protection is lower because the user still sends part of his real information to the service provider (note: DOA refers to relying on obfuscation only without using another approach with obfuscation). Of course, the entropy value refers to the level of protection from the external attacker or from the service provider in case it is a malicious party. The level of protection from the cooperating fog node or the cooperating peer varies according to the level of trust indicated in the previous analysis for each approach. Figure 4 shows the number of queries sent to SP from the K queries required by the user. We considered the presence of the cache in each approach with a convergent H hit rate. TSA is superior to all other methods because the user does not send to the SP every time; the user collects his information in his local cache and sends it only to a particular case. We note that the Dummy approach causes an increase in the number of sent queries, while the obfuscation and encryption approaches do not affect the number of sent queries. The SPF approach is also good because it relies on real queries, in addition to the cache within the fog node and peer. Figure 5 presents the response time in milliseconds, according to the number of required queries. Figure 5 shows the superiority of the proposed approach in terms of the transmission and processing time for queries, where the Dummy causes a high transmission time due to the number of extra queries, and the obfuscation approach causes a high time due to the size of the area and the need for additional processing. The SPF approach, even though it uses a fog node, is superior to a BTP approach that only depends on a fog node because BTP also uses encryption at every step, which affects the processing time. As for the proposed approach, despite its use of encryption for a group of queries, the small number of communications with the SP significantly reduced the time and achieved superiority over the other approaches. Briefly, TSA outperforms the standard approaches in protecting data privacy and security in terms of privacy and performance level without affecting the accuracy of the results. In addition, TSA supports dynamic queries and eases the burden on the system and the service provider by employing the cache in the user's device. On the other hand, there is no approach without flaws.