Modern cryptographic protocols—ranging from Fully Homomorphic Encryption (FHE) to Post-Quantum Cryptography (PQC)—are notoriously computationally expensive. While GPUs offer the raw floating-point and integer throughput needed to handle these workloads, the primary bottleneck is rarely the arithmetic itself. Instead, performance is throttled by the "memory wall": the high cost of moving massive ciphertexts and large-degree polynomials between the GPU's global memory (VRAM) and its processing cores.
To overcome this, researchers have converged on a shared strategy: Kernel Fusion. By merging sequential cryptographic operations into a single execution unit, they keep intermediate data on-chip, transforming memory-bound bottlenecks into compute-bound speedups.
The Memory Bottleneck in Cryptography
In a traditional GPU implementation, a complex cryptographic pipeline is broken into discrete steps—such as sampling, polynomial multiplication, and modulus switching. Each step is a separate "kernel" that reads data from VRAM, performs a calculation, and writes the result back to VRAM.
As Jaiyoung Park and colleagues note in Toward Practical Privacy-Preserving Convolutional Neural Networks Exploiting Fully Homomorphic Encryption, memory bandwidth is a more critical bottleneck than raw compute power for FHE. When processing large polynomial matrices, the time spent waiting for data to travel across the memory bus often exceeds the time spent on the actual math. This is especially true for operations like the Number Theoretic Transform (NTT), where data movement patterns are irregular and frequent.
Solving the "Round-Trip" Problem
Kernel fusion eliminates these redundant "round-trips" to global memory. Instead of offloading intermediate results to VRAM, a fused kernel keeps that data in the GPU's fastest, on-chip storage: registers and shared memory.
Fusing Sequential Stages
In the context of the CRYSTALS-Kyber algorithm, Xinyi Ji and Jiankuo Dong demonstrated in HI-Kyber that fusing sampling and multiplication stages avoids the latency of repeated memory writes. By maintaining data locality, they achieved a 3.52× speedup over previous implementations. Similarly, Shiyu Shen applied this to CRYSTALS-Dilithium, leveraging on-chip registers to maintain locality during polynomial transforms, which are traditionally memory-bound.
Fusing Complex Sub-operations
For Homomorphic Encryption, the operations are even more granular. In cuXCMP, Hao Yang 0062 and Shiyu Shen 0001 fused automorphism and key switching into a single kernel. This ensures that intermediate data stays within the multiprocessor, reducing the pressure on memory bandwidth and making privacy-preserving decision trees practical for real-world use.
Beyond Latency: Memory Savings and Throughput
Kernel fusion does more than just save time; it saves space. In secure multi-party computation (MPC), Ye Dong and the MIZAR team showed that fusing cryptographic and arithmetic operations can reduce peak memory consumption by up to 50%. By avoiding the need for large intermediate buffers in VRAM, they prevent memory fragmentation, allowing researchers to run larger models or larger batches on the same hardware.
This efficiency is also vital for Private Information Retrieval (PIR). Maximilian Lam and Jeff Johnson 0004 found that fusing cryptographic evaluations directly with data lookup operations prevents the creation of massive intermediate vectors that would otherwise exceed the GPU's memory capacity (GPU-based Private Information Retrieval).
Hardware-Level Integration
The trend toward fusion is moving from software kernels into specialized hardware.
- Layer Merging: In PQNTRU, Kejie Huang describes a "layer merging" technique for NTT/FFT transforms that processes three layers of a mathematical tree as a single block, drastically reducing data movement between memory and registers.
- Full-Pipeline ASICs: Taking the concept to its logical conclusion, Alhad Daftardar and the creators of SZKP designed an ASIC that integrates the entire zero-knowledge proof pipeline on-chip. By eliminating the need to offload irregular tasks to a host CPU, they remove the communication bottlenecks that plague general-purpose architectures.
Why It Works: The Intuition of Locality
The success of these diverse papers—from hash-based signatures in GRASP to word-wise HE in work by Shiyu Shen 0001—rests on a single principle: the fastest data is the data that never moves.
By treating a cryptographic protocol not as a sequence of independent mathematical steps, but as a continuous flow of data through on-chip registers, these researchers have turned the "holy grail" of privacy-preserving computation into a high-performance reality.