Computer and Modernization ›› 2022, Vol. 0 ›› Issue (10): 106-112.

Previous Articles     Next Articles

An Off-chain Extended Storage Scheme for Blockchain Traceability

  

  1. (School of Communication and Information Engineering, Nanjing University of Posts and Telecommunications, Nanjing 210003, China)
  • Online:2022-10-20 Published:2022-10-24

Abstract: In the blockchain-based supply chain management traceability system, since the blockchain technology is a distributed system, all nodes will back up the data stored in the blockchain. If the traceability data is directly stored on the chain, it will cause the data to occupy a large amount of memory, increase the maintenance cost of the traceability system and reduce the system response speed. Therefore, an off-chain expansion storage scheme is proposed. Firstly, the scheme uses the unidirectionality of SHA-256 hash algorithm to hash the plaintext data to obtain the hash value, then uses the private key generated by the SM2 encryption algorithm to sign the hash value to ensure the reliability of the identity of the information uploader. Finally, the hash value and signature value are stored in the blockchain through the smart contract. Plaintext data and the address of its hash value and signature value stored on the blockchain are stored in the database. By combining the respective advantages of centralized storage and blockchain technology, it can not only ensure that the traceability data can not be tampered, but also effectively reduce the memory size occupied by the traceability data in the blockchain network. Finally, based on the proposed scheme, the traceability system is designed in detail and implemented using the Ethereum blockchain platform.

Key words: traceability system, blockchain, SHA-256 hash algorithm, SM2 encryption algorithm, smart contract