# Blockchain and Smart Contracts for Digital Copyright Protection
## 5 Proposed Protocol
### Protection Protocol

Table 1: Symbols used in the protocol. \"secret\" block. Then, \(SBlock\) is sent to \(\mathcal{CP}\) and \(\mathcal{B}\) in the messages \(m_{4}\) and \(m_{5}\), respectively. \(\mathcal{BC}\) uses \(SBlock\) to run the subsequent smart contract \(sm_{p}\), which verifies the outcome of the ongoing transaction and, if all data match, publishes a new node in the blockchain \(\mathcal{BC}\). Furthermore, \(m_{4}\) communicates \(pk^{X}\) and \(\mathbb{E}_{pk^{X}}(N)\) to \(\mathcal{CP}\), thus enabling the watermark embedding into \(X\). \(\mathcal{CP}\) receives \(m_{4}\) and generates the watermark \(W_{\mathcal{CP}}\) as a fingerprinting binary code composed of an anti-collusion code [2] and an error-correcting code needed to cope with errors that may occur when watermarks are extracted from contents. \(W_{\mathcal{CP}}\) and \(X\) are then encrypted by \(\mathcal{CP}\) with \(pk^{X}\) applied to the same homomorphic cryptosystem used by \(\mathcal{BC}\) to encrypt \(N\), thus generating \(\mathbb{E}_{pk^{X}}(W_{\mathcal{CP}})\) and \(\mathbb{E}_{pk^{X}}(X)\). Then, by the formulas shown in Section 4, \(\mathcal{CP}\) can generate the encrypted watermark \(\mathbb{E}_{pk^{X}}(W)\) by simply concatenating \(\mathbb{E}_{pk^{X}}(W_{\mathcal{CP}})\) and \(\mathbb{E}_{pk^{X}}(N)\):  
\[\mathbb{E}_{pk^{X}}(W)\!=\!\mathbb{E}_{pk^{X}}(W_{\mathcal{CP}})\|\mathbb{E}_{ pk^{X}}(N)\!=\!\mathbb{E}_{pk^{X}}(W_{\mathcal{CP}}\|N) \tag{1}\]  
Since the protocol assumes a privacy homomorphic encryption scheme with respect to watermark insertion [37], \(\mathcal{CP}\) can embed the encrypted watermark \(\mathbb{E}_{pk^{X}}(W)\) directly into the encrypted content \(\mathbb{E}_{pk^{X}}(X)\):  
\[\overline{\mathbb{E}_{pk^{X}}(X)}=\mathbb{E}_{pk^{X}}(\tilde{X})=\mathbb{E}_{ pk^{X}}(X\oplus W)=\mathbb{E}_{pk^{X}}(X)\oplus\mathbb{E}_{pk^{X}}(W) \tag{2}\] \begin{table}
\begin{tabular}{l l} \hline \hline
**Entities and** & **Actions and Data** \\ \hline \(\mathcal{B}\) & : & browses the web site of \(\mathcal{CP}\) and picks the content \(X\) \\ \(\mathcal{B}\) & : & \(m_{1}=\{\text{request for }X\}\) \\ \(\mathcal{CP}\) & : & \(m_{2}=\{X_{d},T_{X}\}\) \\ \(\mathcal{B}\) & : & \(m_{3}=\{B_{id},X_{d},T_{X}\}\) \\ \(\mathcal{BC}\) & : & \(m_{3}=\{B_{id},X_{d},T_{X}\}\) \\ \(\mathcal{BC}\) & : & \(\Lambda_{sm_{s}}(m_{2},m_{3})\) \\ \(\mathcal{BC}\) & : & \(\mathbb{G}_{sm_{s}}(SBlock=[E_{kgc}(B_{id},X_{d},T_{X},pk^{X},sk^{X},N,\mathbb{E }_{pk^{X}}(N))])\) \\ \(\mathcal{BC}\) & : & \(m_{4}=\{X_{d},T_{X},pk^{X},\mathbb{E}_{pk^{X}}(N),SBlock\}\) \\ \(\mathcal{BC}\) & : & \(m_{5}=\{X_{d},T_{X},SBlock\}\) \\ \(\mathcal{BC}\) & : & \(\mathbb{EN}_{sm_{s}}\) \\ \(\mathcal{CP}\) & : & generates \(W_{\mathcal{CP}},\mathbb{E}_{pk^{X}}(W_{\mathcal{CP}}),\mathbb{E}_{pk^{X}}(X)\) \\ \(\mathcal{CP}\) & : & generates \(\mathbb{E}_{pk^{X}}(W)\!=\!\mathbb{E}_{pk^{X}}(W_{\mathcal{CP}})\|\mathbb{E}_{ pk^{X}}(N)\) \\ \(\mathcal{CP}\) & : & generates \(\mathbb{E}_{pk^{X}}(X)=\mathbb{E}_{pk^{X}}(X)\oplus\mathbb{E}_{pk^{X}}(W)\) \\ \(\mathcal{CP}\) & : & \(m_{6}=\{\overline{\mathbb{E}_{pk^{X}}(X)}\}\) \\ \(\mathcal{CP}\) & : & \(m_{7}=\{X_{d},T_{X},pk^{X},\mathbb{E}_{pk^{X}}(N),SBlock\}\) \\ \(\mathcal{B}\) & : & \(m_{8}=\{X_{d},T_{X},B_{id},SBlock\}\) \\ \(\mathcal{BC}\) & : & \(\Lambda_{sm_{p}}(m_{7},m_{8})\) \\ \(\mathcal{BC}\) & : & makes the payment and notifies \(\mathcal{CP}\) \\ \(\mathcal{BC}\) & : & \(\mathbb{G}_{sm_{p}}(PBlock=[X_{d},T_{X},SBlock])\) \\ \(\mathcal{BC}\) & : & publishes \(PBlock\) in the blockchain \\ \(\mathcal{BC}\) & : & \(m_{9}=\{sk^{X}\}\) \\ \(\mathcal{BC}\) & : & \(\mathbb{EN}_{sm_{s}}\) \\ \(\mathcal{CP}\) & : & inserts a new entry in its databases, including \(X_{d}\), \(T_{X}\), \(pk^{X}\), \(\mathbb{E}_{pk^{X}}(N)\), \\  & & and \(SBlock\) whose search key is \(W_{\mathcal{CP}}\) \\ \(\mathcal{B}\) & : & \(\mathcal{X}=\mathbb{D}_{sk^{X}}(\overline{\mathbb{E}_{pk^{X}}(X)})\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Protection protocol.