# A Security-Oriented Data-Sharing Scheme Based on Blockchain
## 4 Experiment and Analysis
### Comparisons and Discussions  
To comprehensively analyze the security of the scheme designed in this paper, this paper compares it with other related schemes ([19; 22; 25; 26; 30]), in which [19] is one of the most important schemes in similar approaches, Refs. [22; 25; 26] are related schemes from recent years, and [30] is the state-of-the-art method. The results of the scheme's safety comparison are shown in Table 4.  
Off-chain data security: In the scheme proposed in this paper, the secure storage of data \(d_{i}^{m}\) is ensured by using the IPFS storage platform and combined with cryptographic algorithms to make the subsequent sharing process transfer ciphertexts, which will not disclose the information of the shared data \(d_{i}^{m}\), improving the security of the data-sharing process. On-chain data security: The scheme proposed in this paper adopts a lightweight on-chain/off-chain collaborative data security algorithm based on ECC and ECDHE, which encrypts the hash value corresponding to the shared data \(d_{i}^{m}\) into a ciphertext and then stores it on the blockchain. The hash ciphertext can only be downloaded from IPFS after decryption, thus preventing unauthorized access to the storage address of off-chain data and enhancing the security of on-chain data. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & **Our Work** & [19] & [22] & [25] & [26] & [30] \\ \hline Off-chain data security & \(\surd\) & \(\times\) & \(\times\) & \(\surd\) & \(\times\) & \(\surd\) \\ On-chain data security & \(\surd\) & \(\times\) & \(\surd\) & \(\times\) & \(\times\) & \(\surd\) \\ Integrity of shared data & \(\surd\) & \(\times\) & \(\times\) & \(\times\) & \(\surd\) & \(\surd\) \\ Traceable record of shared data & \(\surd\) & \(\surd\) & \(\surd\) & \(\times\) & \(\times\) & \(\surd\) \\ Identity authentication & \(\surd\) & \(\surd\) & \(\surd\) & \(\surd\) & \(\surd\) & \(\surd\) \\ Trusted shared data & \(\surd\) & \(\times\) & \(\times\) & \(\times\) & \(\times\) & \(\surd\) \\ Lightweight considerations & \(\surd\) & \(\surd\) & \(\surd\) & \(\surd\) & \(\surd\) & \(\times\) \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Scheme safety comparison. Integrity of shared data: The proposed architecture separates data storage from ownership proof. Data are securely stored off-chain on the IPFS platform, with each piece assigned a unique hash that changes upon any modification, thereby detecting tampering. Moreover, an NFT on the blockchain contains an encrypted version of this hash, ensuring the integrity of the shared data. Traceable record of shared data: This paper adopts an NFT-based shared data flow history tracking mechanism, which automatically saves the data-sharing record in NFT. As a result, the shared record of shared data \(d_{i}^{m}\) is stored in the chain without being tampered with, and the identities of the two parties in the process of data sharing can be traced and recorded. Identity authentication: In the scheme proposed in this paper, it is ensured that only an identity-authorized data demander \(u_{j}\) can obtain the hash ciphertext, decrypt it, and download the shared data \(d_{i}^{m}\) stored in IPFS. Secondly, the records of each shared data can be queried each time, and the identity can also be verified by querying the shared records of a particular shared data. Trustworthiness of the shared data: The proposed scheme involves storing the original shared data on IPFS and generating a unique hash. This hash is then encrypted using a custom lightweight cryptographic algorithm, with the resulting ciphertext embedded within an NFT for secure blockchain storage. This methodology ensures data security and tamper-resistance, and upholds the integrity and credibility of the shared data throughout the process.