# A Watermarking Protocol Based on Blockchain
## 5 Watermarking Protocol
### Protection Protocol
\begin{table}
\begin{tabular}{l l} \hline \hline \(\mathcal{B}\) & : visits the \(\mathcal{CP}\)’s web site and chooses the content \(X\) \\ \(\mathcal{B}\to\mathcal{CP}\) & : \(m_{1}=\{\text{request for }X\}\) \\ \(\mathcal{CP}\to\mathcal{RA}\) & : \(m_{2}=\{\text{request for security tokens}\}\) \\ \(\mathcal{RA}\to\mathcal{CP}\) & : \(m_{3}=\{pk^{X}_{\mathcal{RA}},\mathbb{E}_{pk^{X}_{\mathcal{RA}}}(N),\mathbb{S}_{ \mathcal{RA}}(pk^{X}_{\mathcal{RA}},\mathbb{E}_{pk^{X}_{\mathcal{RA}}}(N))\}\) \\ \(\mathcal{CP}\to\mathcal{B}\) & : \(m_{4}=\{X_{d},T_{X},pk^{X}_{\mathcal{RA}},\mathcal{S}_{\mathcal{RA}}(pk^{X}_{ \mathcal{RA}},\mathbb{E}_{pk^{X}_{\mathcal{RA}}}(N)),\) \\  & \(\mathbb{S}_{\mathcal{CP}}(X_{d},T_{X},pk^{X}_{\mathcal{RA}},\mathcal{S}_{ \mathcal{RA}}(pk^{X}_{\mathcal{RA}},\mathbb{E}_{pk^{X}_{\mathcal{RA}}}(N)))\}\) \\ \(\mathcal{CP}\) & : generates \(W_{\mathcal{CP}},\mathbb{E}_{pk^{X}_{\mathcal{RA}}}(W_{\mathcal{CP}}),\mathbb{E }_{pk^{X}_{\mathcal{RA}}}(X)\) \\ \(\mathcal{CP}\) & : generates \(\mathbb{E}_{pk^{X}_{\mathcal{RA}}}(W)=\mathbb{E}_{pk^{X}_{\mathcal{RA}}}(W_{ \mathcal{CP}})\mathbb{E}_{pk^{X}_{\mathcal{RA}}}(N)\) \\ \(\mathcal{CP}\) & : generates \(\mathbb{E}_{pk^{X}_{\mathcal{RA}}}(X)=\mathbb{E}_{pk^{X}_{\mathcal{RA}}}(X) \oplus\mathbb{E}_{pk^{X}_{\mathcal{RA}}}(W)\) \\ \(\mathcal{CP}\to\mathcal{B}\) & : \(m_{5}=\{\overline{\mathbb{E}_{pk^{X}_{\mathcal{RA}}}}(X)\}\) \\ \(\mathcal{CP}\to\mathcal{BC}\) & : \(m_{6}=\{X_{d},T_{X},pk^{X}_{\mathcal{RA}},\mathbb{E}_{pk^{X}_{\mathcal{RA}}}(N), \mathbb{S}_{\mathcal{RA}}(pk^{X}_{\mathcal{RA}},\mathbb{E}_{pk^{X}_{\mathcal{ RA}}}(N)),\) \\  & \(\mathbb{S}_{\mathcal{CP}}(X_{d},T_{X},pk^{X}_{\mathcal{RA}},\mathbb{E}_{pk^{X}_{ \mathcal{RA}}}(N),\mathbb{S}_{\mathcal{RA}}(pk^{X}_{\mathcal{RA}},\mathbb{E}_{pk^ {X}_{\mathcal{RA}}}(N)))\}\) \\ \(\mathcal{B}\to\mathcal{BC}\) & : \(m_{7}=\{X_{d},T_{X},pk^{X}_{\mathcal{RA}},\mathbb{S}_{\mathcal{RA}}(pk^{X}_{ \mathcal{RA}},\mathbb{E}_{pk^{X}_{\mathcal{RA}}}(N)),B_{id},B_{id}\}\) \\ \(\mathcal{BC}\) & : activates the smart contract \\ \(\mathcal{BC}\) & : compares the tokens and verifies the signatures included in \(m_{6}\) and \(m_{7}\) \\ \(\mathcal{BC}\) & : generates a node in the blockchain by which to publish \(X_{d}\), \(T_{X}\), \\  & \(pk^{X}_{\mathcal{RA}}\), \(\mathbb{E}_{pk^{X}_{\mathcal{RA}}}(N)\), \(\mathbb{S}_{\mathcal{RA}}(pk^{X}_{\mathcal{RA}},\mathbb{E}_{pk^{X}_{\mathcal{RA}} }(N))\), \\  & \(\mathbb{S}_{\mathcal{CP}}(X_{d},T_{X},pk^{X}_{\mathcal{RA}},\mathbb{E}_{pk^{X}_{ \mathcal{RA}}}(N),\mathbb{S}_{\mathcal{RA}}(pk^{X}_{\mathcal{RA}},\mathbb{E}_{pk^ {X}_{\mathcal{RA}}}(N)))\) \\ \(\mathcal{BC}\) & : implements the payment phase \\ \(\mathcal{BC}\to\mathcal{RA}\) & : \(m_{8}=\{B_{ad},pk^{X}_{\mathcal{RA}}\}\) \\ \(\mathcal{BC}\) & : \(\mathbb{E}_{pk_{\mathcal{RA}}}(B_{id},pk^{X}_{\mathcal{RA}},\mathbb{E}_{pk^{X}_{ \mathcal{RA}}}(N))\) \\ \(\mathcal{BC}\to\mathcal{CP}\) & : \(m_{9}=\{E_{pk_{\mathcal{RA}}}(B_{id},pk^{X}_{\mathcal{RA}},\mathbb{E}_{pk^{X}_{ \mathcal{RA}}}(N))\}\) \\ \(\mathcal{CP}\) & : saves a new entry in its databases composed of \(X_{d}\), \(T_{X}\), \(pk^{X}_{\mathcal{RA}}\), \(\mathbb{E}_{pk^{X}_{\mathcal{RA}}}(N)\), \\  & \(\mathbb{S}_{\mathcal{RA}}(pk^{X}_{\mathcal{RA}},\mathbb{E}_{pk^{X}_{\mathcal{RA}} }(N))\), and \(E_{pk_{\mathcal{RA}}}(B_{id},pk^{X}_{\mathcal{RA}},\mathbb{E}_{pk^{X}_{\mathcal{ RA}}}(N))\) \\  & whose search key is \(W_{\mathcal{CP}}\) \\ \(\mathcal{RA}\to\mathcal{B}\) & : \(m_{10}=\{sk^{X}_{\mathcal{RA}}\}\) \\ \(\mathcal{B}\) & : \(\bar{X}=\mathbb{D}_{sk^{X}_{\mathcal{RA}}}(\overline{\mathbb{E}_{pk^{X}_{ \mathcal{RA}}}(X)})\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Protection protocol. a timestamp that is referred to the ongoing transaction.