Homomorphic encryption, a ‘privacy-preserving’ technique, allows computation directly on the encrypted data. However, this encryption technique faces significant performance and programmability challenges.
Researchers from Facebook, New York University, and Stanford University have created a synthesising compiler caller Porcupine to unleash the true potential of homomorphic encryption technique. This compiler can translate plain text to encrypted code on the go.
The team claimed the compiler had increased the processing speed by 51 percent compared to hand-optimised and heuristic-driven code.
What Is Homomorphic Encryption
The first step while working with encrypted data is decryption. However, it leaves the data vulnerable to attack, defeating the very purpose of encryption. In such a case, an ideal solution would be to have a system that could process information without compromising privacy and security.
Dr Craig Gentry, the creator of the first Fully Homomorphic Encryption scheme, compares the technique a glovebox, a sealed container where you can put your hands to work the material inside, but can’t take anything out of it.
Homomorphic encryption is beneficial when data needs to be outsourced to cloud environments and other partners for research and analytics purposes. The encryption technique makes it possible to analyse data without jeopardising the privacy and have applications in financial services, healthcare, and information technology. Unlike other modern encryption models, the technique doesn’t yield to the decryption bids of quantum computers.
That said, homomorphic encryption has its share of shortcomings. The technique, being a slowpoke, is not practical in many applications. Plus, several performance overheads and compilation challenges stand in the way of its widespread adoption.
How Does Porcupine Help?
Many scientists are working towards fixing the drawbacks of homomorphic encryption technique. However, not much work has been done in the automatic compilation of homomorphic encryption kernels.
On a broader scale, homomorphic encryption has three major compilation challenges:
- It supports only a limited set of a single instruction, multiple data (SIMD)-type operators
- It uses long-vector operands
- If the ciphertext noise growth is not controlled, it may result in the failure of the decryption process.
In this encryption technique, a programmer is first required to break the input kernel into SIMD addition, multiplication, and rotation instructions. This makes kernel implementation complex. Currently, these kernels are handwritten by experts, making it difficult to scale up. As a result, there is a need for automated compiler support for privacy-preserving computation.
To overcome the challenges, the team has presented an optimising compiler Porcupine. Given a plaintext code, Porcupine automatically synthesises a homomorphic encryption code using a component called Quill. This component helps search for ‘verifiably correct’ kernels and minimises kernel’s costs such as latency and noise accumulation. With Porcupine and Quill, we get a synthesis procedure that automates the mapping and scheduling process of plaintext kernels to the homomorphic encryption instructions.
The Porcupine compiler was tested using a range of image processing and linear algebra problems. This compiler was evaluated using nine kernels to demonstrate that it could successfully translate plain text specification to homomorphic encryption-equivalent implementations. It was found that, over the handwritten-baselines, Porcupine delivered 51 percent faster with a geometric mean of 11 percent across the test kernels.
For smaller programs, Porcupine was able to find the same optimised implementation as the handwritten ones. For larger and complex programs, Porcupine could discover application-specific optimisation involving separable filters.
By automating the tasks, Porcupine frees up application designers to focus on other priorities. The researchers believe the homomorphic encryption technique is a rapidly developing area with a lot of scope for improvements, including enhancing compilation infrastructures such as Porcupine.
Read the full paper here.