MITB Banner

Porcupine: A Compiler That Translates Plain Text To Encrypted Code On The Go

Share

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.

Wrapping Up

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.

Share
Picture of Shraddha Goled

Shraddha Goled

I am a technology journalist with AIM. I write stories focused on the AI landscape in India and around the world with a special interest in analysing its long term impact on individuals and societies. Reach out to me at shraddha.goled@analyticsindiamag.com.
Related Posts

CORPORATE TRAINING PROGRAMS ON GENERATIVE AI

Generative AI Skilling for Enterprises

Our customized corporate training program on Generative AI provides a unique opportunity to empower, retain, and advance your talent.

Upcoming Large format Conference

May 30 and 31, 2024 | 📍 Bangalore, India

Download the easiest way to
stay informed

Subscribe to The Belamy: Our Weekly Newsletter

Biggest AI stories, delivered to your inbox every week.

AI Forum for India

Our Discord Community for AI Ecosystem, In collaboration with NVIDIA. 

Flagship Events

Rising 2024 | DE&I in Tech Summit

April 4 and 5, 2024 | 📍 Hilton Convention Center, Manyata Tech Park, Bangalore

MachineCon GCC Summit 2024

June 28 2024 | 📍Bangalore, India

MachineCon USA 2024

26 July 2024 | 583 Park Avenue, New York

Cypher India 2024

September 25-27, 2024 | 📍Bangalore, India

Cypher USA 2024

Nov 21-22 2024 | 📍Santa Clara Convention Center, California, USA

Data Engineering Summit 2024

May 30 and 31, 2024 | 📍 Bangalore, India