# Research on the Trusted Traceability Model of Taishan Tea Products Based on Blockchain
## 4 Analysis of Blockchain-Based Taishan Tea Traceability Model
### SM2 Encryption Algorithm Optimization
#### 4.2.2 Algorithm Performance Testing  
The SM2 encryption algorithm is a deterministic algorithm, and the output of the algorithm is deterministic without any random factors or uncertainty, ensuring the consistency and stability of the output given the same input, excluding random factors and uncertainty, and no error or fluctuation, thus becoming an indispensable key in encryption and data integrity verification, further consolidating the basis of its application in the security field.  
Regarding the algorithm performance test of the SM2 algorithm based on concurrent processing, the design experimental data were as follows: 10,000 characters, 15,000 characters, 20,000 characters, 25,000 characters, 30,000 characters, 35,000 characters, 40,000 characters, 45,000 characters, and 50,000 characters, according to the different lengths of the text. The performance of the KDF function, SM2 encryption algorithm, SM2 decryption algorithm in the encryption, and decryption process are tested to obtain the performance of the algorithms before and after the optimization. On the basis of the above experiments, we obtained the corresponding experimental results about the performance comparison graph between the traditional SM2 encryption algorithm and the improved SM2 encryption algorithm. The experimental results are shown in the following figure. Among them, Figure 6 is a time consumption comparison chart of the KDF function in the encryption process. Figure 7 is a time consumption comparison chart of the KDF function in the decryption process. Figure 8 is a SM2 encryption algorithm optimization comparison chart. Figure 9 is a SM2 decryption algorithm optimization comparison chart.  
Figure 6: Time consumption comparison chart of KDF function in the encryption process.  
According to the line graph, it can be found that, for plaintext data with long text, the time consumed by the KDF function after concurrent processing is significantly reduced, and as the length of the text increases; the improvement of the overall performance of the encryption and decryption algorithms of SM2 also increases. It can be seen that the combination of the concurrent processing framework and key derivation function significantly improved the efficiency of SM2's encryption and decryption algorithm.  
In large-scale data processing systems such as blockchain, even a 1% efficiency improvement will have an extremely significant effect when accumulated over thousands of cryptographic operations. A tiny reduction in time for a single operation can dramatically reduce overall processing time at the system level, and this optimization is critical to improving overall system performance. Users often notice these subtle improvements in performance, especially in time-sensitive applications, where reduced latency translates directly into a smoother and faster user experience. As the data volume expands and the user base increases, small initial optimization measures will show significant performance  
Figure 8: SM2 encryption algorithm optimization comparison chart.  
Figure 7: Time consumption comparison chart of KDF function in the decryption process.  
Figure 9: SM2 decryption algorithm optimization comparison chart.  
advantages in the future when facing larger-scale applications, laying a solid foundation for long-term scalability and the efficient operation of the system.