An Efficient Block Cipher Implementation on Many-Core Graphics Processing Units

Sangpil Lee, Deokho Kim, Jaeyoung Yi, Won Woo RoJ. Inf. Process. Syst 2012 · DOI

Introduction

As network speeds approach the 10–100 Gbps range, the computational overhead of data encryption and decryption has become a significant bottleneck. Traditional CPUs often struggle to maintain these line rates in real-time. While Field-Programmable Gate Arrays (FPGAs) offer high performance, they are difficult to program and lack the flexibility of software. This research explores the use of modern Graphics Processing Units (GPUs) as high-performance, flexible cryptographic coprocessors, specifically optimizing the SEED block cipher.

The SEED Algorithm

SEED is a 128-bit block cipher standard in South Korea, characterized by a 16-round Feistel structure. Each round processes 64-bit halves of the data block using a complex function and round keys.

The 16-round Feistel structure of the SEED block cipher.

The sequential nature of the 16 rounds within a single block makes internal parallelization difficult. To achieve high throughput, the researchers focused on data-level parallelism across many blocks simultaneously.

GPU Implementation and Optimization

The implementation utilizes NVIDIA's many-core architecture. By assigning each 128-bit data block to a unique GPU thread, thousands of blocks can be processed in parallel across the Streaming Multiprocessors (SMs).

NVIDIA GPU architecture overview, highlighting the Streaming Multiprocessor (SM) components.

Key optimizations included:

  • Memory Coalescing: Using the __align(16)__ qualifier to ensure efficient 128-bit data transfers between global memory and cores were coalesced into single instructions.
  • Constant Cache Utilization: Storing S-boxes (lookup tables) and round keys in the constant cache, which is optimized for cases where all threads in a warp read the same memory address.
  • Optimal Occupancy: A critical discovery was that high thread occupancy led to "warp serialization" due to constant cache access limits. Counter-intuitively, limiting each SM to a single thread block improved performance by 68.7% by reducing memory contention.

Performance Results

The implementation was verified against KISA standard test vectors. On an NVIDIA GTX285, the implementation achieved a peak throughput of 9.5 Gbps. This performance significantly outpaces other platforms:

  • 4.75x faster than an 8-core Intel Xeon CPU (2.0 Gbps).
  • 48% faster than a high-performance Xilinx Virtex-V FPGA (6.4 Gbps).

Conclusion and Future Work

This work demonstrates that GPUs can serve as highly efficient cryptographic accelerators, outperforming both high-end CPUs and specialized FPGA hardware. While the constant cache remains a bottleneck, future optimizations could involve using shared memory for S-boxes. Further research will also explore different cipher modes (like CBC or GCM) and the 256-bit version of SEED to meet evolving security needs.

Summary updated

BibTeX
@article{lee2012efficient,
  author = {Sangpil Lee and Deokho Kim and Jaeyoung Yi and Won Woo Ro},
  title = {{An Efficient Block Cipher Implementation on Many-Core Graphics Processing Units}},
  journal = {J. Inf. Process. Syst.},
  year = {2012},
  doi = {10.3745/jips.2012.8.1.159},
}
Figure