# A New Blockchain-Based Multi-Level Location Secure Sharing Scheme
## 4 Our Proposed Scheme
### Our Proposed Scheme
#### 4.2.2 Location Record
The provider hopes that data can be shared within the scope of their permission so that privacy can be fully protected, while the requester hopes to verify the authenticity and integrity of the data received. Multi-level location privacy protection is implemented in our proposed scheme. _Fnode_ sends virtual location data with different accuracy to \(LD\) with different access levels. \(LD\) cannot illegally obtain location information with higher accuracy. The virtual location data cannot be used to infer the location of \(LP\), so that _Fnode_ knows nothing about \(LP\)'s location. Further, because of the key update method, as shown in line 6 of Algorithm 5, our proposed scheme has forward security, and the new \(LD\) cannot grasp \(LP\)'s historical location information. The integrity and authenticity of location data can be verified in our proposed scheme. Because of hash function's collision resistance, \(LD\) uses hash value and the root node of the Merkle tree to verify the integrity of location data, as shown in lines 15-23 of Algorithm 4. _Fnode_ verifies the authenticity of virtual location data for \(LD\) as shown in lines 12-16 of Algorithm 3. The incentive and punishment mechanism is used to drive users work honestly. ### Robust

Only a robust location-sharing scheme can be used in some complex environments, such as medical care, epidemic prevention, IoT device management, etc. We demonstrate that our proposed scheme is robust in two aspects. (1) The robustness of our scheme depends on the robustness of blockchain technology, which is essentially based on the robustness of the consensus mechanism. We choose the common consensus mechanism, POW, which is secure when more than 50% of computation power is held in honest nodes. (2) In our proposed scheme, within the valid time of the license recorded in the blockchain, \(LD\) can obtain the virtual location data and the secret key for location updates from _Fnode_ and the \(LD\), respectively, that obtained the key, even if the \(LP\) is offline. In BMPLS, if \(LP\) is offline for some reason, no \(LD\) can obtain \(LP\)'s location information although its identity is legal, which is unacceptable in some complex environments. ### Immutability

Each block in the blockchain, except the genesis block, has a hash pointer that points to the previous block. When there is any change in the parent block, its hash value will change, which forces the \"parent block hash value\" of the child block to change, resulting in a change in the child block and its hash value. When we use POW as the consensus mechanism, the adversaries need to control at least 51% of the computation power to be able to tamper with the blockchain, the probability of which is negligible. Therefore, the data recorded on the blockchain cannot be tampered with. ### Confidentiality

\(LP\) records \(Record_{LP}\) and \(Udrec_{LD}^{p}\) into the blockchain. \(Record_{LP}\) contains the root node of \(VerMer\) and the hash value of the secret key \(k_{ud}^{1}\). \(Udrec_{LD}^{p}\) contains the ciphertext \(VE\) and the hash value of the secret key \(k_{ud}^{p}\). First, due to the hash function's hiding property, the hash values can not reveal any information. Second, as long as the secret key is kept secret, \(VE\) cannot be decrypted by the adversaries. Therefore, although the blockchain is open to all users in the network, adversaries cannot recover \(LP\)'s location data from the blockchain. ### Decentralization

In the blockchain network, no node is in the central position or has full control and management authority over the blockchain. All nodes store the same blockchain data, which can be freely accessed by users. In addition, we use a smart contract to implement the decentralization of the access control process. ### Low Computing Cost

\(L\)Ps that provide location data are often mobile phones or IoT devices that do not have strong computing power. Therefore, the computation overhead in the location sharing scheme must be low.