Abstract
This study proposes a secure food quality traceability system based on a multi-chain blockchain architecture to improve both data protection and the efficiency of food quality management. The system leverages blockchain technology to monitor and safeguard the entire supply chain—including production, processing, and transportation. To ensure confidentiality and integrity of data, the system integrates the Paillier encryption algorithm and secure hash algorithms for encrypted storage and secure sharing (the Paillier algorithm supports addition and multiplication operations, making it suitable for handling data aggregation and analysis tasks in the supply chain. It has high computational efficiency and can quickly complete data encryption and decryption). Hyperledger Fabric is employed to manage permissioned access, enforce data query control, and mitigate unauthorized operations. Security tests indicate that the system achieves high encryption efficiency—encrypting 2500 kb of data in 22 ms with a 32-bit key and achieving the fastest decryption at 443 ms with a 128-bit key. Compared to traditional systems, it significantly improves throughput (412 TPS vs 305 TPS) and risk interception (92 vs 52). These results demonstrate that the proposed system enhances cybersecurity in traceability applications by offering strong encryption, fine-grained access control, and high performance. It provides a robust and scalable solution for securing sensitive data in food supply chains, with broader implications for blockchain-based cybersecurity applications in industrial networks.
Introduction
Food chain traceability technology is an innovative approach that utilizes blockchain technology for product tracking, ensuring supply chain (SC) transparency, and improving consumer trust. 1 The complexity of SC management has increased with the growth of globalization and information technology. Because of this, it is especially crucial to guarantee authenticity and transparency in all facets of food quality (FQ), from production to consumption. 2 The untamperability, decentralization and traceability features of blockchain technology make it an ideal technology for achieving effective traceability. It can provide more reliable information about food safety (FS) records for the SC as well as consumers. 3 Dong L et al. studied the issue of food SC traceability and developed a SC model containing multiple tiers of suppliers to analyze the impact of traceability technology on the incentives and benefits of SC members. The results showed that while full traceability saves uncontaminated food and increases revenue, it may also lead to impaired member returns due to strategic pricing and even increase the risk of contamination. 4 Gupta R et al. used a soft systems approach to develop a blockchain-based food traceability system (FTS) for food insecurity in the public distribution system in India. The system provided basic food items to beneficiaries by increasing transparency and helped policy makers to make informed decisions. However, the study did not fully consider the feasibility of the technology in large-scale implementation. 5 Through service design workshops and trials, Hao F et al. investigated the use of blockchain technology in the food SC of the restaurant business and discovered that it greatly enhances traceability and trust, which in turn raises customer happiness. The study also noted that the effects varied by restaurant type and location. The study provided guidance for technology investments in the restaurant industry, but did not delve into the applicability of blockchain technology in restaurants of different sizes. 6
List of research related to blockchain technology.
In summary, a crucial component of FS oversight is food traceability. Currently, there are many uses for Internet of Things, blockchain, and encryption technologies in the food traceability space. These technologies also offer crucial technical assistance for FS and quality monitoring. However, the current blockchain-based FTS faces many deficiencies in information encryption, data access, and system wind control capabilities. For example, in the 2013 European horse meat scandal, the lack of transparency in supply chain information made it difficult to trace the source of pollution, resulting in a loss of consumer trust. Secondly, the system stability is poor. The tracing system failed to respond promptly and accurately to the 2018 romaine lettuce and E. coli contamination incident in the United States, resulting in an expanded impact. Furthermore, information integration is difficult. The data standards vary in different stages, such as a multinational food enterprise where it is difficult to achieve full traceability due to inconsistent data formats among suppliers. Finally, the high cost and complexity of technology limit the application of small and medium-sized enterprises. 11 At present, the immutability, decentralization, and traceability characteristics of blockchain can effectively ensure data security and privacy, and enhance supply chain transparency. The multi-chain architecture further optimizes system performance by distributing data from different links across multiple chains, achieving efficient storage and fast querying of data, enhancing system stability and scalability. Therefore, the research aims to design a food quality traceability system based on multi-chain architecture blockchain to improve the effectiveness of food quality supervision. One of the research’s two achievements is the development of a blockchain-based food quality traceability system (FQTS), which uses increasingly sophisticated communication and sensor networks to guarantee system stability. Secondly, the research introduces the Hyperledger Fabric network infrastructure framework and adopts data encryption technologies such as InterPlanetary File System (IPFS), Paillier, and Fabric Certificate Authority (Fabric CA) architecture to realize secure access and control of the system. The system can be accessed and controlled securely. The contribution of this research is mainly reflected in two aspects. The first point is that the research has made significant contributions in the field of food quality traceability. By constructing a traceability system based on a multi-chain architecture blockchain, it provides strong technical support for the transparency and traceability of all aspects of food production and consumption, and promotes the healthy development of the food industry. The second point is the contribution of research technology in the application field of blockchain technology, such as the introduction of Hyperledger Fabric network framework and Paillier algorithm, which enriches the application practice of blockchain in data encryption, access control, and other aspects, expands the application scope of blockchain technology in supply chain management and other fields, and provides technical support for information construction in related fields.
Methods and materials
This chapter mainly elaborates on the overall design and related technologies of a blockchain food quality traceability system based on a multi-chain architecture. First, the design of a multi-chain architecture blockchain food quality traceability system was introduced, which clearly includes key components such as service layer, data layer, physical layer, network layer, and interaction layer. The functions and hardware configurations of each layer were explained in detail. Then, the data storage and sharing technology of blockchain-based traceability system was discussed, and how to introduce Paillier algorithm and other methods to construct a data information encryption and sharing model to ensure data security was explained. Finally, the data access and query control technology of blockchain-based traceability system was introduced, and it was proposed to use Hyperledger Fabric framework and Fabric CA to achieve data access control, ensuring the secure and stable operation of the system.
Multi-chain architecture blockchain FQTS design
At present, the issue of FS is of great concern to society. In particular, once FQ problems occur in the production, transportation and wholesale of food, it will pose a great challenge to human health. Therefore, to ensure that the FQ meets the market requirements, good food traceability will be the key. The research is based on blockchain technology to design a traceability system with multi-chain architecture. In a food quality traceability system with a multi-chain architecture, efficient and secure interactions between multiple chains are achieved through cross chain communication tunnels and distributed network architecture. In addition, the zero-trust security gateway constructs a communication tunnel to verify cross chain requests, which can effectively ensure the security of data transmission. Under this system, data collection is encrypted and stored on the blockchain by the service layer. When cross chain synchronization occurs, it is verified through a security gateway. When querying, data is obtained from the corresponding chain according to permissions to ensure the security and effectiveness of information. Figure 1 depicts the system’s general design. Overall framework design of FQTS.
In Figure 1, the FQTS consists of five key components, including service layer, data layer, physical layer, network layer, and interaction layer. The physical layer is the basis of the system operation, which is mainly responsible for collecting and transmitting food data in each link through terminal service devices. The physical layer hardware configuration consists of multimodal Internet of Things terminals. It includes a high-precision temperature and humidity sensor (±0.5°C / ±2%RH) that supports the FQ system (hazard analysis and critical control point, HACCP) standard, an industrial-grade read-write with near-field communication as well as dual-frequency recognition of electronic tags, a 4K resolution H.265 encoded vision acquisition device, and an edge computing gateway that supports LoRaWAN/5G dual-mode transmission. In addition, the scale of the enterprise and the cost of hardware procurement for the system were taken into account when constructing the food quality traceability system. For environmental monitoring in the transportation process, medium precision sensors combined with dynamic threshold algorithms can meet most regulatory requirements, while high-precision equipment is retained in high-risk areas of the production process to achieve graded control. In addition, choose hardware that is compatible with open source protocols such as MQTT to avoid vendor binding and reduce long-term operational costs.
The data collected in the physical layer will be input into the service layer, which mainly realizes the automated analysis and encryption services for the traceability food data. Among them, the encryption and sharing algorithm based on blockchain technology is mainly adopted, which is responsible for data query, encryption, decryption and other functions. The data layer mainly adopts SQLite and blockchain-based CouchDBD databases to provide tamper-proof data storage services. The network layer adopts multi-channel network in conjunction with IPFS private network for the network layer design to ensure the security supervision of data as well as effective isolation.
12
In particular, the physical isolation of the blockchain subnet from the IPFS private storage network (Filecoin protocol) is achieved through software-defined wide area network (SD-WAN) technology. In addition, zero-trust security gateways are deployed to build cross chain communication tunnels. The core switching equipment is configured with 100Gbps throughput Clos network topology (CLOS) architecture distributed switches to ensure that the data transmission latency of various links such as production enterprises and logistics nodes is less than 20 ms. The interaction provides food multi-chain batch information query and supervision. The whole system is designed with multi-chain architecture, and the system will accurately trace the whole SC of food. It contains multiple traceability parts such as production enterprises, processing enterprises, logistics enterprises, warehousing enterprises, sales enterprises, and so on.
13
The structure of multi-chain architecture traceability network is shown in Figure 2. Schematic diagram of multi-chain architecture traceability network.
The multi-chain architecture traceability network in Figure 2 shows that the whole traceability network consists of three parties, including regulators, food SC companies, and consumers at the end of the food supply. The traceability network is composed of IPFS private network and blockchain network. Due to the complexity of the internal links of different links, in order to guarantee the accuracy of the traceability service, the FQ traceability service will be realized through the joint participation of the three parties.
Blockchain-based traceability system data storage and sharing technology
Data division of each link in the traceability system.
In Table 2, the traceability system contains five sections of primary data, involving shareable public data as well as private data. For example, the public searchable data of food production segment data are planting or breeding time and location information, while the private information includes farming information, scale, and quantity sold. To secure the private data information, the research adopts Paillier algorithm as the basis to construct the data information encryption and sharing model. Blockchain data storage and sharing mainly includes three parts: generating secret key, data storage, and secret key acquisition.
14
The whole technical blockchain data security storage and sharing framework is shown in Figure 3. Data storage and sharing technology framework.
In Figure 3, within the data IPFS message encryption framework, all nodes on the multi-chain architecture perform the initial step
In equation (1),
In equation (2),
Under the blockchain,
Next, the data on the blockchain multi-chain architecture needs to be stored securely by setting the stored data plaintext as
Then
To secure the data, each data block is processed using 256-bit secure hash algorithm (SHA) for hashing operation. A unique identification code
To secure the stored data, the study utilizes threshold decryption
In equation (9),
Blockchain-based traceability system data access and query control technology
In the traceability system of chain architecture blockchain, the access and query of blockchain data often have problems such as permissions and data leakage. To address the above problems, the research proposes a system access and confidentiality control technology. Among them, the traceability system base network is the enterprise-level Hyperledger Fabric framework, and Fabric CA is used to replace the original secret key center. At the same time, proxy re-encryption is introduced into Fabric CA, and data access control is realized according to system user rights. The data access and query sequence of FQTS is shown in Figure 4. Data access and query sequence of FQTS.
The timing diagram in Figure 4 shows that the system access and query also contains three main processes, including secret key generation, data storage, and data acquisition. In the system access control, Fabric CA is used as the secret key management center, which performs the first step of the initial operation to generate
The key generation process, defines the elliptic curve on the finite neighborhood
Setting a random parameter
The public key
In equation (13),
In equation (14),
During the data acquisition process, the system content data storage contract will match a serial number
In equation (16),
The entire technical process of the food quality traceability system based on multi-chain architecture blockchain is shown in Figure 5. Process of food quality traceability technology based on multi-chain architecture and blockchain.
According to Figure 5, this technology is based on the service layer and uses encryption and sharing algorithms based on blockchain technology to automatically analyze and encrypt data. It is responsible for functions such as data query, encryption, and decryption, thereby achieving food quality traceability and information management
Results
This chapter mainly presents and analyzes the security and performance test results of the blockchain food quality traceability system based on multi-chain architecture. Firstly, system security testing and analysis were conducted. By comparing with encryption algorithms such as SM4 and AES, the superiority of the proposed technology was verified in terms of encryption performance, data storage and decryption performance, and ciphertext change rate. This indicates that the new system has more efficient and secure features in data encryption, storage, and decryption. Next, we will conduct performance experiments on the food quality traceability system, comparing the performance of the new and old systems in terms of throughput, latency, risk control capability, error rate, and resource utilization, to verify the practical application effect of the research technology.
System security testing
Multi-chain architecture traceability system information.
In the FQTS link network, there are four types of enterprises, including agricultural production and processing enterprises, logistics enterprises, warehousing enterprises, and sales enterprises. A total of 27 network chains are set up for effective traceability of FQ. Meanwhile, 7 IPFS nodes are set up in the network to ensure the security of information data. Next, the system security will be tested, and the study introduces Chinese national standard symmetric cipher SM4 (SM4) and advanced encryption standard (AES) as the benchmarks for data encryption experimental testing. In the test, the encryption model Paillier Fabric CA proposed by the research institute was paired with Paillier CA, and the encryption performance of different models was compared as shown in Figure 6. Comparison of encryption performance of encryption algorithms under different key lengths. (a) 32-bit key length and (b) 256-bit key length.
Figure 6(a) shows the encryption performance test under 32-bit secret key length. According to the test structure, as the encrypted data size increases, the encryption time of each encryption model is increasing. Among them, the research encryption model has an obvious advantage over the AES model. For example, when the data size is 2500 kb, the encryption time of the research model is 22 ms, while that of AES is 28 ms and that of SM4 is 25 ms. Next, the secret key length is set to 256 bits, and the encryption performance of different algorithms is compared, as shown in Figure 6(b). The overall encryption time of the research model is significantly lower than that of AES and SM4. For example, when the data size is 1000 kb, the encryption time of AES, SM4, and the research model is 2675 ms, 2203 ms, and 1806 ms, respectively. Then, the research compares the data storage and decryption performance of the three algorithms, as shown in Figure 7. Data storage and decryption performance test. (a) Data storage time consumption and (b) data decryption performance test.
Figure 7(a) shows the comparison of data storage time consuming. According to the data, the increase of the secret key length makes the storage time of each algorithm expand. Among them, AES and SM4 have close performance when the secret key is 8bit to 32 bit. However, as the secret key length increases, SM4 storage time is lower than AES and performs better. Overall, the research model storage time is significantly better than SM4 and AES. For example, when the secret key is 64 bit, the overall storage time of AES, SM4, and the research model are 128 ms, 112 ms, and 43 ms, respectively. Figure 7(b) shows the data decryption performance test. The decryption performance of the three algorithms is close when the secret key length is in the interval of 8 bit to 32 bit. However, when the secret key length is above 64 bit, the research model has an obvious advantage over other models. For example, when the secret key length is 128 bit, the decryption time is 985 ms for AES, 723 ms for SM4, and 443 ms for the research model. Next, the study introduces the change rate (the ratio of the number of changed words to the total number of characters in the ciphertext) to reflect the actual encryption performance of the different algorithms. The higher the value of change rate, the better the obfuscation of the encryption algorithm. Among them, the key length is set to 32, the experimental plaintext length is set, and the number of plaintext tests under different nodes is 10. Figure 8 displays the specific test findings. Results of ciphertext change rate for different algorithms. (a) AES, (b) SM4, and (c) Paillier CA.
Figure 8(a)–(c) show the cipher change rate of AES, SM4, and research models, respectively. The change rate of AES model is in the range of 94.5%–96.7%, and it is unevenly distributed among multiple node intervals. In the SM4 model, the ciphertext change rate ranges from 96.4% to 98.3%. Its distribution is less uniform in node 10 to node 15 and node 25 to node 35. In the experiments with the research model, its change rate is in the range of 96.4%–98.2% and the overall distribution is uniform. This indicates that the research model has better cryptographic obfuscation and is more resistant to means such as brute force decryption.
FQTS performance test
Next, the study compares the effectiveness of FQTS in practical application and compares it with the old system. In particular, the old system uses a centralized database-based system and does not have end-to-end data encryption and advanced access control mechanisms. In addition, the old system uses a traditional distributed sensing network and does not support network standards such as 5G networks and edge computing. The system architecture adopts a single server or cluster to manage data, without distributed node verification mechanism, using conventional relational databases (SQL), and data storage without encryption or only basic access control. Next, the system throughput (transactions per second, TPS) and latency are compared, as shown in Figure 9. Comparison of throughput performance and latency performance of the system. (a) System throughput testing and (b) system latency testing.
Figure 9 shows the system throughput test results. In the uplink TPS test, the throughput of both systems gradually increases with the increase of test times in the first 1000 tests. Then the new system maintains a stable state, while the old system shows a downward trend in throughput. Overall, the average value of the uplink throughput of the old system is 453TPS, and the new system is 652TPS. In the query throughput test, the throughput of the new system is also significantly better than the old system, with an average value of 412TPS, while the old system has an average value of 305TPS. Next, the two systems are compared with each other in terms of their ability to control the risk when accessing the data, with the number of risks being set to 100. Figure 10 displays the test’s outcomes. Comparison of access control between multi-chain architecture system and old systems.
System comprehensive performance test.
Comparison of energy consumption in blockchain consensus processes of different systems.
According to the test results in Table 5, the energy consumption of a single transaction in the new system PBFT is 0.85 J, significantly lower than PoW’s 900J, but higher than the old system’s 0.15 J. The main reason is that PBFT requires multi node collaborative verification (pre preparation, preparation, and submission stages), and the computational overhead is concentrated in signature verification, which accounts for 28% of the CPU, and message digest processing. In terms of communication overhead comparison, the O (N2) communication complexity of PBFT results in a message load of 1.2 GB per 10000 transactions, while the old system only has 0.3 GB. However, the multi-chain architecture reduces cross node broadcasting through shard isolation (production/logistics/warehousing independent sub chains), reducing message volume by 40% compared to single chain PBFT. Finally, in the risk interception energy efficiency ratio, the new system can intercept 102 risks per kilowatt hour (43 for the old system), which is supported by PBFT’s Byzantine fault-tolerant mechanism (tolerating ≤1/3 malicious nodes) to achieve high-precision risk control. The cost is an increase in energy consumption, but the safety benefit per unit of energy consumption has increased by 137%.
Discussion and conclusion
In the FQ traceability neighborhood, blockchain technology has attracted much attention because of its tamperability, decentralization, and traceability. To improve the effectiveness of FQ regulation, research is conducted to design a FQTS based on multi-chain architecture blockchain and to improve SC transparency and consumer trust. The system introduced the Hyperledger Fabric network infrastructure framework and used data encryption technology such as IPFS, Paillier, and Fabric CA to realize the secure access and control of the system.
According to the experimental findings, the new system performed better than the conventional system in terms of data encryption, storage, and decryption. For example, under 32-bit key length, the encryption time of the new system was 6 ms faster than that of AES model and 3 ms faster than that of SM4. In the data storage and decryption performance tests, the new system also showed better performance, for example, under 64-bit key length, the storage time of AES, SM4, and the new system was 128 ms, 112 ms, and 43 ms, respectively. The decryption time was 985 ms, 723 ms, and 443 ms, respectively. In addition, the new system also displayed higher cryptographic obfuscation in the change rate test, which indicated that it was more resistant to attacks such as brute force decryption.
In summary, the system has excellent security and system stability in terms of data security and system access control to meet the requirements of more demanding FS traceability scenarios. Although the research has achieved significant results in FQTS security and stability, there are still shortcomings. For example, the network links built are relatively fixed, adding or deleting needs to update the network in a timely manner, and its flexibility needs to be optimized at a later stage. Second, the data encryption process is still cumbersome, and complex scenarios still face high hardware occupancy requirements. Finally, when the amount of data increases sharply, the encryption and decryption processes of the system may become slow, affecting overall performance. Therefore, in the future, it is necessary to further simplify the design of data encryption technology. Meanwhile, optimizing data encryption algorithms, such as introducing more efficient encryption algorithms like lightweight encryption algorithms, can reduce the computational overhead during the encryption and decryption processes. In addition, dynamic network link management mechanisms can also be developed to allow the system to automatically add or remove nodes at runtime without manually updating network configurations.
