A Compiler-Like Framework for Optimizing Cryptographic Big Integer Multiplication on GPUs
With the growth of digital data and rising security concerns, techniques for privacy-preserving computation have become increasingly essential. Big integer multiplication, pivotal for these applications, is compute-intensive but poses challenges for GPU acceleration due to its complexity and the need for application-specific tailored implementations. This paper presents IMCompiler, a compiler-like framework that automatically gen-erates optimized GPU kernels for integer multiplications used in cryptosystems. It features a frontend-IR-backend structure, where the Intermediate Representation (IR) employs a segmented integer multiplication algorithm to decouple architecture-specific optimizations from high-level parameters. The frontend can then easily translate integer multiplication with various high-level parameters into the IR, while the backend focuses on fine-tuning a single GPU kernel for each device, enabling automatic code generation. Moreover, we introduce a computation diagram to facilitate the analysis of parallelization strategies, inspiring many optimizations, including two-dimensional parallelization, tailored caching strategy, index transposing, and lazy carrying. Experiments show that IMCompiler achieves a 4.47× speedup compared to the widely used baseline and 1.42 × over Nvidia's official library. The speedup will be even higher for larger integers and higher-capacity GPUs.
Authors
- Zhuoran Ji (ORCID: https://orcid.org/0000-0001-9767-2767)
- Shoumeng Yan (ORCID: https://orcid.org/0009-0007-9580-5395)
- Jiming Xu (ORCID: https://orcid.org/0000-0003-4291-9018)
- Lei Ju (ORCID: https://orcid.org/0000-0001-6186-5399)
- Jianyu Zhao (ORCID: https://orcid.org/0000-0001-9818-4167)
- Zhaorui Zhang (ORCID: https://orcid.org/0000-0003-0284-1113)
Institutions
- Hong Kong Polytechnic University (HK)
- Peng Cheng Laboratory (CN)
- Shandong University of Science and Technology (CN)
Publication Details
- Published
- 2024-11-02
- DOI
- https://doi.org/10.1109/micro61859.2024.00036
- Citations
- 1
- Primary Topic
- Cryptography and Residue Arithmetic
- Type
- article
- Field-Weighted Citation Impact
- 0.78
Funders
- National Natural Science Foundation of China