IBM's homomorphic encryption accelerated to run 75 times faster

It lets you work on encrypted data without taking it to plaintext and back again

By Richard Chirgwin

Posted in Security, 8th March 2018 05:55 GMT

IBM has rewritten its C++ homomorphic encryption library and claims it now goes up to 75 times faster.

Homomorphic encryption is a technique used to operate on encrypted data without decrypting it. This would make sensitive operations much more secure: for example, companies could encrypt their cloud-hosted databases, and work on them without converting records back to plaintext.

IBM has worked on homomorphic encryption for some time, and released the first version of its HElib C++ library three years ago, but as we reported in 2016, the technology has always suffered huge performance penalties.

IBM's first attempts at homomorphic encryption, under the hand of its inventor Craig Gentry, ran “100 trillion times” slower than plaintext operations. It later accelerated by a factor of two million times, running on a 16-core server.

Microsoft researchers smash homomorphic encryption speed barrier


Hence Big Blue's ongoing work on HElib. Released at GitHub, the latest version gets its performance kick from a “re-implementation of homomorphic linear transformations”, making it between 15 and 75 times faster.

In this paper at the International Association for Cryptologic Research, IBM's Shai Halevi and Victor Shoup (the latter also with New York University) explain how they improved speed.

“In the linear transformation algorithms currently implemented in HElib, the bulk of the time is spent moving data among the slots in the encrypted vector,” they wrote.

This is done with “special automorphisms” (a mathematical operation that maps an object to itself), and the computational cost comes from how many times the automorphisms have to loop around.

“The main cost of applying such an automorphism to a ciphertext is actually that of “key switching”: after applying the automorphism to each ring element in the ciphertext (which is actually a very cheap operation), we end up with an encryption relative to the “wrong” secret key; by using data in the public key specific to this particular automorphism — a so-called “key switching matrix” — we can convert the ciphertext back to one that is an encryption relative to the “right” secret key” the paper said.

“So the main goals in improving performance are to reduce the number of automorphisms, and to reduce the cost of each automorphism.”

In more accessible English, the new library implements a new strategy for calculating those automorphisms (achieving between 15 and 20 times speedup); the researchers refactored many of the necessary computations; and some of the calculations are shifted out of the library's main loop (getting a 6-8 times speedup).

The way public keys are constructed for homomorphic encryption is also expensive because of the aforementioned key-switching matrix. Each matrix adds several megabytes to the public key, and in HElib there could be several hundred such matrices in a public key. The researchers say for common operations, they were able to cut the size of the matrix by 33-50 per cent.

HElib is still a research-level project. As stated on the GitHub page: “At its present state, this library is mostly meant for researchers working on HE and its uses. Also currently it is fairly low-level, and is best thought of as 'assembly language for HE'. That is, it provides low-level routines (set, add, multiply, shift, etc.), with as much access to optimisations as we can give. Hopefully in time we will be able to provide higher-level routines.” ®

Sign up to our NewsletterGet IT in your inbox daily


More from The Register

Raspberry Pi foundation merges with CoderDojo Foundation

Two coding-for-kids orgs already overlapped, now plan joint acceleration

Arecibo spared the axe: Iconic observatory vital to science lives on

NSF approves plan to keep Puerto Rico facility operational after hurricane trashed it

National Museum of Computing rattles the bucket: Help shift war-winning proto-puter

Updated Campaign to move a Bombe into historic Block H

IBM leads BigInsights for Hadoop out behind barn. Shots heard

Data analytics platform sunset in December, but enterprise version spared

National Audit Office report blasts's 'muddled' STEM strategy

More people have skillz, but not in fields that need them

Israel gets spooky with national quantum lab

Plan is to spin up single photons as a comms medium

Big Blue's big blunder: IBM accidentally hands over root access to its data science servers

Private Docker Swarm keys leak into public containers

Worst-case Brexit could kill 92,000 science, tech jobs across UK – report

No-deal predicted to lop £46.8bn off Blighty investment

Brexit has shafted the UK's space sector, lord warns science minister

We're off the team and everything is awful

Hortonworks feathers nest with IBM deal

IBM BigInsights users migrating to Hadoop-flinger’s HDP