# A Blockchain-Based Secure Inter-Hospital EMR Sharing System
## 4 Security Analysis
### Communication Cost  
The following table, Table 3, shows the communication cost of the proposed scheme.  
The communication efficiency of our proposed system during the transaction process of each phase is also analyzed in Table 3. It is assumed that an elliptic curve modular operation requires 160 bits, an Advanced Encryption Standard (AES) operation requires 256 bits, a hash operation requires 160 bits, and a signature operation requires 1024 bits, while other messages, like id, pid, and a random number, require 80 bits. Taking the inter-hospital authentication and communication phase, for example, it requires eight elliptic curve modular messages, four AES messages, two signature operation messages, and eight other messages. Thus, it requires \(160\times 8+160\times 4+256\times 4+1024\times 2+80\times 8=5632\) bits in total. The maximum transmission speed is 14 Mbps in a 3.5 G environment. The inter-hospital authentication and communication phase is also considered in this study, which only takes 0.402 ms to  
\begin{table}
\begin{tabular}{l c c c c} \hline \hline
**Phase** & **Party** & **Blockchain Center** & **Hospital A** & **Hospital B** & **Patient** \\ \hline Patient Registration Phase & \(2T_{Mul}+1T_{H}\) & N/A & N/A & \(2T_{Mul}+1T_{H}\) \\ Hospital A Registration Phase & \(2T_{Mul}+1T_{H}\) & \(2T_{Mul}+1T_{H}\) & N/A & N/A \\ Hospital B Registration Phase & \(2T_{Mul}+1T_{H}\) & N/A & \(2T_{Mul}+1T_{H}\) & N/A \\  & & & \(+1T_{Cmp}\) & \(+1T_{Cmp}\) \\ Initial Treatment Authentication and Communication Phase & N/A & \(+1T_{Cmp}+2T_{Enc}\) & N/A & \(+2T_{Cmp}+2T_{Enc}\) \\  & & \(+1T_{Sig}\) & & \(+1T_{Sig}\) \\ Inter-Hospital Authentication and Communication Phase & N/A & \(5T_{Mul}+4T_{H}\) & \(10T_{Mul}+8T_{H}\) & \(5T_{Mul}+4T_{H}\) \\  & & \(+1T_{Cmp}+2T_{Enc}\) & \(+3T_{Cmp}+4T_{Enc}\) & \(+2T_{Cmp}+2T_{Enc}\) \\  & & \(+1T_{Sig}\) & \(+2T_{Sig}\) & \(+1T_{Sig}\) \\ \hline \(T_{Mul}\): Multiplication operation, \(T_{H:}\) hash function operation, \(T_{Cmp}\): comparison of operation, \(T_{Enc:}\) symmetric encryption operation, \(T_{Sig:}\) signature operation. & & \\ \hline \end{tabular}
\end{table}
Table 2: The computation costs of the proposed scheme.  
\begin{table}
\begin{tabular}{l c c c c c} \hline \hline
**Phase** & **Item** & **Message Length** & **Round** & **3.5G (14 Mbps)** & **4G (100 Mbps)** & **5G (20 Gbps)** \\ \hline Patient Registration Phase & 2528 bits & 2 & 0.181 ms & 0.025 ms & 0.126 us \\ Hospital A Registration Phase & 2528 bits & 2 & 0.181 ms & 0.025 ms & 0.126 us \\ Hospital B Registration Phase & 2528 bits & 2 & 0.181 ms & 0.025 ms & 0.126 us \\ Initial Treatment Authentication and Communication Phase & 2816 bits & 4 & 0.201 ms & 0.028 ms & 0.141 us \\ Inter-Hospital Authentication and Communication Phase & 5632 bits & 8 & 0.402 ms & 0.056 ms & 0.282 us \\ \hline \end{tabular}
\end{table}
Table 3: Communication cost of the proposed scheme.  
transfer all messages. The maximum transmission speed is 100 Mbps in a 4G environment, and thus the transmission time is reduced to 0.056 ms to transfer all messages. In a 5G environment [52], with a maximum transmission speed of 20 Gbps, the transmission time is only 0.282 us.