GPU-based acceleration technology for signature verification of blockchain transactions
Can CUI1(),Xiao-hu YANG1,*(),Wei-wei QIU2,Fang-lei HUANG2
1. College of Computer Science and Technology, Zhejiang University, Hangzhou 310027, China 2. Hangzhou Qulian Technology Co. Ltd, Hangzhou 310000, China
A GPU-based acceleration technology for signature verification of blockchain transactions was proposed, in order to improve the signature verification efficiency of peers. A phased optimization for signature verification process of blockchain transactions was performed by combining the characteristics of CPU-GPU heterogeneous platform architecture, greatly improving the efficiency of the SM2 verification algorithm. The asynchronous nature of GPU kernel calls was fully utilized, effectivelly reducing the overall IO overhead of the transaction signature verification process. Considering the characteristics of GPU with strong computational power and weak branch prediction, an improved simultaneous multipoint multiplication algorithm was proposed, which not only improved the efficiency of GPU signature verification, but also increased the multi-threaded parallelism scale. The proposed method offloaded the transaction signature verification operation to GPU processing, which freed up the CPU resources of peers occupied and improved the overall performance of the blockchain system without modifying the blockchain protocols. Experimental results based on the RTX3080 platform and Hyperchain, a domestic permissioned blockchain, showed that the peak signature verification throughput of the proposed method was 4.52×106 transactions per second, and the transaction throughput of Hyperchain platform integrated with the proposed method increased by 15.81% while latency decreased by 6.56%.
Can CUI,Xiao-hu YANG,Wei-wei QIU,Fang-lei HUANG. GPU-based acceleration technology for signature verification of blockchain transactions. Journal of ZheJiang University (Engineering Science), 2023, 57(8): 1505-1515.
Fig.1Framework for GPU-based acceleration technology for signature verification of blockchain transactions
Fig.2Column-major fetch mode
Fig.3Throughput and latency of signature verification acceleration technology
优化阶段
是否优化
${T_{\text{P}}}$/(105 次·s?1)
${L_{\text{P}}}$/ms
$\lambda $/%
数据组织与传输
优化
45.2
38.03
11.06
未优化
40.7
34.33
GPU多线程 并行验签
优化
39.6
28.91
2490.00
未优化
1.59
1080
结果更新与确认
优化
45.2
38.03
3.91
未优化
43.5
36.09
Tab.1Evaluation of optimization effects of each stage
Fig.4Throughput comparison of Euclid and Fermat signature verification solutions
Fig.5Experimental design of Euclid and Fermat computational solutions
Fig.6Comparison of peak throughput of Euclid and Fermat computing solutions
Fig.7Comparison of peak throughput of simultaneous multipoint multiplication and standard multipoint multiplication
实验方案
${T_{\text{O}}}$/(次·s?1)
${L_{\text{B}}}$/ms
Hyperchain(使用本研究方案)
45410
58.42
Hyperchain(不使用本研究方案)
39209
62.52
Tab.2Validation of effect for integrated optimization
[1]
MEMON M, HUSSAIN S S, BAJWA U A, et al. Blockchain beyond bitcoin: blockchain technology challenges and real-world applications [C]// 2018 International Conference on Computing, Electronics and Communications Engineering (iCCECE). Southend: IEEE, 2018: 29-34.
[2]
WANG J, WANG H. Monoxide: scale out blockchains with asynchronous consensus zones [C]// 16th USENIX Symposium on Networked Systems Design and Implementation (NSDI 19). Boston: USENIX Association, 2019: 95-112.
[3]
ZAMANI M, MOVAHEDI M, RAYKOVA M. Rapidchain: scaling blockchain via full sharding [C]// Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security. New York: Association for Computing Machinery, 2018: 931-948.
[4]
CHUNG G, DESROSIERS L, GUPTA M, et al. Performance tuning and scaling enterprise blockchain applications [EB/OL]. (2019-12-24) [2022-10-09]. http://arxiv.org/abs/1912.11456.
[5]
MELONI N. New point addition formulae for ECC applications [C]// Arithmetic of Finite Fields. Berlin, Heidelberg: Springer-Verlag, 2007: 189-201.
[6]
AGRAWAL R, YANG J, JAVAID H. Efficient FPGA-based ecdsa verification engine for permissioned blockchains [C]// Proceedings of the 2022 ACM/SIGDA International Symposium on Field-Programmable Gate Arrays. New York: Association for Computing Machinery, 2022: 50.
[7]
SAKAKIBARA Y, TOKUSASHI Y, MORISHIMA S, et al. Accelerating blockchain transfer system using FPGA-based NIC [C]// 2018 IEEE International Conference on Parallel and Distributed Processing with Applications, Ubiquitous Computing and Communications, Big Data and Cloud Computing, Social Computing and Networking, Sustainable Computing and Communications (ISPA/IUCC/BDCloud/SocialCom/SustainCom). Melbourne: IEEE, 2018: 171-178.
[8]
JAVAID H, YANG J, SANTOSO N, et al. Blockchain machine: a network-attached hardware accelerator for hyperledger fabric [C]// 2022 IEEE 42nd International Conference on Distributed Computing Systems (ICDCS). Bologna: IEEE, 2022: 258-268.
[9]
PHAM H L, TRAN T H, PHAN T D, et al Double SHA-256 hardware architecture with compact message expander for bitcoin mining[J]. IEEE Access, 2020, 8: 139634- 139646
doi: 10.1109/ACCESS.2020.3012581
[10]
TRAN T H, PHAM H L, PHAN T D, et al BCA: a 530-mW multicore blockchain accelerator for power-constrained devices in securing decentralized networks[J]. IEEE Transactions on Circuits and Systems I: Regular Papers, 2021, 68 (10): 4245- 4258
doi: 10.1109/TCSI.2021.3102618
[11]
朱立, 俞欢, 詹士潇, 等 高性能联盟区块链技术研究[J]. 软件学报, 2019, 30 (6): 1577- 1593 ZHU Li, YU Huan, ZHAN Shi-xiao, et al Research on high-performance consortium blockchain technology[J]. Journal of Software, 2019, 30 (6): 1577- 1593
doi: 10.13328/j.cnki.jos.005737
[12]
MORISHIMA S, MATSUTANI H. Accelerating blockchain search of full nodes using GPUs [C]// 2018 26th Euromicro International Conference on Parallel, Distributed and Network-based Processing (PDP). Cambridge: IEEE, 2018: 244-248.
[13]
ILIAKIS K, KOLIOGEORGI K, LITKE A, et al GPU accelerated blockchain over key-value database transactions[J]. IET Blockchain, 2022, 2 (1): 1- 12
doi: 10.1049/blc2.12011
[14]
MORISHIMA S. Scalable anomaly detection method for blockchain transactions using GPU [C]// 2019 20th International Conference on Parallel and Distributed Computing, Applications and Technologies (PDCAT). Gold Coast: IEEE, 2019: 160-165.
[15]
PAN W, ZHENG F, ZHAO Y, et al An efficient elliptic curve cryptography signature server with GPU acceleration[J]. IEEE Transactions on Information Forensics and Security, 2017, 12 (1): 111- 122
doi: 10.1109/TIFS.2016.2603974
[16]
朱辉, 黄煜坤, 王枫为, 等 一种基于图形处理器的高吞吐量SM2数字签名计算方案[J]. 电子与信息学报, 2022, 44 (12): 4274- 4283 ZHU Hui, HUANG Yu-kun, WANG Feng-wei, et al A high throughput SM2 digital signature computing scheme over graphics processing unit platform[J]. Journal of Electronics and Information Technology, 2022, 44 (12): 4274- 4283
doi: 10.11999/JEIT211049
[17]
AL-ZUBAIDIE M, ZHANG Z, ZHANG J. Efficient and secure ECDSA algorithm and its applications: a survey [EB/OL]. [2022-10-01]. https://ijcnis.org/index.php/ijcnis/article/view/3827.
[18]
SEO H, KIM H, PARK T, et al Fixed-base comb with window-non-adjacent form (NAF) method for scalar multiplication[J]. Sensors, 2013, 13 (7): 9483- 9512
doi: 10.3390/s130709483
[19]
DRUCKER N, GUERON S Speeding-up P-256 ECDSA verification on x86-64 servers[J]. IEEE Letters of the Computer Society, 2019, 2 (2): 12- 15
doi: 10.1109/LOCS.2019.2911063
[20]
HANSER C, WAGNER C. Speeding up the fixed-base comb method for faster scalar multiplication on koblitz curves [M]// CUZZOCREA A, KITTL C, SIMOS D E, et al. Security engineering and intelligence informatics: Vol. 8128. Berlin, Heidelberg: Springer, 2013: 168-179.
[21]
MOHAMED N A F, HASHIM M H A, HUTTER M. Improved fixed-base comb method for fast scalar multiplication [M]// MITROKOTSA A, VAUDENAY S. Progress in cryptology - AFRICACRYPT 2012: Vol. 7374. Berlin, Heidelberg: Springer, 2012: 342-359.
[22]
ROBERT J M, NEGRE C, PLANTARD T Efficient fixed-base exponentiation and scalar multiplication based on a multiplicative splitting exponent recoding[J]. Journal of Cryptographic Engineering, 2019, 9 (2): 115- 136
doi: 10.1007/s13389-018-0196-7
[23]
CUDA C++ programming guide [EB/OL]. [2022-10-09]. https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html.
[24]
HANKERSON D R, VANSTONE S A, MENEZES A J. Guide to elliptic curve cryptography [M]. New York: Springer, 2003.
[25]
CUDA C++ best practices guide [EB/OL]. [2022-10-09]. https://docs.nvidia.com/cuda/cuda-c-best-practices-guide/index.html.
[26]
RIVAIN M. Fast and regular algorithms for scalar multiplication over elliptic curves [J]. Cryptology ePrint Archive, 2011: 25.
[27]
BOS J W Low-latency elliptic curve scalar multiplication[J]. International Journal of Parallel Programming, 2012, 40 (5): 532- 550
doi: 10.1007/s10766-012-0198-5
[28]
CUI S, GROSSSCHÄDL J, LIU Z, et al. High-speed elliptic curve cryptography on the NVIDIA GT200 graphics processing unit [C]// Information Security Practice and Experience. Cham: Springer, 2014: 202-216.