# Internet of Things and Blockchain Integration: Security, Privacy, Technical, and Design Challenges
## 3 RQ 1 and RQ 2--Current Challenges and Recommendations to Enhance BIoT Integration
### BC-Based Privacy
#### 3.2.2 Data Privacy  
One of the most important characteristics of BC technology is its immutability. As a result, it is critical to ensure that data, such as healthcare data, are correct [77; 165]. Although BC is considered everlasting storage, in reality, some cases decline this claim. For example, in 2014, some hackers were able to steal almost eight million Vericoins from the cryptocurrency exchange platform called MintPal [4]. Wallet apps are one source of vulnerabilities in Bitcoin that might expose transaction data. Ethereum's data and contracts are encoded but not encrypted.  
HLF devotes a significant chunk of its protocol to addressing security concerns such as preventing transactions from being connected to users, access control techniques, and digital signatures. However, not all of these functions have yet been implemented. Data in the public BC can be encrypted to improve privacy. Hawk keeps track of transactions that are encrypted [46]. The Hawk compiler is in charge of transforming programmers' generic code into cryptographic primitives that allow for transactional information anonymity. In addition to encryption, the Enigma project divides data into unidentifiable bits and distributes them over the network in such a manner that no node ever gets access. It stores data references in a decentralized off-chain distributed hash-table (DHT) (decentralized storage that searches for information using pairs of keys and each node is accountable for several keys) that is accessible via the BC [46]. Because private BCs must offer authentication and authorization procedures by definition, the challenge of data privacy can be addressed in different ways. In Ethereum, cryptography is used to limit the exposure of sensitive data and data segmentation to improve data privacy. Multichain has user permissions built in to limit perceptibility and set limits on allowed and miners.  
Another way to protect data privacy is to store sensitive information outside the BC (i.e., off-chain) [46]. Because it would be impossible to store significant amounts of data inside the BC, this method benefits systems that manage big volumes of data [26]. Furthermore, they are well suited to systems that handle extremely sensitive data and require stricter access controls, such as healthcare applications. In this method, the public BC can store newscaster data, allowing evidence of data integrity and time stamps to be provided. Users may examine the BC to verify data without authorities, and data are safely kept outside. These off-chain sources should not be a source of single-point failure and should be fault-tolerant [46; 118].  
Other approaches to improve data privacy include confidential transactions, homomorphic encryption, and BC segregation [10]. In confidential transactions, several solutions are available to implement this strategy on a BC platform (i.e., hiding data from unauthorized third parties while still allowing transactions to be completed) such as Besu (an Apache 2.0 licensed open-source enterprise Ethereum) in Hyperledger and Parity (open-source-based Ethereum application) in Ethereum. Homomorphic encryption might be used to transfer and conduct operations on data without disclosing their secret values, thus embodying the aforementioned concept of secret transactions in some way. In Ethereum and Quorum, privacy techniques based on homomorphic encryption are available. There is no common ledger with all transactions visible to all members in BC segregation; rather, just a portion of these transactions are accessible to all members [10]. As a result, unauthorized third parties are unable to learn of the presence of transactions that they should not be aware of. Several platforms, including HLF, EOSIO, Corda, and Hyperledger Iroha, provide privacy methods based on BC segregation. Only a preset and identifiable group of members share in a given communication in Corda, while the rest of the network is oblivious to the transaction [10].