Live data from Hacker News

Fully homomorphic encryption and the dawn of a private internet

bozmen.io

191–200 of 202 posts

Re: Fully homomorphic encryption and the dawn of a private internet

#192
post #69

Earlier quoted context omitted.

In the case of searching Google, E(x) is the encrypted query and y is Google's database. Can you compute E(x + y) without doing at least as much work as computing E(y)? I don't think so. Instead, you use public key cryptography so that the server can compute E(y) (yes, encrypting the entire database) without being able to decrypt D(E(x)) = x.

Wrong. In the case of searching, the database is the function that you feed the input query into. E.g. consider the following system: E(x) = x ^ k, D(x) = x ^ k So a one-time pad. Let's say that I provide a service that lets you decide whether a number is even or odd: IsOdd(E(x)) = E(x) mod 2 You give it an encrypted number, and it gives you back an encrypted bit that you can decrypt to see if the original number was…

> IsOdd(E(x)) = E(x) mod 2

I don't get this. Did you mean

IsOdd(E(x)) = x mod 2

But who provides such function? In the case of a web search,the function is the search engine. I expect Google to provide it, not the user: the refinement and completeness level of its engine is the only reason to choose Google over its competitor. If I have to provide the function, then I'm only buying the compute power from them.

Re: Fully homomorphic encryption and the dawn of a private internet

#193

Earlier quoted context omitted.

Wrong. In the case of searching, the database is the function that you feed the input query into. E.g. consider the following system: E(x) = x ^ k, D(x) = x ^ k So a one-time pad. Let's say that I provide a service that lets you decide whether a number is even or odd: IsOdd(E(x)) = E(x) mod 2 You give it an encrypted number, and it gives you back an encrypted bit that you can decrypt to see if the original number was…

> IsOdd(E(x)) = E(x) mod 2 I don't get this. Did you mean IsOdd(E(x)) = x mod 2 But who provides such function? In the case of a web search,the function is the search engine. I expect Google to provide it, not the user: the refinement and completeness level of its engine is the only reason to choose Google over its competitor. If I have to provide the function, then I'm only buying the compute power from them.

>I don't get this. Did you mean

>IsOdd(E(x)) = x mod 2

No, that's literally the point. IsOdd() operates on the cyphertext E(x). It doesn't see the plaintext x. And yet, due to its algebraic properties, the server can answer the query without decrypting it.

For example:

  Client:
    x = 13
    k = 45
    E(x) = 13 xor 45 = 32

  Server:
    IsOdd(E(x)) = 32 mod 2 = 0

  Client:
    D(IsOdd(E(x))) = D(0) = 0 xor TrimLength(45, 1) = 1 (we trim the decryption key to the length of the response, which is 1bit)
So what happens in this case is the server sends you a bit, which you'll either flip or not flip, depending on the key k. The server doesn't know whether you're going to flip its answer or not, so it doesn't know if your plaintext number is odd or even.

Re: Fully homomorphic encryption and the dawn of a private internet

#194

> Internet's "Spy by default" can become "Privacy by default". I've been building and promoting digital signatures for years. Its bad for people and market-dynamics to have Hacker News or Facebook be the grand arbiter of everyone's identity in a community. Yet here we are because its just that much simpler to build and use it this way, which gets them more users and money which snowballs until alternatives dont matte…

> I've been building and promoting digital signatures for years. I agree with this wholeheartedly, and yet I do get the following question a lot "What's all that nonsense at the end of your emails". Any explanation is met with eye-rolls and 1000 yard stares. Have you managed to get laypeople on-board with any kind of client-side cryptography? how?

Everything needs to be built into the application in a way that users don't notice if they don't care. A signature at the end of your emails is more cryptic than the recipient's email client showing an icon with a green checkmark or something similar. I take Chrome's rollout of tls-enforcement by default as a great example of this. All I would had to say to people was "check that the padlock next to your url bar is green."

Re: Fully homomorphic encryption and the dawn of a private internet

#195

Earlier quoted context omitted.

I didn't mean to suggest otherwise! That's why I also linked the CryptoNets paper - to show that you're transforming the inference to happen inside an FHE context, not trying to learn encrypted data

Yes, you can do Cryptonets. What I’m saying is that you don’t have to do cryptonets, you can simply use FHE to train the network in fully encrypted manner: both the network and the data are FHE-encrypted, so the training itself is an FHE application. It would be insanely slow and I doubt it can be done today even for “small” LLMs due to high overheads of FHE.

> This is why FHE for ML schemes [1] don't try to make ML models work directly on encrypted data, but rather try to package ML models so they can run inside an FHE context.

I don't think @strangecasts was trying to say you couldn't. I believe their point was that you can't have a model learn to coherently respond to encrypted inputs with just traditional learning mechanisms (so without FHE). Doing so would require an implicit breaking of the encryption scheme by the model because it would need a semantic understanding of the plaintext to provide a cogent, correctly encrypted response.

Re: Fully homomorphic encryption and the dawn of a private internet

#196

Earlier quoted context omitted.

> IsOdd(E(x)) = E(x) mod 2 I don't get this. Did you mean IsOdd(E(x)) = x mod 2 But who provides such function? In the case of a web search,the function is the search engine. I expect Google to provide it, not the user: the refinement and completeness level of its engine is the only reason to choose Google over its competitor. If I have to provide the function, then I'm only buying the compute power from them.

>I don't get this. Did you mean >IsOdd(E(x)) = x mod 2 No, that's literally the point. IsOdd() operates on the cyphertext E(x). It doesn't see the plaintext x. And yet, due to its algebraic properties, the server can answer the query without decrypting it. For example: Client: x = 13 k = 45 E(x) = 13 xor 45 = 32 Server: IsOdd(E(x)) = 32 mod 2 = 0 Client: D(IsOdd(E(x))) = D(0) = 0 xor TrimLength(45, 1) = 1 (we trim th…

Now I see it. Thank you.

What I still don't understand is how this can be used to have the remote host give me responses that I couldn't have calculated myself locally, because all the data is stored in the cloud, not locally (that's how Google search works).

Re: Fully homomorphic encryption and the dawn of a private internet

#197
The tendency to increase complexity will be at odds with privacy and user control.

The problem is that the internet is a centralized system practically even though it is decentralized and some are fighting to keep it free.

Fight for decentralization instead, it will remove the need for unnecessary security and reduce the compute cost significantly.

Re: Fully homomorphic encryption and the dawn of a private internet

#198

Earlier quoted context omitted.

Yes, you can do Cryptonets. What I’m saying is that you don’t have to do cryptonets, you can simply use FHE to train the network in fully encrypted manner: both the network and the data are FHE-encrypted, so the training itself is an FHE application. It would be insanely slow and I doubt it can be done today even for “small” LLMs due to high overheads of FHE.

> This is why FHE for ML schemes [1] don't try to make ML models work directly on encrypted data, but rather try to package ML models so they can run inside an FHE context. I don't think @strangecasts was trying to say you couldn't. I believe their point was that you can't have a model learn to coherently respond to encrypted inputs with just traditional learning mechanisms (so without FHE). Doing so would require an…

That's a much better way of phrasing what I was trying to get at :)

Re: Fully homomorphic encryption and the dawn of a private internet

#199

Earlier quoted context omitted.

>I don't get this. Did you mean >IsOdd(E(x)) = x mod 2 No, that's literally the point. IsOdd() operates on the cyphertext E(x). It doesn't see the plaintext x. And yet, due to its algebraic properties, the server can answer the query without decrypting it. For example: Client: x = 13 k = 45 E(x) = 13 xor 45 = 32 Server: IsOdd(E(x)) = 32 mod 2 = 0 Client: D(IsOdd(E(x))) = D(0) = 0 xor TrimLength(45, 1) = 1 (we trim th…

Now I see it. Thank you. What I still don't understand is how this can be used to have the remote host give me responses that I couldn't have calculated myself locally, because all the data is stored in the cloud, not locally (that's how Google search works).

Well, consider a function that is vastly more complex than IsOdd() from my previous example. IsOdd() was a function from Z[2]^n to Z[2]. Instead, imagine a function from Z[2]^n to Z[2]^m, aka a general N-to-M bit Boolean function. Any such Boolean function can be represented as a logic circuit, that is, AND/OR/NOT gates and connections between them. Now, if we can implement these logic gates (and the connections between them) homomorphically, then we can implement a homomorphic realization of arbitrary functions. One "small" caveat when transforming programs into logic circuits is that all data must be inlined, all loops must be unrolled, all branches must be executed.

Re: Fully homomorphic encryption and the dawn of a private internet

#200
CipherStash founder here: FHE isn't the only option here. Specialized searchable encryption schemes exist and are much faster than FHE. Different flavours can be combined to create a comprehensive search system which is very close to the performance of plaintext information retrieval. FHE remains an option for generalized computation but can be reserved for small datasets that have been narrowed down using fast searchable encryption.

I don't think FHE is the solution to PIR but it might well form a part of it when combined with more practical approaches.

Post reply on HN