# A Security-Enhanced Query Result Verification Scheme for Outsourced Data in Location-Based Services
## 5 Security Analysis
### Security of Verification Objects  
The purpose of the scheme containing the fog node verification object and the description file verification object proposed in this paper is the same as [9]; once the verification objects are constructed, for security's sake, they reveal nothing about the characteristics of the fog node or the contents of the description files. That is to say, both the outside eavesdroppers and the inside data 'leakers' can hardly acquire useful information from the verification objects. To reach such a goal, the proposed scheme focuses on two aspects: the meaninglessness of the verification objects themselves and the indistinguishability of the verification objects from each other. According to Section 4.2, the fog node verification object consists of \(m\) bits with binary numbers and the description file verification objects consist of \(n\) counters with natural numbers. Due to the security of the hash function mapping process (i.e., the secrecy of the hash function), an attacker cannot obtain information related to the data itself from these sequences of numbers. Therefore, the verification objects themselves are meaningless. It is clear to see that guaranteeing the indistinguishability of verification objects means that their sizes and formats cannot be distinguished. The improved construction process mentioned in Section 4.2 set the length of the fog node verification object to \(m\) and the description file verification objects to \(n\), solving the size problem. Inserting indistinguishable elements into the counters of the Bloom filter can further guarantee the indistinguishability of the inserted elements. In Algorithm 1, we used the pseudo-random function to guarantee the indistinguishability of the inserted elements. Before proving the security of the verification objects, the definition of the pseudo-random function is given first. ```
0:\(h^{\delta_{o}}\), \(h^{u}\), ChainGroup \(STORAGE\)
0: The consistency of \(c(ds)_{\omega}\)
1:\(chain\leftarrow ChainFactory.openChain(STORAGE)\);
2:\(table\leftarrow Chain.EQ(chain,num)\);
3:\(list[\:]\leftarrow table.Entry(time)\);
4: Store \(h^{\delta_{o}}\) sent from \(g_{o}\);
5: Store \(h^{u}\) sent from the user;
6:if\(h^{\delta_{o}}\) is equal to \(h^{u}\)then
7: The query result is consistent;
8:else
9: May be something wrong with network problems;
10: return
11:endif
```  
**Algorithm 5** The security of the SEQRVS scheme. **Definition 3**: _For a probabilistic polynomial time distinguisher \(\mathcal{D}\) with the advantage to distinguish \(F_{k}(x)\) from a string \(r\) of length \(s\), where \(F:\{0,1\}^{*}\times\{0,1\}^{*}\rightarrow\{0,1\}^{S}\) is a keyed function,\(x\in\{0,1\}^{*}\) is a random length string and \(k\in\{0,1\}^{\tau}\) and \(r\) are chosen uniformly and randomly from \(\{0,1\}^{S}\). This advantage can be defined as_  
\[Adv_{D}^{F}=|Pr[\mathcal{D}(r)=1]-Pr[\mathcal{D}(F_{k}(x))=1]|. \tag{12}\]  
Definition 3 means that no polynomial time algorithm can distinguish the output of a pseudo-random function from the output of a real random function [26]. If \(F\) is a pseudo-random function, then the advantage \(Adv_{D}^{F}\) is negligible under the randomly chosen key \(k\) from \(\{0,1\}^{\tau}\). The formal security proof is given as follows. If \(prf\) is a pseudo-random function, then the fog node and description file verification objects are semantically secure and achieve indistinguishability in the random oracle model. For \((\widehat{Game1})\) and \((\widehat{Game2})\) given in Section 3.3, we define that adversary \(\mathcal{A}\) has a non-negligible advantage \(\epsilon(\epsilon<1)\) to win these two games. In the meantime, a distinguisher \(\mathcal{D}\) with a non-negligible advantage to distinguish the output between the pseudo-random function and the real random function can be constructed by \(\mathcal{A}\).