# Tokens Shuffling Approach for Privacy, Security, and Reliability in IoHT under a Pandemic
## 3 Proposed Approach (TSA)
### Algorithm of TSA
\[\text{T}=\text{Nq}*\text{Sq}*\text{TSend}+\text{Nq}*\text{Sq}*\text{TProcess}\] (4)
* The performance rate relating to the cache is usually given by the expected hit ratio in the cache H.

\[\text{H}=\frac{\text{Number q are answered by cache}}{\text{Nq}} \tag{5}\]

To compare the previous approaches with the proposed approach (TSA), we ran a simulation based on some assumptions, similar to what was in [30, 31, 33, 37]. These hypotheses are:

* The study is carried out on a specific area divided into sectors (cells) of almost equal size, and we symbolize the cell with the C.
* In each C cell, there is a Fog Node, standing for FN, which is responsible for managing the operations of Queries, Peers, and Cache. * There are 100 different Points of Interest (Pols) that are randomly distributed over cells, knowing that the same type can be repeated in more than one cell. * There are 1000 U-users scattered and moving randomly within the region during the study. * The study period will be 2 h, but we will consider that the system has been working since the pandemic's beginning. * The size of the data for one query is Sq, and we will assume that Sq = 1 kb and, therefore, the total volume S can be calculated by: \[\text{S}=\sum_{i=1}^{\text{k}}\text{Sqi}\] (6)
* In the case of using obfuscation, the size of the obfuscated area will be denoted by the symbol SO, and, therefore, the size of the query will be SOq, which is greater than Sq. * The average transmission time of one query to the SP through a 4G connection is Tsp = 10 ms.
* Assume that the approximate average transmission time of a single query to a fog node and through a WiFi connection is Tfn = 2 ms.
* Assume that the approximate average transmission time of one query to another user Peer through a WiFi connection is Tpeer = 4 ms, including the period of obtaining the list of users in the same cell. ### Comparison of TSA with Other Approaches

In this part, we will find the values of the selected metrics according to each protection approach in addition to TSA. #### 4.2.1 Dummy Approach--Results

* The level of privacy is related to the number of dummies used by the user K, where the privacy increases with the increase in the value of K, and this is clear for Equation (1), but according to Equation (2), the value of E will never reach the maximum value of 1 because the user sends his query within the fake queries; therefore, there is a real amount of information that will be formed by the attacker or the malicious SP after each transmission. Therefore, it is certain that the error rate will not be 100% for the attacker based on Equation (3). * The level of performance will be adversely affected by the increase in the level of protection associated with K. The total number of queries Nq = 1 + K for each query. Thus, the total transmission time T will be greater, according to Equation (4), based on the new value of Nq. \[\text{T\_Dummy = Tsp*(Nq + Nq*K)+ Tprocess*(Nq+Nq*K)}\] (7)
* This approach will affect the accuracy of the results because of its effect on the total Nq and because the service provider stores the wrong data about all the users. * The Dummy approach is not effective with the use of the cache, as the hit rate in cache H (Equation (5)) will inevitably be lower than that if only real queries are stored in the cache, based on the hypothesis proven in [31] that users in a particular region usually send similar queries. * This approach does not require the user to trust any party, including Peer, Fog, or SP. * This approach does not protect data security and is only concerned with data privacy. #### 4.2.2 Obfuscation Approach--Results

* The level of privacy is related to the size of the obfuscation zone SO, but it also will not reach Max (E) because the user is inside the zone, that is, there is a part of the zone data associated with the user, and this part will reach the attacker.