# Blockchain of Resource-Efficient Anonymity Protection with Watermarking for IoT Big Data Market

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Related Works

^{2}) and the quality of decision (QoD) in respective online and offline IoT big data usually have bounded-error tolerance in a real IoT system, the previous research proposed the LBE-RLE (layered bounded-error run-length-encoding) compression scheme [12], as illustrated in Figure 2, for online sensor data to reduce the power consumption of IoT communication to extend the IoT system lifetime.

_{low}= 1), in the 32 samples of a temperature data stream in the black curve, this heuristic LBE-RLE lossless compression scheme transforms the original data stream <14.6, 14.3, 14.1, 14, 13.9, 13.8, 13.9, 14.1, 14.7, 16.6, 18.4 20.1, 21, 21.3, 21.2, 20.5, 19.4, 18.3, 17.7, 17.1, 16.6, 16, 15.8, 15.7, 15.5, 15.6, 15.4, 15.1,15.4, 15, 14.9, 15.8> into orange line segments of the run-length sequence <[13.7, 9], [17.4, 2], [20.3, 6], [17.3, 4], [15, 11]> starting at the lower-bound value of 13.7 (i.e., 14.6 − τ

_{low}+ 0.1) with much better compression performance for resource-efficient transmission and storage of bounded-error-pruned (BEP) IoT temporal data without jeopardizing IoT application’s QoS

^{2}/QoD.

^{2}/QoD requirements in their own IoT applications. The previous work [4] proposed the above-mentioned BIoTCM framework for owners and consumers on an Ethereum blockchain network to have preliminary privacy protection for their BEP data with different market values. As shown in Figure 2, the BEP data stream with a higher-bounded-error (i.e., ${\tau}_{high}$) usually preserves a lower price or is even free of charge in the proposed BIoTCM. That is to say, the BEP data stream with the lower-bounded-error ${\tau}_{high}$ usually has a higher price for consumers, because its stream values are much closer to the original data stream (i.e., the black curve). Through the BIoTCM Ethereum smart contract [13], the owner’s original data stream and its BEP data stream with different bounded-errors are transferred to the reliable IPFS (interplanetary file system [14]). The files on the P2P IPFS file system preserve unique hash values for different file contents [15]. Thus, these hash values can be used to retrieve these corresponding files respectively for content integrity. Meanwhile, BIoTCM can simply protect the privacy of different groups of consumers requesting the different BEP data streams with different BE resolutions in the owner’s original data. For further privacy protection between consumers requesting the same BEP data stream, BIoTCM stores the different PKI-encrypted files in LBE-RLE compression for different consumers requesting the same BEP data streams.

## 3. System Architecture and Proposed Scheme

#### 3.1. Preliminaries for Resource Efficiency in BEP IoT Big Data

_{sensor}(n) as defined in Equation (1). In Equation (2), the BEP data stream ${D}_{LBE}\left(\tau \right)$, which has sequences of the same data values by the assigned bounded-error of τ, can be further represented as ${D}_{LBE-RLE}\left(\tau \right)$ for LBE-RLE lossless compression as shown in Equation (3). The RLE subsequence of $\left[{\tilde{d}}_{i}^{\tau},{r}_{i}\right]$ with ${r}_{i}$ repeated data value ${\tilde{d}}_{i}^{\tau}$ is defined in Equation (4). However, the RLE subsequence $\left[{\tilde{d}}_{i}^{\tau},1\right]$ (i.e., ${r}_{i}$ = 1) is usually encoded as ${\tilde{d}}_{i}^{\tau}$ without coding the run-length of 1 as defined in Equation (5).

^{2}/QoD requirements in diversified IoT applications.

#### 3.2. System Architecture for IoT Big Data Market Using Ethereum Blockchain

#### 3.3. Resource-Efficient Anonymity Protection with Watermark (RAPW) Scheme

_{i}as shown in Equation (12). The sub-stream S

_{i}is then defined in Equation (13). Each owner’s watermark of its ownership can be encoded to an integer stream W(l) of l integers, which is less than 20 or 10, as shown in Equations (14) and (15) for bounded errors of $\tau =1$ and $\tau =0.5$, respectively.

Algorithm 1. RAPW-RLE algorithm for a IoT data sub-stream with single watermark integer ${w}_{k}$. |

**Input**:- bounded-error
**τ**, sub-stream**S**of IoT big data, integer digit_{i}**w**of watermark {w_{j}_{1}, w_{2},…, w_{l}, w_{delimiter}}
Output: RLE sub-stream ${\mathit{S}}_{\mathit{i}}^{\mathit{R}\mathit{A}\mathit{P}\mathit{W}\mathbf{-}\mathit{R}\mathit{L}\mathit{E}}$ for τ and w_{j}1: n = S.dataSize_{i}2: upperbound_S _{i}[1:n].data = S[1:n].data + _{i}τ3: lowerbound_S _{i}[1:n].data = S[1:n].data − _{i}τ4: Startindex = 1 5: Endindex = n 6: runLength = 1 7: while ( Startindex < n + 1)8: startingData = lowerbound_S _{i}[Startindex].data + w $\times 0.1$_{j}9: while (Endindex > Startindex)10: if (startingData > upperbound_S_{i}[Endindex].data) or(startingData < lowerbound_ S _{i}[Endindex].data))11: runLength = 1 12: else 13: runLength ++ 14: end if15: Endindex-- 16: end while19: ${\mathit{S}}_{\mathit{i}}^{\mathit{R}\mathit{A}\mathit{P}\mathit{W}\mathbf{-}\mathit{R}\mathit{L}\mathit{E}}$.append(startingData) 17: if (runLength > 1)18: ${\mathit{S}}_{\mathit{i}}^{\mathit{R}\mathit{A}\mathit{P}\mathit{W}\mathbf{-}\mathit{R}\mathit{L}\mathit{E}}$.append(runLength) 20: Startindex = Startindex + runLength 21: end while |

Algorithm 2. RAPW-BEP algorithm for IoT data stream with watermark integer string. |

**Input**:- bounded-error
**τ**, IoT big data stream ${D}_{Bigdata}$, maximum size**sizeMax**for sub-stream of ${D}_{Bigdata}$, owner’s watermark**W[**1:l + 1**]**= {w_{1}, w_{2},…, w_{l}, w_{delimiter}}
Output: RAPW-RLE data stream ${D}_{RAPW-RLE}$ with watermark W(l)1: N = ${D}_{Bigdata}$.dataSize 2: sizeRemained = N 3: I = j = 1 4: while (sizeRemained $>$ sizeMax)5: S _{i}.data = ${D}_{Bigdata}$[(i − 1) $\times $ sizeMax + 1:i$\times $sizeMax]6: S _{i}.dataSize = sizeMax7: w _{j} = W[j]8: ${D}_{RAPW-RLE}$.append( RAPW-RLE(τ, S_{i}, w_{j})) /* in Algorithm 1 */9: j = j + 1 10: I = I + 1 11: if (j $\ge $ l + 1) /* l is defined in W[1:l] in Equation (14) or (15) */12: j = 1 13: end if14: sizeRemained = sizeRemained $\u2013$ sizeMax 15: end while16: S _{i}.data = ${D}_{Bigdata}$[(i − 1)$\times $sizeMax + 1: (i − 1)$\times $sizeMax + sizeRemained]17: S _{i}.dataSize = sizeRemained18: w _{j} = W[j]19: ${D}_{RAPW-RLE}$.append( RAPW-RLE(τ, S_{i}, w_{j}) ) /* in Algorithm 1 */ |

Algorithm 3. RAPW-ReadWM algorithm for reading watermark from a RAPW-BEP data stream. |

**Input**:- bounded-error
**τ**, RAPW-LBE data stream ${\mathit{D}}_{RAPW-BEP}$, original stream ${D}_{Bigdata}$, maximum size**sizeMax**of sub-stream, watermark robustness threshold**wrThreshold**
Output: Watermark W[]1: N = ${\mathit{D}}_{RAPW-BEP}$.dataSize 2: sizeRemained = N 3: I = k = i = j = 1 4. countofDelimiter = 0 5. lowerboundData[:] = ${D}_{Bigdata}$ [:] $-$ τ6. countofWK[0:lMAX] = 0 /* clear counts of all possible w _{k} */ 7: while (sizeRemained $>$ sizeMax)8: w _{k} = (${D}_{RAPW-LBE}$[I].d.staringPoint $\u2013$lowerboundData[j])/0.1 _{i}9: countofWK[w _{k}]= countofWK[w_{k}] + 1 /* count occurrence of w_{k} */10: if (w_{k} = ${w}_{delimiter}$) 11: k = 1 12: countofDelimiter ++ 13: if (countofDelimiter = 2)14: return W[] /* confirm the watermark integer list */15: end if16: end if17: j = j + ${\mathit{D}}_{\mathit{R}\mathit{A}\mathit{P}\mathit{W}-\mathit{L}\mathit{B}\mathit{E}}$[I]. d.runLength_{i}18: i = i + 1 19: if (j > sizeMax)20: I++ /* jump to new sub-stream as defined in Equation (9) */ 21: MaxcntInx = index of maximum count in CountofWK[] 22: Othercnt = total of CountofWK[] except index of MaxcntInx 23: if( Othercnt $\le $ wrThreshold)24: W[k] = MaxcntInx 25: k = k + 1 26: else27: return NIL /* return no watermark and exit*/ 28: end if29: sizeRemained = sizeRemained $-$ sizeMax30: i = j = 1 /* first data in new sub-stream */ 31: countofWK[0:lMAX] = 0 /*clear counts of all possible w _{k} */ 32: end if33: end while34: /* check the remained sub-stream if meeting the conditions of step 13 to 15 in while loop, otherwise return no watermark and exit */ |

## 4. Experiments and Evaluations

#### 4.1. Preliminary Experiments for IoT Data Owners and Consumers

#### 4.2. Examine for RAPW-BEP IoT Data Streams with Different Settings

#### 4.3. Overall Performance Evaluation with Watermarking Robustness

## 5. Conclusions and Future Work

## Author Contributions

## Funding

## Acknowledgments

## Conflicts of Interest

## References

- Garrido, G.M.; Sedlmeir, J.; Uludağ, Ö.; Alaoui, I.S.; Luckow, A.; Matthes, F. Revealing the landscape of privacy-enhancing technologies in the context of data markets for the IoT: A systematic literature review. J. Netw. Comput. Appl.
**2022**, 207, 103465. [Google Scholar] [CrossRef] - Manzoor, A.; Braeken, A.; Kanhere, S.S.; Ylianttila, M.; Liyanage, M. Proxy re-encryption enabled secure and anonymous IoT data sharing platform based on blockchain. J. Netw. Comput. Appl.
**2021**, 176, 102917. [Google Scholar] [CrossRef] - General Data Protection Regulation (GDPR). Available online: https://gdpr-info.eu (accessed on 21 December 2021).
- Chang, R.-I.; Wei, L.-C.; Wang, C.-H.; Tseng, Y.-K. Blockchain for bounded-error-pruned content protection. ICT Express
**2021**, 7, 295–299. [Google Scholar] [CrossRef] - Furon, T. A Constructive and Unifying Framework for Zero-Bit Watermarking. IEEE Trans. Inf. Forensics Secur.
**2007**, 2, 149–163. [Google Scholar] [CrossRef] - Gourrame, K.; Douzi, H.; Harba, R.; Riad, R.; Ros, F.; Amar, M.; Elhajji, M. A zero-bit Fourier image watermarking for print-cam process. Multimed. Tools Appl.
**2019**, 78, 2621–2638. [Google Scholar] [CrossRef] - Roček, A.; Javorník, M.; Slavíček, K.; Dostál, O. Zero Watermarking: Critical Analysis of Its Role in Current Medical Imaging. J. Digit. Imaging
**2021**, 34, 204–211. [Google Scholar] [CrossRef] [PubMed] - Oliva, G.A.; Hassan, A.E.; Jiang, Z.M. An exploratory study of smart contracts in the Ethereum blockchain platform. Empir. Softw. Eng.
**2020**, 25, 1864–1904. [Google Scholar] [CrossRef] - Azar, J.; Makhoul, A.; Barhamgi, M.; Couturier, R. An energy efficient IoT data compression approach for edge machine learning. Future Gener. Comput. Syst.
**2019**, 96, 168–175. [Google Scholar] [CrossRef] - Marcelloni, F.; Vecchio, M. Enabling energy-efficient and lossy-aware data compression in wireless sensor networks by multi-objective evolutionary optimization. Inf. Sci.
**2010**, 180, 1924–1941. [Google Scholar] [CrossRef] - Liu, Y.; Di, S.; Zhao, K.; Jin, S.; Wang, C.; Chard, K.; Tao, D.; Foster, I.; Cappello, F. Optimizing Error-Bounded Lossy Compression for Scientific Data with Diverse Constraints. IEEE Trans. Parallel Distrib. Syst.
**2022**, 33, 4440–4457. [Google Scholar] [CrossRef] - Chang, R.-I.; Chu, Y.-H.; Wei, L.-C.; Wang, C.-H. Bounded-Error-Pruned Sensor Data Compression for Energy-Efficient IoT of Environmental Intelligence. Appl. Sci.
**2020**, 10, 6512. [Google Scholar] [CrossRef] - Zheng, Z.; Xie, S.; Dai, H.N.; Chen, W.; Chen, X.; Weng, J.; Imran, M. An overview on smart contracts: Challenges, advances and platforms. Future Gener. Comput. Syst.
**2020**, 105, 475–491. [Google Scholar] [CrossRef] - Benet, J. Ipfs-content addressed, versioned, p2p file system. arXiv
**2014**, arXiv:1407.3561. [Google Scholar] - Ali, M.S.; Dolui, K.; Antonelli, F. IoT data privacy via blockchains and IPFS. In Proceedings of the Seventh International Conference on the Internet of Things, Linz, Austria, 22–25 October 2017; pp. 1–7. [Google Scholar]
- Radanliev, P.; De Roure, D.; Walton, R.; Van Kleek, M.; Montalvo, R.M.; Maddox, L.; Santos, O.; Burnap, P.; Anthi, E. Artificial intelligence and machine learning in dynamic cyber risk analytics at the edge. SN Appl. Sci.
**2020**, 2, 1773. [Google Scholar] [CrossRef] - Wazirali, R.; Ahmad, R.; Al-Amayreh, A.; Al-Madi, M.; Khalifeh, A. Secure Watermarking Schemes and Their Approaches in the IoT Technology: An Overview. Electronics
**2021**, 10, 1744. [Google Scholar] [CrossRef] - Buterin, V. A Next-generation Smart Contract and Decentralized Application Platform. Ethereum White Pap.
**2017**, 3, 1–2. [Google Scholar] - Li, Z.N.; Drew, M.S.; Liu, J. Fundamentals of Multimedia; Pearson Prentice Hall: Upper Saddle River, NJ, USA, 2004. [Google Scholar]
- Chang, R.-I.; Tsai, J.-H.; Wang, C.-H. Edge Computing of Online Bounded-Error Query for Energy-Efficient IoT Sensors. Sensors
**2022**, 22, 4799. [Google Scholar] [CrossRef] - An Underwater Temperature Dataset from Coastal Islands in Brazil. Available online: https://www.kaggle.com/datasets/shivamb/underwater-surface-temperature-dataset (accessed on 29 July 2022).
- UV Index Data Collected Local to West London (Heathrow and Northolt). Available online: https://www.kaggle.com/datasets/t5ra190/uv-index-dataset-local-to-west-london (accessed on 29 July 2022).
- COVID-19 Data Repository. Available online: https://github.com/CSSEGISandData/COVID-19 (accessed on 29 July 2022).
- Li, Q.; Memon, N. Security models of digital watermarking. In International Workshop on Multimedia Content Analysis and Mining; Springer: Berlin/Heidelberg, Germany, 2007. [Google Scholar]

**Figure 2.**A temperature sub-stream using LBE-RLE compression for resource-efficient IoT data [4].

**Table 1.**Extraction results of random watermarks for four different datasets with different settings.

Watermark Length, Sub-Stream Size/Dataset | WL = 4, SS = 16 | WL = 8, SS = 16 | WL = 12, SS = 16 | WL = 4, SS = 32 | WL = 8, SS = 32 | WL = 12, SS = 32 | WL = 4, SS = 48 | WL = 8, SS = 48 | WL = 12, SS = 48 |
---|---|---|---|---|---|---|---|---|---|

Temperature (BE = 1.0) | ok | ok | ok | ok | ok | ok | ok | ok | Incomp. |

UV Index (BE = 1.0) | ok | ok | ok | ok | ok | ok | ok | ok | Incomp. |

COVID Confirm (BE = 1.0) | ok | ok | ok | ok | ok | ok | ok | ok | Incomp. |

COVID Death (BE = 1.0) | ok | ok | ok | ok | ok | ok | ok | ok | Incomp. |

Temperature (BE = 0.5) | ok | ok | ok | ok | ok | ok | ok | ok | Incomp. |

UV Index (BE = 0.5) | ok | ok | ok | ok | ok | ok | ok | ok | Incomp. |

COVID Confirm (BE = 0.5) | ok | ok | ok | ok | ok | ok | ok | ok | Incomp. |

COVID Death (BE = 0.5) | ok | ok | ok | ok | ok | ok | ok | ok | Incomp. |

Tampered Ratio/Dataset | 1% | 2% | 10% | 20% |
---|---|---|---|---|

Temperature | 83% | 77% | 56% | 30% |

UV index | 83% | 78% | 50% | 28% |

COVID confirmed cases | 63% | 58% | 32% | 21% |

COVID death | 83% | 76% | 41% | 14% |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Wang, C.-H.; Hsu, C.-H.
Blockchain of Resource-Efficient Anonymity Protection with Watermarking for IoT Big Data Market. *Cryptography* **2022**, *6*, 49.
https://doi.org/10.3390/cryptography6040049

**AMA Style**

Wang C-H, Hsu C-H.
Blockchain of Resource-Efficient Anonymity Protection with Watermarking for IoT Big Data Market. *Cryptography*. 2022; 6(4):49.
https://doi.org/10.3390/cryptography6040049

**Chicago/Turabian Style**

Wang, Chia-Hui, and Chih-Hao Hsu.
2022. "Blockchain of Resource-Efficient Anonymity Protection with Watermarking for IoT Big Data Market" *Cryptography* 6, no. 4: 49.
https://doi.org/10.3390/cryptography6040049