Skip to main content
QUICK REVIEW

[Paper Review] Efficient Modular Arithmetic for SIMD Devices

Wilke Trei|arXiv (Cornell University)|Oct 10, 2013
Numerical Methods and AlgorithmsComputer Science3 citations
TL;DR

This paper presents algorithmic optimizations for efficient modular arithmetic on SIMD devices, particularly GPUs, using OpenCL. It achieves a new record of over 3 billion 192-bit modular multiplications per second on a single desktop system with consumer-grade GPUs, significantly accelerating cryptographic workloads like the Elliptic Curve Method (ECM) for integer factorization.

ABSTRACT

This paper describes several new improvements of modular arithmetic and how to exploit them in order to gain more efficient implementations of commonly used algorithms, especially in cryptographic applications. We further present a new record for modular multiplications per second on a single desktop computer as well as a new record for the ECM factoring algorithm. This new results allow building personal computers which can handle more than 3 billion modular multiplications per second for a 192 bit module at moderate costs using modern graphic cards.

Motivation & Objective

  • To improve the efficiency of modular arithmetic on SIMD architectures, especially for cryptographic applications.
  • To overcome performance bottlenecks in GPU-based modular arithmetic, such as divergent branching and memory pressure.
  • To break existing records in modular multiplication throughput on single-desktop systems using commodity GPUs.
  • To enable high-throughput ECM factorization by optimizing low-level arithmetic and memory access patterns on GPUs.

Proposed method

  • Leverages OpenCL to implement highly parallelized modular arithmetic kernels targeting GPU stream cores.
  • Applies a novel carry-select adder design to reduce critical path delay in multi-precision modular arithmetic.
  • Optimizes register usage and avoids synchronization between threads to maximize parallelism on SIMD units.
  • Introduces a modular reduction technique that minimizes data dependencies and improves instruction-level parallelism.
  • Uses a 124-register-per-thread model on AMD GPUs to support up to 510-bit arithmetic with careful scratch space management.
  • Employs a hybrid approach combining Montgomery reduction with optimized word-level operations for 192-bit moduli.

Experimental results

Research questions

  • RQ1How can modular arithmetic be optimized for high-throughput execution on SIMD GPU architectures?
  • RQ2What are the key performance bottlenecks in GPU-based modular multiplication, and how can they be mitigated?
  • RQ3To what extent can algorithmic improvements in modular reduction and carry propagation increase throughput on consumer GPUs?
  • RQ4Can a single desktop system achieve over 3 billion 192-bit modular multiplications per second using commodity GPUs?
  • RQ5How do architectural features like register count and memory hierarchy affect the performance of modular arithmetic kernels on GPUs?

Key findings

  • The authors achieved a new record of 846.2 million 192-bit modular multiplications per second on an AMD Radeon HD 5870 GPU.
  • The optimized implementation achieved 11.2% higher throughput compared to the baseline, with minimal code changes.
  • Using two AMD Radeon HD 5870 GPUs in a single system, the throughput reached approximately 3 billion modular multiplications per second.
  • The system cost was under $2000, including two $700 GPUs and peripheral components, making high-performance factorization accessible.
  • The implementation outperformed previous records by a factor of 2.64 in performance-per-dollar ratio compared to earlier systems.
  • The method enables breaking the 1 billion modular multiplication per second barrier for 192-bit moduli on a single GPU, with potential for further scaling.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.