# A Security-Oriented Data-Sharing Scheme Based on Blockchain
## 4 Experiment and Analysis
### Encryption/Decryption Performance Analysis  
This paper evaluates the proposed lightweight hybrid on-chain/off-chain data security algorithm by conducting encryption/decryption performance benchmarks in a controlled environment. The algorithm is compared against established methods such as RSA, ECC, and AES-GCM, as well as key exchange protocols including ECDHE, ECDH, and DH. Additionally, the performance of AES-GCM in combination with these key exchange protocols (specifically, ECDHE+AES_GCM, ECDH+AES_GCM, and DH+AES_GCM) is assessed to examine their integrated efficacy.  
To validate data reliability, the experiments were conducted 100 times, with the average results presented in Figures 5 and 6.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Experimental Environment Component** & **Configuration Details** \\ \hline Hyperledger Fabric version & Hyperledger Fabric 2.4 \\ IPFS version & IPFS 0.14.9 \\ Smart contract language & Go \\ Go version & 15.7 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Details of software configuration in the experimental environment.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Application Scenario** & \begin{tabular}{c} **The Size of the** \\ **Shared Data** \\ \end{tabular} & \begin{tabular}{c} **Storage Architecture That** \\ **Separates Shared Data from** \\ **Proof of Ownership of the Data** \\ \end{tabular} & \begin{tabular}{c} **No Off-Chain Storage** \\ **Platform Is Used** \\ \end{tabular} \\ \hline \begin{tabular}{c} Friday-WorkingHours.pcap \\ Monday-WorkingHours.pcap \\ Thursday-WorkingHours.pcap \\ Thursday-WorkingHours.pcap \\ Thursday-WorkingHours.pcap \\ Wednesday-workingHours.pcap \\ \end{tabular} & \begin{tabular}{c} 8.2 GB \\ 10 GB \\ 7.7 GB \\ 10 GB \\ 12 GB \\ \end{tabular} & \
\begin{tabular}{c} 825 B \\ 825 B \\ 825 B \\ 825 B \\ 825 B \\ 825 B \\ 825 B \\ \end{tabular} &
\begin{tabular}{c} 8,796,094,777 B \\ 10,737,419,065 B \\ 8,291,635,897 B \\ 10,737,419,065 B \\ 12,884,902,713 B \\ \end{tabular} \\ \hline \hline \end{tabular}
\end{table}
Table 3: Storage space occupied by shared data on the blockchain.  
Figure 5 demonstrates that the ECDH+AES_GCM encryption scheme offers optimal speed, while ECDHE+AES_GCM provides strong forward security without sacrificing efficiency. This highlights the effectiveness of combining ECDHE and AES_GCM for a lightweight encryption approach that enhances security with a minimal impact on performance. Figure 6 illustrates the superior efficiency of AES_GCM in encryption and decryption, attributed to its reliance on straightforward bitwise and matrix operations, in contrast to the complex computations required by RSA and ECC. The performance  
Figure 5: Encryption scheme incorporating key exchange algorithm.  
Figure 6: Time overhead of encryption/decryption algorithm.  
of AES_GCM is further improved by hardware acceleration available on contemporary processors. Therefore, this study selects AES_GCM for its encryption and decryption tasks.  
In conclusion, the proposed hybrid on-chain/off-chain data security algorithm, which is based on ECC and ECDHE, effectively secures blockchain hash values during data sharing while ensuring efficient encryption and decryption of shared data hashes. This approach not only strengthens security but also maintains high performance.