# Efficient and Secure EMR Storage and Sharing Scheme Based on Hyperledger Fabric and IPFS
## 6 Scheme Analysis
### Performance Analysis
#### 6.2.2 Time Overhead  
The symbols and explanations for the time overhead of the main operations in this scheme are as shown in Table 4, where \(t_{cdd}\), \(t_{qdd}\), \(t_{cud}\), \(t_{qud}\), \(t_{cai}\), \(t_{qai}\), and \(t_{vp}\) represent the time overhead when executing certain chaincode operations. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Scheme**} & **Original Data** & \multirow{2}{*}{**Anonymity**} & **Resisting Data** & \multicolumn{2}{c}{**Decentralized**} & \multirow{2}{*}{**Conditional**} \\  & **Storage Location** & & **Mining Threats** & & **Identity** \\  & & & **Authentication** & & **Query** \\ \hline
[29] & Cloud Server & ✓ & \(\times\) & \(\times\) & \(\times\) \\
[30] & IPFS & ✓ & \(\times\) & \(\times\) & \(\times\) \\
[31] & Cloud Server & \(\times\) & \(\times\) & \(\checkmark\) & \(\times\) \\
[32] & Centralized & \(\checkmark\) & \(\times\) & \(\times\) & \(\times\) \\ Our scheme & IPFS & ✓ & ✓ & ✓ & ✓ \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Feature comparison. Time overhead is a key indicator reflecting system performance, with a larger time overhead leading to a noticeable decrease in system efficiency. To evaluate the impact of each stage in the proposed scheme on system time overhead, as well as the influence of different data sizes on the time overhead of each stage, we conducted relevant tests. Selecting data of different sizes (64 KB/256 KB/1 MB) for time overhead tests during the data generation, uploading, and sharing phases yielded the results shown in Table 5. From the analysis, it can be concluded that the size of the data has a noticeable impact on the time overhead for each phase, with larger data resulting in greater time overhead. To further explore the impact of data size on the performance of the blockchain network in our proposed scheme, we tested the time overheads of the main functions of the chaincode, and the results are shown in Table 6. The results indicate that regardless of variations in the size of the medical record data, the impact on the time overhead required for executing the chaincode in this scheme is minimal, suggesting a relatively small effect on the computational performance of the blockchain. Additionally, the average time required for verifying a zero-knowledge proof on the blockchain is 37 ms, indicating a similarly limited impact on the overall system operation. \begin{table}
\begin{tabular}{c l} \hline \hline
**Symbol** & **Explanation** \\ \hline \(t_{pk}^{ent}\) & Encrypting medical record data with public keys \\ \(t_{sk}^{de}\) & Decrypting medical record data with private key \\ \(t_{md_{new}}\) & Calculating medical record data message digest \\ \(t_{N_{new}}\) & Calculating the hash value of the medical record number \\ \(t_{N_{new}}^{en}\) & Encrypting medical record number \\ \(t_{N_{new}}^{de}\) & Decrypting medical record number \\ \(t_{sign}\) & Doctor signs the medical record data \\ \(t_{td}\) & Creating _Treatment_ to upload to data channel \\ \(t_{qtd}\) & Querying _Treatment_ on the data channel \\ \(t_{AES}^{en}\) & Encrypting medical record data with AES \\ \(t_{AES}^{de}\) & Decrypting medical record data with AES \\ \(t_{grk}\) & Generate re-encryption key \\ \(t_{pre}\) & Proxy re-encryption \\ \(t_{cud}\) & Creating _DataUsageRecord_ to upload to data channel \\ \(t_{qual}\) & Querying _DataUsageRecord_ on the data channel \\ \(t_{ulPFS}\) & Uploading encrypted data to the IPFS to generate CID \\ \(t_{dlPFS}\) & Downloading encrypted data from the IPFS \\ \(t_{cai}\) & Creating \(AttributionInfo\) to upload to attribution channel \\ \(t_{qui}\) & Querying \(AttributionInfo\) on the attribution channel \\ \(t_{vi}\) & Verifying data integrity \\ \(t_{pp}\) & Verifying the validity of \(pf\) \\ \hline \hline \end{tabular}
\end{table} 
Table 4: The symbols and explanations for the time overhead of the main operations in this scheme.