Homomorphic Encryption Could Fix The Gaps In Our Data Security

Blog Post
Shutterstock.com / NicoElNino
Sept. 1, 2020

When you bank online, encryption plays a major role in keeping your data secure. Your connection to the bank’s site and the data that is sent back and forth are secured by encryption (via HTTPS). The bank can also store your information securely in an encrypted database. However, to actually conduct a transaction and adjust your account balance, the bank needs to temporarily decrypt the data they hold, putting your information at risk. Across industries and online services, encryption "gaps" like this one are a significant vulnerability. However, these gaps could potentially be plugged by an emerging technique known as homomorphic encryption, which provides the surprising ability to perform computations on encrypted data without ever decrypting the data.

Processing data without having to reveal the underlying information has been a goal of cryptographers for decades. Like some other “new” encryption techniques that we’ve written about lately—secure multiparty computation and zero-knowledge proofs—homomorphic encryption has actually been around for quite some time as a theoretical idea—dating back to the late 1970’s. Only recently have advances in research and lower costs of computing power allowed it to emerge as a practical possibility.

Homomorphic encryption comes in a few different types, which progressively require more computing power to process the math involved. Somewhat Homomorphic Encryption (SHE) allows some operations to be performed on the encrypted data for a limited time. Partial Homomorphic Encryption (PHE) is restricted to only one operation but can be repeated as many times as needed. With Fully Homomorphic Encryption (FHE), any mathematical operation can be performed any number of times.

In 2009, computer scientist Craig Gentry provided the cryptography breakthrough that made FHE possible. It still requires a huge amount of processing power, and we’re a ways off from being able to use it to, say, encrypt all of the computations that happen in the cloud. But, as the cost of processing power has come down, the use of homomorphic encryption for targeted cases has become possible, such as in potentially protecting electronic voting. ElectionGuard, a system that tallies encrypted votes homomorphically, was test piloted recently in Wisconsin. While ElectionGuard promises officials the ability to conduct a public audit and permits individuals to verify that their votes end up in the final tally, homomorphic encryption ensures that no one can tell how a person voted.

Beyond securing transactional data, homomorphic encryption could play a key role in our ability to share data for research purposes that we’re rightly wary of sharing today. Sensitive health and financial data could be made available to researchers for analysis in a highly secure way, rather than what is often done now: decrypting and then attempting to anonymize the data. Gentry used an analogy of a jeweler who wants their employees to assemble raw diamonds into finished products, but is worried about theft. The jeweler assembles locked boxes accessible by gloves that reach inside the box, with the raw materials (and whatever necessary tools) inside. The employee can work with the raw materials, but only the jewer can unlock the box and retrieve the finished gems. Similarly, third-party researchers could manipulate and analyze homomorphically encrypted data, but be unable to view or download personal or sensitive information. Only the holder of the encryption keys could ultimately “retrieve” the outcomes of analyses and provide the unencrypted results to the researchers (or internally at an organization, or directly with the public).

More on the math

Homomorphic encryption takes its name from, and is based on, a mathematical property known as a homomorphism—two groups of equations that both satisfy the same algebraic structure. Consider a simple equation A:

g x h = i

The structure of that equation can then be mirrored in B, by performing some function f on both g and h:

f(g) x f(h) = f(g x h)

It was a 1978 paper by researchers Rivest (the “R” in the widely used “RSA” encryption), Adleman, and Dertouzos at MIT that proposed the idea of “privacy homomorphs” in which the functions of B are encryption functions, such that:

Enc(g) + Enc(h) = Enc(g x h)

A concrete example might help make this clearer. Continuing with our equation A of g x h = i, we can use the math fact that g² x h² will always equal (g x h)² to create a (not very secure) “encryption” function for a homomorphic group B of raising to the power of 2. Plugging in some actual numbers:

Equation A: 2 x 3 = 6
Equation B: 2² x 3² = 36

To “decrypt” B, we take the square root of 36 and get the same answer as A: 6.

Due to its complexity, homomorphic encryption has so far primarily been the domain of math and cryptography PhDs. But projects like Microsoft’s SEAL are creating libraries that can allow non-experts to apply it in limited cases, enabling software engineers to build homomorphically encrypted computation services for certain data. As these libraries continue to develop, use cases will likely also increase.

If homomorphic encryption becomes increasingly prevalent in applications and systems, it could change how we think about using sensitive data for research and other purposes. Data would not be exposed during processing, and sharing of data could occur without adding new personal information (only computational results) to an organization’s data holdings. Homomorphic encryption might also save us from the “crypto-apocalypse”—the potential that quantum computing could one day break most of our existing encryption schemes. Cryptographers report that some of the extremely difficult math problems that can be used for homomorphic encryption seem to be secure against even quantum attacks.

As awareness of homomorphic encryption increases and the cost of the computing power it requires decreases, it won’t just be of benefit in making things like banking transactions and electronic voting more secure. This technology could prove transformational for data privacy and security.

Related Topics
Encryption Cybersecurity