## 3 Method
### Payment Verification and Browsing Phase  
#### 3.6.1 Case 1: Direct Authorization  
After the Licensee is paid, the bank must sign and issue the payment certificate to verify. The CA then authenticates the Licensee's identity and bank payment certificate. After that, the CA generates the authorized key, making time-sensitive tokens. After authorization, the Licensee's application (reader or player) can use the authorized key to automatically decrypt the symmetry key. The APP can browse digital content normally. We present the flowchart of the payment verification and browsing phase for direct authorization in Figure 11.  
\(\bullet\) Step 1: The Licensee generates a random value \(k_{L-C}\), calculates:  
\[z_{L-C}=h(ID_{L},M_{L-C},Cert_{L},TID,Cert_{pay},TS_{L-C},ID_{BC}), \tag{80}\]  
\[(x_{L-C},y_{L-C})=k_{L-C}G, \tag{81}\]  
\[r_{L-C}=x_{L-C}{\rm mod}n, \tag{82}\]  
\[s_{L-C}=k_{L-C}{}^{-1}(z_{L-C}+r_{L-C}d_{L}){\rm mod}n, \tag{83}\]  
\[Enc_{L-C}=E_{PK_{C}}(ID_{L},M_{L-C},Cert_{L},TID,Cert_{pay},TS_{L-C},ID_{BC}), \tag{84}\]  
and sends \(ID_{L},Enc_{L-C},(r_{L-C},s_{L-C})\) to the content administrator. \(\bullet\) Step 2: The CA first calculates:  
\[(ID_{L},M_{L-C},Cert_{L},TID,Cert_{pay},TS_{L-C},ID_{BC})=D_{SK_{C}}(Enc_{L-C}), \tag{85}\]  
uses  
\[TS_{NOW}-TS_{L-C}\leq\Delta T \tag{86}\]  
to confirm whether the timestamp is valid, it verifies \(Cert_{L}\) with \(PK_{L}\) and \(Cert_{pay}\) with \(PK_{BANK}\), verifies the correctness of the ECDSA signature, and then calculates:  
\[z_{L-C}{}^{\prime}=h(ID_{L},M_{L-C},Cert_{L},TID,Cert_{pay},TS_{L-C},ID_{BC}), \tag{87}\]  
\[u_{L-C1}=z_{L-C}{}^{\prime}s_{L-C}{}^{-1}{\rm mod}n, \tag{88}\]\[z_{L-C}=h(ID_{L},M_{L-C},Cert_{L},TID,Cert_{pay},TS_{L-C},ID_{BC}), \tag{80}\]0 \[z_{L-C}=h(ID_{L},M_{L-C},Cert_{L},TID,Cert_{pay},TS_{L-C},ID_{BC}), \tag{80}\]1 (90) \[z_{L-C}=h(ID_{L},M_{L-C},Cert_{L},TID,Cert_{pay},TS_{L-C},ID_{BC}), \tag{80}\]2  
\[z_{L-C}=h(ID_{L},M_{L-C},Cert_{L},TID,Cert_{pay},TS_{L-C},ID_{BC}), \tag{80}\]3 Payment verification and browsing phase (direct authorization). If the verification is passed, the content administrator will get the relevant payment information and trigger the smart contracts lcins and lcchk. The content is as follows (Scheme 9):  
\begin{tabular}{|p{142.3 pt}|} \hline function insert smart contract lcins( \\ string lc\_id, string lc\_detail, string lc\_tsp) \{ \\ count ++; \\ lc[count].id = id; \\ lc[count].detail = detail; \\ lc[count].payment = payment; \\ lc[count].tsp = tsp; \\ \} \\ sign string l\_key (lc\_id, lc\_detail, lc\_payment, lc\_tsp); \\ \hline \end{tabular  
\[z_{L-C}=h(ID_{L},M_{L-C},Cert_{L},TID,Cert_{pay},TS_{L-C},ID_{BC}), \tag{80}\]4 \[z_{L-C}=h(ID_{L},M_{L-C},Cert_{L},TID,Cert_{pay},TS_{L-C},ID_{BC}), \tag{80}\]5  
If the verification is passed, the payment information is confirmed by the content administrator, and the smart contracts clins and clchk will be sent. The content is as follows (Scheme 10):  
\[ \begin{array}{|c|}\hline\text{function insert smart contract clins(}\\ \text{string cl\_id, string cl\_detail,}\\ \text{string cl\_key, string cl\_tsp)}\{\\ \text{count}++;\\ \text{cl}[\text{count}].\text{id}=\text{id};\\ \text{cl}[\text{count}].\text{detail}=\text{detail};\\ \text{cl}[\text{count}].\text{key}=\text{key};\\ \text{cl}[\text{count}].\text{tsp}=\text{tsp};\\ \text{sign string c\_key}\text{ (cl\_id, cl\_detail,}\\ \text{cl\_key, cl\_tsp)};\\ \hline\end{array} \]  
\[ \begin{array}{|c|}\hline\text{verify string c\_key}\text{ (cl\_id, cl\_detail,}\\ \text{cl\_key, cl\_tsp);}\\ \text{function check smart contract clchk(}\\ \text{string cl\_id, string cl\_detail,}\\ \text{string cl\_key, string cl\_tsp)}\{\\ \text{return cl\_id.exist;}\\ \text{return cl\_detail.exist;}\\ \text{return cl\_key.exist;}\\ \text{return cl\_tsp.exist;}\\ \hline\end{array} \]  
**Scheme 10. ** The smart contracts clins and clchk. The Licensee calculates:  
\[BC_{\text{C}-L} =h(r_{\text{C}-L},s_{\text{C}-L}), \tag{108}\]  
\[(ID_{\text{BC}},BC_{\text{C}-L})\] will also be uploaded to the blockchain center.