Please wait a minute...
Journal of ZheJiang University (Engineering Science)  2023, Vol. 57 Issue (8): 1505-1515    DOI: 10.3785/j.issn.1008-973X.2023.08.004
    
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
Download: HTML     PDF(1166KB) HTML
Export: BibTeX | EndNote (RIS)      

Abstract  

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%.



Key wordsblockchain      transaction signature verification      GPU acceleration      throughput      latency     
Received: 21 October 2022      Published: 31 August 2023
CLC:  TP 311  
Fund:  浙江省科技计划资助项目(2022C01126);国家重点研发计划资助项目(2021YFB2701100)
Corresponding Authors: Xiao-hu YANG     E-mail: cuican97@zju.edu.cn;yangxh@zju.edu.cn
Cite this article:

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.

URL:

https://www.zjujournals.com/eng/10.3785/j.issn.1008-973X.2023.08.004     OR     https://www.zjujournals.com/eng/Y2023/V57/I8/1505


基于GPU的区块链交易验签加速技术

为了提高区块链中节点的验签效率,提出基于GPU的区块链交易验签加速技术. 结合CPU-GPU异构平台架构特性对交易验签过程进行分阶段优化,大幅提高SM2验签算法运行效率,同时充分利用GPU内核调用的异步性,有效降低交易验签过程的整体IO开销. 考虑到GPU计算能力强而分支预测能力弱的特性,提出改进的同时多点乘算法,不仅提升了GPU验签效率,而且增加了多线程并行规模. 所提方法将交易验签操作卸载至GPU处理,释放了节点被占用的CPU资源,在不修改区块链协议的情况下实现了区块链系统整体性能的提升. 基于RTX3080平台和国产许可区块链Hyperchain平台进行实验,结果表明,该方法峰值验签吞吐量为4.52×106 次/s,集成该方法的Hyperchain平台交易吞吐量提高了15.81%,且延迟下降了6.56%.


关键词: 区块链,  交易验签,  GPU加速,  吞吐量,  延迟 
Fig.1 Framework for GPU-based acceleration technology for signature verification of blockchain transactions
Fig.2 Column-major fetch mode
Fig.3 Throughput 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.1 Evaluation of optimization effects of each stage
Fig.4 Throughput comparison of Euclid and Fermat signature verification solutions
Fig.5 Experimental design of Euclid and Fermat computational solutions
Fig.6 Comparison of peak throughput of Euclid and Fermat computing solutions
Fig.7 Comparison 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.2 Validation 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.
[1] Chuan-hua WANG,Quan ZHANG,Hui-min WANG,Xin XU,Ou-bo MA. Reputation model for VANETs with privacy-preserving under blockchain architecture[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(4): 760-772.
[2] Jun-jie CHEN,Hong-jun LI,Xiao-jun ZHU. Dynamic deployment algorithm of 5G core network user plane using Benders decomposition[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(3): 625-631.
[3] Xue-jiao LIU,Qing-wu SONG,Ying-jie XIA. Secure computation offloading scheme for matrix in Internet of vehicles based on blockchain[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(1): 144-154.
[4] Jin-sheng YANG,Hao WANG,Zhen GAO,Zhao-hui GUO. Double RSA accumulator based stateless transaction verification scheme[J]. Journal of ZheJiang University (Engineering Science), 2023, 57(1): 178-189.
[5] Xue-jiao LIU,Hui-min WANG,Ying-jie XIA,Si-wei ZHAO. Task allocation method for Internet of vehicles spatial crowdsourcing with privacy protection[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(7): 1267-1275.
[6] Miao HE,Fen-hua BAI,Zhuo YU,Tao SHEN. Publicly verifiable secret sharing technology in blockchain[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(2): 306-312.
[7] Si-han DONG,Jun-chang XIN,Kun HAO,Zhong-ming YAO,Jin-yi CHEN. A join query optimization algorithm in multi-blockchain environment[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(2): 313-321.
[8] Liang SUN,Xiao-feng LI,He ZHAO,Bin YU,Tong ZHOU,Xi-ru LI. NFT-based method for assetization of physical assets on blockchain[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(10): 1900-1911.
[9] Xiu-bo LIANG,Jun-han WU,Yu ZHAO,Ke-ting YIN. Review of blockchain data security management and privacy protection technology research[J]. Journal of ZheJiang University (Engineering Science), 2022, 56(1): 1-15.
[10] Xue-jiao LIU,Yi-dan YIN,Wei CHEN,Ying-jie XIA,Jia-li XU,Li-dong HAN. Secure data sharing scheme in Internet of Vehicles based on blockchain[J]. Journal of ZheJiang University (Engineering Science), 2021, 55(5): 957-965.
[11] WU Shi-hao, LUO Xiao-hua, ZHANG Jian-wei, TAN Zhi-tao. FPGA-based hardware implementation of new edge-directed interpolation algorithm[J]. Journal of ZheJiang University (Engineering Science), 2018, 52(11): 2226-2232.
[12] SHENG Nian-zu, LI Fang, LI Xiao-feng, ZHAO He, ZHOU Tong. Data capitalization method based on blockchain smart contract for Internet of Things[J]. Journal of ZheJiang University (Engineering Science), 2018, 52(11): 2150-2158.
[13] QIAN Liang-fang, ZHANG Sen-lin, LIU Mei-qin. Reservation-based MAC protocol for underwater wireless sensor networks with data train[J]. Journal of ZheJiang University (Engineering Science), 2017, 51(4): 691-696.
[14] LAN Fan, PAN Yun, YAN Xiao lang, HUAN Ruo hong, CHENG Kwang ting. GPU acceleration for network-on-chip yield evaluation[J]. Journal of ZheJiang University (Engineering Science), 2017, 51(1): 160-167.
[15] YANG Ting-jun, ZHU Bo, LIU Yu. Fast calibration algorithm for semi-immersive environment using improved vertex springs model[J]. Journal of ZheJiang University (Engineering Science), 2015, 49(4): 676-682.