[Paper Review] Medha: Microcoded Hardware Accelerator for computing on Encrypted Data
Medha is a programmable, microcoded FPGA-based hardware accelerator that enables efficient homomorphic evaluation on encrypted data using a flexible, scalable architecture. It achieves up to 78× speedup over optimized software (Microsoft SEAL) for large RNS-HEAAN parameter sets by leveraging parallel RNS polynomial arithmetic, on-chip memory, and a novel divide-and-conquer technique for supporting multiple polynomial degrees with a single hardware design.
Homomorphic encryption (HE) enables computation on encrypted data, and hence it has a great potential in privacy-preserving outsourcing of computations to the cloud. Hardware acceleration of HE is crucial as software implementations are very slow. In this paper, we present design methodologies for building a programmable hardware accelerator for speeding up the cloud-side homomorphic evaluations on encrypted data. First, we propose a divide-and-conquer technique that enables homomorphic evaluations in a large polynomial ring $R_{Q,2N}$ to use a hardware accelerator that has been built for the smaller ring $R_{Q,N}$. The technique makes it possible to use a single hardware accelerator flexibly for supporting several HE parameter sets. Next, we present several architectural design methods that we use to realize the flexible and instruction-set accelerator architecture, which we call `Medha'. At every level of the implementation hierarchy, we explore possibilities for parallel processing. Starting from hardware-friendly parallel algorithms for the basic building blocks, we gradually build heavily parallel RNS polynomial arithmetic units. Next, many of these parallel units are interconnected elegantly so that their interconnections require the minimum number of nets, therefore making the overall architecture placement-friendly on the platform. For Medha, we take a memory-conservative design approach and get rid of any off-chip memory access during homomorphic evaluations. Finally, we implement Medha in a Xilinx Alveo U250 FPGA and measure timing performances of the microcoded homomorphic addition, multiplication, key-switching, and rescaling for the leveled HE scheme RNS-HEAAN at 200 MHz clock frequency. For two large parameter sets, Medha achieves accelerations by up to 68x and 78x times respectively compared to a highly optimized software implementation Microsoft SEAL running at 2.3 GHz.
Motivation & Objective
- To address the performance bottleneck of homomorphic encryption (HE) in cloud computing by designing a high-speed, flexible hardware accelerator.
- To enable support for multiple HE parameter sets—including large polynomial degrees—using a single, reconfigurable hardware architecture.
- To eliminate off-chip memory access during homomorphic evaluations, improving latency and energy efficiency.
- To achieve high performance through deep parallelism in polynomial arithmetic and efficient interconnection of processing units.
- To provide a practical, prototype-validated accelerator that outperforms existing software and hardware solutions in real-world performance metrics.
Proposed method
- Proposes a divide-and-conquer technique to map computations in the larger ring $ R_{Q,2N} $ onto a hardware accelerator designed for the smaller ring $ R_{Q,N} $, enabling flexible support for multiple polynomial degrees.
- Designs a highly parallel RNS (Residue Number System) polynomial arithmetic unit (RPAU) with hardware-friendly algorithms for modular arithmetic and number-theoretic transforms (NTT).
- Interconnects multiple RPAUs using a ring-based topology that minimizes net count and improves placement efficiency on FPGA.
- Employs a memory-conservative architecture with on-chip memory to eliminate off-chip data transfers during key-switching and other operations.
- Implements a microcoded instruction set to enable programmability and support for diverse homomorphic operations like addition, multiplication, rescaling, and key-switching.
- Validates the design via a physical implementation on a Xilinx Alveo U250 FPGA at 200 MHz, measuring performance for large parameter sets.
Experimental results
Research questions
- RQ1How can a single hardware accelerator efficiently support multiple polynomial degrees in homomorphic encryption without redesign?
- RQ2What architectural techniques enable high parallelism and low interconnect overhead in RNS-based polynomial arithmetic units?
- RQ3Can off-chip memory access be eliminated during key-switching in large-parameter HE schemes through on-chip memory optimization?
- RQ4To what extent can a microcoded, programmable accelerator outperform highly optimized software implementations in real-world HE workloads?
- RQ5How does the performance of a prototype FPGA accelerator compare to prior ASIC and FPGA-based HE accelerators in terms of latency and throughput?
Key findings
- Medha achieves up to 68× and 78× speedup over Microsoft SEAL (running at 2.3 GHz) for RNS-HEAAN parameter sets $ ( ext{log } Q, N) = (438, 2^{14}) $ and $ (546, 2^{15}) $, respectively.
- The accelerator supports polynomial degrees $ 2^{14} $ and $ 2^{15} $ using a single hardware design, enabled by a novel divide-and-conquer technique for ring mapping.
- Key-switching operations are completed entirely on-chip without any off-chip memory access, even for large parameters, due to a memory-conservative design.
- Medha achieves nearly 2.37× lower latency than the block-pipelined hardware accelerator HEAX for the $ (438, 2^{14}) $ parameter set.
- The FPGA prototype demonstrates that hardware acceleration can deliver high performance without sacrificing programmability or flexibility.
- The authors project a 5–10× further performance improvement is feasible in an ASIC-optimized version of Medha.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.