| With the rapid development and accelerating trend of blockchain technology towards indigenous innovation,the application of national cryptographic algorithms in blockchain has shown a significant upward trend.The core of blockchain technology lies in ensuring data security and integrity,and cryptographic hash algorithms and digital signature algorithms are the fundamental algorithms to achieve this goal.As blockchain applications continue to expand,the demand for transaction speed is increasing.The computational power of CPUs is no longer sufficient to meet these application requirements.The implementation of cryptographic hash algorithms and digital signature algorithms accelerated by GPGPU becomes increasingly significant.By leveraging the thousands of parallel stream processors inherent in GPGPU,the computational speed of cryptographic hash algorithms and digital signature algorithms can be significantly improved,meeting the real-time requirements of blockchain system transactions in the face of massive data scenarios.Based on the domestic CPU-GPGPU high-performance heterogeneous platform,this thesis presents a parallel implementation of the SM3 hash algorithm and the SM2 digital signature and verification algorithm using the HIP programming model,and performs performance testing on the GPGPU-accelerated SM3 and SM2 algorithms.The main contributions are as follows: a detailed description of the domestic CPU-GPGPU heterogeneous platform and the HIP programming model is provided,and a HIP execution model for the SM3 and SM2 algorithms is proposed.By employing heterogeneous programming techniques,the data expansion and compression calculations in the SM3 algorithm are parallelized,and the parallel implementation of the SM2 algorithm includes signature and verification,elliptic curve scalar multiplication,elliptic curve point addition and doubling,and large integer modular operations.The experimental results show that,with four HYGON Z100 DCU accelerators,the throughput of the SM3 algorithm can reach up to 2004.62 Gbps,and the performance of the SM2 algorithm in terms of signature and verification can reach up to 5042565 sign/s and 1365845 verify/s,respectively.Compared to executing the SM3 and SM2 algorithms using multi-threading on the HYGON C86 7265 CPU with the Open SSL library,the GPGPU-accelerated SM3 algorithm in this study achieved a 20.9-fold increase in hashing throughput.The SM2 algorithm showed a 4.8-fold improvement in signature performance and a 4.2-fold improvement in verification performance. |