In the era of cloud computing and increasingly interconnected systems, protecting sensitive data during computation remains one of the toughest challenges in cryptography. While traditional encryption methods protect data at rest and in transit, they fall short during processing – when data must typically be decrypted and is thus exposed to potential leaks or attacks.
Fully Homomorphic Encryption (FHE) offers a powerful alternative: it allows computations directly on encrypted data, eliminating the need to ever decrypt sensitive information. The catch? FHE is notoriously slow, resource-intensive, and expensive.
To manage these tradeoffs, developers often apply FHE selectively – only on targeted, critically-important parts of their system. But that presents a new challenge: Not all FHE programs are created equal. Performance, memory usage, supported operations, and even basic feasibility can vary dramatically depending on the underlying scheme and target application.
Enter Dioptra, a new open-source tool released by Galois to help developers navigate this complexity. Built for programs written using the OpenFHE Python wrapper, Dioptra estimates time and memory usage. It also allows users to calibrate the tool against specific hardware, enabling performance predictions tailored to the actual systems where the code will run.
“It’s a big, multidimensional tradeoff space,” explained Galois research engineer James LaMar. “Some schemes are more efficient at doing some things than others.”
Until now, evaluating FHE program performance meant labor-intensive trial and error: running different FHE programs, collecting performance data, and manually comparing results. The process could take weeks or months, with significant cost in both time and compute.
Dioptra streamlines this process. Its performance models and comparative analysis help developers make smarter decisions faster – reducing effort, cost, and uncertainty.
And that’s not all.
Dioptra also helps debug performance issues in FHE code. This feature is especially important when translating regular, non-secure algorithms into secure, cryptographic algorithms. Not all algorithms that are fast and efficient in a non-secure space translate well to FHE.
“Imagine a software engineer writes an amazing piece of code, only to find that it takes forever to run,” said Galois research engineer Rawane Issa. “Dioptra can analyze the program and pinpoint exactly which line of code is causing the slowdown.”
By identifying issues at the code level, Dioptra doesn’t just help you choose the right FHE approach, it helps you quickly and effectively improve your FHE programs.
While Dioptra is already extremely useful and user-friendly, the team sees even more potential. Potential future features include:
Dioptra is open source and ready to use. Explore it now on the Dioptra Github page.