Author: 0xTodd, co-founder of Ebunker

The market has been bad recently, and I finally have some time to continue sharing some new technical routes. Although the encryption market in 2024 is not as turbulent as in the past, there are still some new technologies trying to mature, such as the topic we are going to talk about today: "FHE / Fully Homomorphic Encryption".

V God also published an article specifically about FHE in May this year, and recommends it to friends who are interested.

So what exactly is FHE?

To understand the difficult term FHE (fully homomorphic encryption), you must first understand what "encryption" is, what "homomorphic" is, and why "full" is needed.

1. What is encryption?

Ordinary encryption is the most familiar to everyone. For example, Alice wants to send a message to Bob, such as "1314 520".

If we want a third party C to send the message and keep the information confidential, it is very simple - just encrypt each number by x2, for example, to "2628 1040".

When Bob received it, he divided each digit by 2 and decrypted it to find out that Alice was saying "1314 520".

See, the two people completed the information transmission through symmetric encryption, without asking C to help but without C knowing the information. Generally, in spy movies, the communication between two liaisons will not exceed this scope.

2. So what is homomorphic encryption?

Now Alice's requirements have become more difficult:

  • For example, Alice is only 7 years old;

  • Alice can only do simple arithmetic such as x2 and ÷2, and knows nothing about other operations.

OK, now let's assume that Alice has to pay her electricity bill. Alice's monthly electricity bill is 400 yuan, and she has been in arrears for a total of 12 months.

However, 400*12= how many? This problem is beyond the calculation range of Alice, who is only 7 years old. She cannot do such complicated calculations.

However, she doesn’t want others to know how much/how many months her electricity bill is because it is sensitive information.

Therefore, Alice asks C to help with the calculation without trusting C.

Because she only knew x2 ÷2, she used x2 multiplication to simply encrypt her number. Then she told C to calculate what 800x24= is, which is: (400x2) times (12x2).

C is an adult with a strong computing brain. He quickly calculated 800*24=19200 and told Alice the number. Then, Alice added the result, which is 19200÷2÷2, and soon realized that she had to pay 4800 yuan for water.

Did you see it? This is the simplest multiplication homomorphic encryption. 800*24 is just a mapping of 400*12. The shape before and after the transformation is actually the same, so it is called "homomorphic".

This encryption method makes it possible for someone to entrust an untrusted entity to calculate the results while ensuring that their sensitive numbers are not leaked.

3. Then why does “homomorphic encryption” need to be “complete”?

However, this is just a problem in an ideal world. Problems in the real world are not that simple. Not everyone is 7 years old, or as honest as C.

Let's assume a very bad situation, for example, C may try to reverse the process, and C can also decipher that Alice wants to calculate 400 and 12 through brute force.

At this time, "fully homomorphic encryption" is needed to solve the problem.

Alice multiplies each number by 2, and this 2 can be regarded as noise. If the noise is too small, it is easy for C to crack it.

Therefore, Alice can introduce an addition based on multiplication.

Of course, it would be best if the noise was like a main road intersection at 9 a.m., in which case cracking C would be harder than climbing to the sky.

Therefore, Alice can multiply it 4 times and add it 8 times, which greatly reduces the probability of C being cracked.

However, Alice is still only "partially" homomorphically encrypted, that is:

Her encrypted content can only address certain parts of the problem;

She can only use a certain subset of operations because the number of additions and multiplications cannot be too many (usually no more than 15).

"Full" means that Alice should be allowed to perform addition encryption and multiplication encryption any number of times for a polynomial, so that a third party can be entrusted to complete the calculation and the correct result can be obtained after decryption.

A super long polynomial can express almost all mathematical problems in the world, not just problems that 7-year-olds can solve, such as calculating electricity bills.

Coupled with any number of encryptions, it is almost impossible for C to snoop on private data, truly achieving "both".

Therefore, the technology of "fully homomorphic encryption" has always been a jewel in the holy grail of cryptography.

In fact, homomorphic encryption technology only supported "partial homomorphic encryption" until 2009.

The new idea proposed by Gentry and other scholars in 2009 opened the door to the possibility of fully homomorphic encryption. Interested readers can also refer to this paper.

Many friends are still confused about the application scenarios of this technology. In what scenarios will the fully homomorphic encryption (FHE) technology be needed?

For example - AI.

As we all know, a powerful AI needs enough data to be fed, but the privacy value of a lot of data is too high. So can FHE achieve both?

The answer is yes.

you can:

  • Encrypt your sensitive data using FHE;

  • Use the encrypted data for AI calculation;

  • Then the AI ​​spits out a bunch of gibberish that no one can understand.

Unsupervised AI can achieve this because the data is essentially vectors. AI, especially generative AI such as GPT, does not understand the words we input to it at all. It just "predicts" the most appropriate answer through the vector.

However, since this mess of code follows some mathematical rules, and you are the one who encrypted it, then:

  • You can disconnect from the network and decrypt the gibberish locally, just like Alice did;

  • Furthermore, you have achieved the following: AI uses its massive computing power to help you complete the calculation without having to touch your sensitive data at all.

But today’s AI cannot do this, and it must give up privacy. Think about everything you input to GPT in plain text! To achieve this, FHE is indispensable.

This is the root of the natural fit between AI and FHE, which can be summed up in one word: both.

Since FHE is linked to AI and spans the two major fields of encryption and AI, it naturally receives extra favor. There are many FHE projects, such as Zama, Privasea, Mind Network, Fhenix, Sunscreen, etc., and the application directions of FHE are also creative.

Today, I will analyze one of the projects, @Privasea_ai, which is a FHE project led by Binance. Its white paper describes a very relevant scenario, such as face recognition.

  • Both: the machine computing power must be able to determine whether this person is a real person;

  • Another requirement: The machine does not handle any sensitive facial information.

The introduction of FHE can effectively solve this problem.

However, if you really want to do FHE calculations in the real world, you need a huge amount of computing power. After all, Alice needs to do "arbitrary" addition and multiplication encryption. Whether it is calculation, encryption, or decryption, it is a process that consumes a lot of computing power.

Therefore, Privasea needs to build a powerful computing network and supporting facilities. Therefore, Privasea proposed a PoW+PoS network architecture to solve the problem of computing network.

Recently, Privasea just announced its own PoW hardware, called WorkHeart USB, which can be understood as one of the supporting facilities of Privasea's computing power network. Of course, you can simply understand it as a mining machine.

The initial price is 0.2 ETH, which is capable of mining 6.66% of the network’s total tokens.

There is also a PoS-like asset called StarFuel NFT, which can be understood as a "work certificate", with a total of 5,000.

The initial price is also 0.2 ETH, which allows users to receive 0.75% of the total tokens of the network (through airdrop).

This NFT is also interesting. It is similar to PoS, but not true PoS. It tries to avoid the question of "Is PoS a security in the United States?"

This NFT supports users to pledge Privasea tokens into it, but it does not directly generate PoS income. Instead, it doubles the mining efficiency of your bound USB device, so it is a disguised PoS.

Back to the topic, if AI can really popularize FHE technology on a large scale, it will be a blessing for AI itself. You know, many countries now focus on data security and data privacy in regulating AI.

Even, to give an inappropriate example, in the Russia-Ukraine war, some Russian military personnel tried to use AI, but considering the American background of a large number of AI companies, the intelligence agencies would probably be riddled with holes.

But if we don’t use AI, we will naturally fall behind. Even if the gap is not big now, in another 10 years, we may not be able to imagine a world without AI.

Therefore, data privacy is everywhere in our lives, from major issues such as war and conflict between two countries to minor issues such as facial unlocking on mobile phones.

In the era of AI, if FHE technology can truly mature, it will undoubtedly be the last line of defense for mankind.