21 Analytics logo
Request a Demo
inner blog-Spirals-Homomorphic-Encryption

Spiral’s Homomorphic Encryption: the Future of Privacy?

01 Nov, 2022

Privacy is a tricky thing. Easy to lose, hard to get back. It is common knowledge that you should not publish a Bitcoin address you control. Nor should you reuse the same address twice. But there are many more ways in which you can adversely affect your privacy. This holds for individuals but, to an even greater extent, companies.

Today I was delighted to read about Spiral. Software-as-a-Service is a great thing. Almost all software is run by someone else for you to use. Sometimes even free of charge. That does mean you are the product. And there’s the rub. To what extent are you willing to trade away your privacy in exchange for service? Even if you pay for a service, there’s no guarantee you are not also giving away your privacy. VPN providers are a nice example. Many will tell you they don’t store user information. But who’s to say that is true?

Enter Spiral. In their own words: “A database that cannot learn which rows you read.” They claim that they can run a database for you that you can query and that they do not know what you have searched for.

This sounds like magic, and in many ways, it is. To quote my favourite sci-fi author Arthur C. Clarke: “Any sufficiently advanced technology is indistinguishable from magic.”

How Does Homomorphic Encryption Work?

Normally I’m highly skeptical about these kinds of claims. But this time, there might be something to it. Spiral uses homomorphic encryption, a relatively new technology that has a lot of promise. A promise partly fulfilled! It works like this: Imagine you want to calculate the result of the super secret equation “1 + 2”. You don’t have the resources to do that, and you want someone else to do that for you. You could give it to me, but then I would learn about your super secret equation. Homomorphic encryption fixes that for you! You can encrypt “1” and “2” and give me the encrypted versions and tell me to sum it.

Here’s the kicker: I can now calculate the result without learning either the inputs or the result! I then give you back the encrypted result that you can then decrypt. If this isn’t magic, I don’t know what is.

Of course, my little example is silly. For a long time, homomorphic encryption was mainly academic and confined to these types of examples. But steady progress makes it more practical. Spiral is an example thereof. 

What Are the Drawbacks of Homomorphic Encryption?   

That is not to say that homomorphic encryption is without drawbacks. In fact, the shortcomings are significant. For example, performing operations on the (encrypted) data is much slower. Spiral mentions a 1.9x increase in costs when streaming video. The data exchanged, as a rule, is also much larger. Spiral’s Wikipedia search engine uploads 18MB of data in the first query (but much less on subsequent queries). This used to be much worse. For certain applications, the tradeoffs might be worth it now.

Spiral runs a block explorer for anyone to query. You enter a Bitcoin address, which returns the balance held by that address. This is an excellent example of a situation where you (or your company) would want to maintain privacy. A popular block explorer like Blockchair knows who (or what IP address) is interested in certain addresses. How often do they check, and when?

Another example that I would like to see implemented is a private on-chain analytics tool. All VASPs rely on firms like Coinfirm to tell them about the risk associated with a particular address. Chainalysis is known to have close ties with the American government. It is not always desirable to let them know in what addresses you are interested. Solutions like Cheksy address this issue but via a detour.

Written by:
Harm Aarts
Senior Software Engineer
Just like our Travel Rule solution, our website also respects your privacy. That is why we don't use any tracking cookies.
Ok, nice!