News for hackers. Stuff that matters.
Re:Show HN: Read Wikipedia privately using homomorphic encry... by blintz on Wednesday June 08, 2022 @12:03PM (#31669396)
Hi, creator here.

This is a demo of our recent work presented at Oakland (IEEE S&P): https://eprint.iacr.org/2022/368. The server and client code are written in Rust and available here: https://github.com/menonsamir/spiral-rs. The general aim of our work is to show that homomorphic encryption is practical today for real-world applications. The server we use to serve this costs $35/month!

A quick overview: the client uses homomorphic encryption to encrypt the article number that they would like to retrieve. The server processes the query and produces an encrypted result containing the desired article, and sends this back to the client, who can decrypt and obtain the article. A malicious server is unable to determine which article the client retrieved. All search and autocomplete is down locally. The technical details are in the paper, but the high level summary is that the client creates a large one-hot vector of encrypted bits (0’s except for the index of the desired article, where they place a 1) and then the server computes something like a ‘homomorphic dot product’ between the query and the plaintext articles.

I’d like to caveat that this is an in-browser demo to show it is practical to use homomorphic encryption at this scale. As a real product, you’d probably want to distribute a signed client executable (or Electron app) since otherwise, a malicious server could simply deliver bad client JS on the fly.

Happy to answer any questions!

Re:Show HN: Read Wikipedia privately using homomorphic encry... by jerf on Wednesday June 08, 2022 @12:40PM (#31669983)
This is the first thing out of homomorphic encryption I personally have seen that seems to be in the ballpark of useful for some practical use, which is impressive. Have I missed out on any other such things of interest?

(And this is not a criticism; this is a compliment. You start so far behind the eight-ball with homomorphic encryption with regard to the resources it consumes I wasn't convinced it was ever going to be even remotely useful for much of anything. Precisely because I was so skeptical, I am that impressed to see something work this well. It's not the fastest Wikipedia mirror, but... honestly... I've been on slower websites! Websites with far less excuse.)

Re:Show HN: Read Wikipedia privately using homomorphic encry... by blintz on Wednesday June 08, 2022 @12:48PM (#31670116)
There has recently been a lot of great work on making homomorphic encryption more practical for particular applications. We definitely stand on the shoulders of all that work!

One reason homomorphic encryption has a reputation as absurdly slow is that people typically talk about “fully” homomorphic encryption, which essentially means that you can compute an arbitrarily large function on the encrypted data. This involves a very expensive process called bootstrapping, which incurs a roughly ~15 ms cost per binary operation evaluated. As you can imagine, that adds up.

This work uses “leveled” homomorphic encryption, where we only perform a function of ‘bounded’ size (that is, the homomorphic dot product). So, we do not have to perform bootstrapping, and thus avoid some of the more extreme costs.

The other reason this work is practical is that we ‘tailored’ our construction to the particular problem of private information retrieval. When people try to apply homomorphic encryption generically to their problem, they typically end up with disappointingly slow and expensive results. Cool work on better ‘FHE compilers’ so in progress, so hopefully that will also help!

Re:Show HN: Read Wikipedia privately using homomorphic encry... by feanaro on Wednesday June 08, 2022 @04:58PM (#31674043)
> can compute an arbitrarily large function on the encrypted data

What is the meaning of the word "large" here? How are we defining the size of a function?

Re:Show HN: Read Wikipedia privately using homomorphic encry... by Confiks on Wednesday June 08, 2022 @05:30PM (#31674515)
Either the amount of Boolean logic operations or the amount of integer additions and multiplications, as these are the operations FHE schemes support.
Re:Show HN: Read Wikipedia privately using homomorphic encry... by blintz on Thursday June 09, 2022 @01:09AM (#31677755)
It's generally multiplicative depth; that is, the number of ciphertext-ciphertext multiplications that feed into each other. The primary way we define and evaluate functions in FHE is as Boolean (or sometimes arithmetic) circuits, so "depth" is in that context.
Re:Show HN: Read Wikipedia privately using homomorphic encry... by kccqzy on Wednesday June 08, 2022 @01:07PM (#31670475)
You missed the widely panned Apple iCloud child sexual abuse imagery detection feature. The private set intersection is basically doing homomorphic encryption. In raising some very valid policy critiques, people forget that it's actually a nifty piece of engineering. (This is not an endorsement of that feature.) https://www.apple.com/child-safety/pdf/Apple_PSI_System_Secu...

I'm also closely working together with a team at $WORK who's using a protocol very similar to Apple's but not doing CSAM detection. We are seeing some severe pushback on this technology. I wouldn't be surprised if there are multiple homomorohic encryption based products at Big Tech that have yet to see the light of day.

Re:Show HN: Read Wikipedia privately using homomorphic encry... by lifthrasiir on Wednesday June 08, 2022 @02:29PM (#31671954)
I think it is very counterintuitive---even to professional programmers---that you can compute things without letting the computer know them. I literally had to go through the entire paper to understand that this can actually work as long as human in the loop doesn't screw up (see my summary [1], which was revised multiple times at that time).

[1] https://news.ycombinator.com/item?id=28223141

Re:Show HN: Read Wikipedia privately using homomorphic encry... by halJordan on Wednesday June 08, 2022 @02:53PM (#31672254)
Apple's Differential Privacy uses homomorphic encryption for parts of its functioning.
Re:Show HN: Read Wikipedia privately using homomorphic encry... by j2kun on Wednesday June 08, 2022 @03:24PM (#31672695)
Citation?
Re:Show HN: Read Wikipedia privately using homomorphic encry... by Canada on Wednesday June 08, 2022 @01:56PM (#31671431)
Can this be applied usefully to non-public datasets?

Would it be feasible to add some other zero knowledge proof to this that would confirm a user has paid a subscription for access? For example, if this were a news site, the user would have to prove a valid subscription to read articles, but the site would not be able to know which articles any subscriber decided to read?

If that is possible, what could the site to to prevent a paying subscriber from sharing their access to an unreasonable number of others? Would it be possible to impose a rate limit per subscriber?

Re:Show HN: Read Wikipedia privately using homomorphic encry... by blintz on Wednesday June 08, 2022 @02:00PM (#31671500)
The simplest approach would be to just charge people per-query (or charge in levels, depending on the number of queries). This could be done in the standard way (you have to log in, pay the site, and then it gives you an API key or just session token, and logs how many queries you make). I think you can avoid having to use a ZKP this way, since that will make things much more complicated and possibly costly.
Re:Show HN: Read Wikipedia privately using homomorphic encry... by phh on Wednesday June 08, 2022 @02:44PM (#31672162)
I'm no cryptographer, but it seems to me you could implement this using the same algorithm as cloudfare for tor, which generates anonymous tokens from an adhoc webpage
Re:Show HN: Read Wikipedia privately using homomorphic encry... by jl6 on Wednesday June 08, 2022 @12:18PM (#31669630)
In another comment you’ve said:

> With a proper implementation of PIR, the server still needs to scan through the entire encrypted dataset (this is unavoidable, otherwise its I/O patterns would leak information)

Is this technique therefore practical only when the server side dataset is relatively small (or full scans for every query are tolerable)?

(edit: sorry, misattributed the quote)

Re:Show HN: Read Wikipedia privately using homomorphic encry... by blintz on Wednesday June 08, 2022 @12:32PM (#31669853)
Wasn’t me, but it was accurate!

Indeed, except in some (exciting!) new theoretical constructions, server work is always linear in the database size.

However, I’d emphasize that our work shows that the constabt factor on this linear operation is really high. We process at 300MB/s to 1.9GB/s on a single core, which is fast enough for relatively large databases. Remember that the computation is embarrassingly parallel, so you can always throw more compute at larger databases. To summarize, we think the speed is now fast enough that it really can be feasible to scan the whole database to answer a single query.

Re:Show HN: Read Wikipedia privately using homomorphic encry... by teraflop on Wednesday June 08, 2022 @12:38PM (#31669946)
> except in some (exciting!) new theoretical constructions

Sorry if this is too much of a tangent, but I would love to know what these are!

Re:Show HN: Read Wikipedia privately using homomorphic encry... by sangel on Wednesday June 08, 2022 @12:49PM (#31670136)
They are called PIR with sublinear online computation or offline/online PIR.

Key idea is the client issues a query that is independent of what they really want. This is the “offline” query. This query is linear (unavoidable) and the client gets some hints as a result

Then later, the client can issue one or more queries for elements they want and those queries can be sublinear in terms of computation. The client uses hints to make that happen.

Some papers on this are:

https://eprint.iacr.org/2019/1075.pdf

https://eprint.iacr.org/2021/1438

https://eprint.iacr.org/2022/081.pdf

Re:Show HN: Read Wikipedia privately using homomorphic encry... by blintz on Wednesday June 08, 2022 @12:51PM (#31670167)
Sure! This paper has people really excited from a theoretical standpoint: https://eprint.iacr.org/2022/081.pdf. It’s a bit far from practical for single-server, but I’m sure people are working on it.
Re:Show HN: Read Wikipedia privately using homomorphic encry... by teraflop on Wednesday June 08, 2022 @12:22PM (#31669700)
Clarification: that was my comment, not OP's. I'm not a cryptography expert, just an interested amateur. But my understanding is that O(n) query times are inevitable if you want information-theoretic security. Maybe it's possible to do better with a weaker security property.

And there are clever ways you can make a system like this "scale" even if the overall dataset size is limited. For instance, the authors cite another interesting paper [1] that uses a similar technique to build a fully-private voice chat system. The basic idea seems to be that you build a "database" consisting of the most recent snippet of audio from every ongoing conversation, and let each client privately query for the segment that's addressed to it. And every fraction of a second when new audio data arrives, you just throw away the old database and build a new one, so the amount of data doesn't depend on the length of the conversation.

Even if this doesn't scale to arbitrary numbers of users, it could still be used to run a "cell" of a few thousand people, in which it's not possible for an adversary to reconstruct communication patterns within the cell.

[1]: https://www.usenix.org/conference/osdi21/presentation/ahmad

Re:Show HN: Read Wikipedia privately using homomorphic encry... by wbeckler on Wednesday June 08, 2022 @12:21PM (#31669686)
Maybe the I/O pattern could be hideable using confidential computing, like with a Nitro Enclave.
Re:Show HN: Read Wikipedia privately using homomorphic encry... by teraflop on Wednesday June 08, 2022 @01:22PM (#31670765)
Maybe, but if you have a secure enclave that can be trusted not to leak data, then you don't really need PIR. You can just have clients encrypt their queries with a key that can only be decrypted by the code running in the enclave.
Re:Show HN: Read Wikipedia privately using homomorphic encry... by JanisErdmanis on Wednesday June 08, 2022 @12:51PM (#31670168)
> A malicious server is unable to determine which article the client retrieved.

This sounds like magic :O. How does it behave when new articles (elements) are added, does it need to rebuild the whole database and distribute new parameters?

I wonder how practical it would be for clients to synchronize content without server not being able to deduce the synchronization state at which the client is.

Re:Show HN: Read Wikipedia privately using homomorphic encry... by blintz on Wednesday June 08, 2022 @12:55PM (#31670232)
It does sound like magic! This is what got me into this field; it seems like something that should intuitively be impossible… but it’s not!

Parameters only need to be changed based on the number of items in the database (not the content of the items). Also, they don’t really need to be modified as long as we are within the same power of two number of items. So, I think client and server agreement on parameters seems feasible. Right now, it’s just hard coded :)

Re:Show HN: Read Wikipedia privately using homomorphic encry... by syrrim on Wednesday June 08, 2022 @12:23PM (#31669720)
What is the maximum throughput the server can maintain? Or, in other words, how much does it cost per query?
Re:Show HN: Read Wikipedia privately using homomorphic encry... by blintz on Wednesday June 08, 2022 @12:28PM (#31669803)
The $35/month server uses 6 cores to answer a single query in ~2.5-3 seconds. So it’s 0.33 QPS :-)

Not high, which is why it might not be working well for folks right now…

Time scales almost perfectly linearly with cores, since the computation is embarrassingly parallel.

In terms of cost, we’re still talking only 18 CPU•s and ~300KB of outgoing bandwidth, which is not a ton at todays prices.

Re:Show HN: Read Wikipedia privately using homomorphic encry... by IshKebab on Wednesday June 08, 2022 @03:23PM (#31672671)
It's embarrassing parallel... but you also do N times more work than a non-homomorphic system so that's not saying much!

This doesn't seem like a particularly compelling application - can you give some practical problems that homomorphic encryption solves. I've always heard vote counting as the example.

Re:Show HN: Read Wikipedia privately using homomorphic encry... by blintz on Wednesday June 08, 2022 @03:56PM (#31673122)
Yeah, the computational overhead over no-privacy retrieval will always be high. Something we point out in the paper is that this does not necessarily translate to server monetary costs; for example, on AWS, where outgoing bandwidth is expensive, using our system to stream a movie is less than 2x the monetary cost of direct, no-privacy streaming. This is because the computational costs are just very small in comparison to the bandwidth costs.

As far as more compelling applications, several folks have suggested DNS, OCSP, and certificate transparency as potential examples. Using PIR as a building block, it is also possible to build more complex systems, like metadata-private messaging (systems like ‘Pung’) and even private voice calling (systems like ‘Addra’).

Re:Show HN: Read Wikipedia privately using homomorphic encry... by rkagerer on Wednesday June 08, 2022 @01:21PM (#31670745)
Not able to read the full paper at the moment, and confused about something:

If the server needs to go pull the article from Wikipedia, how is it blind to which one is being requested?

If you've pre-seeded the server with an encrypted 30% of Wikipedia, how can I trust you haven't retained information that would enable you to derive what I requested?

The only way I understand this works is if the client itself seeded the encrypted data in the first place (or at least an encrypted index if all the server pushes back is article numbers).

Maybe I'm ignorant of something; if so thanks for ELI5.

Re:Show HN: Read Wikipedia privately using homomorphic encry... by Dylan16807 on Wednesday June 08, 2022 @02:26PM (#31671914)
> If you've pre-seeded the server with an encrypted 30% of Wikipedia, how can I trust you haven't retained information that would enable you to derive what I requested?

With homomorphic encryption, the client sends a series of encrypted numbers. Nobody can decrypt them except the client. The server can do arithmetic with them, making new secret numbers that nobody can decrypt except the client.

There is no usable information to retain.

So the question becomes: what can you calculate using arithmetic on secret numbers?

Well, for this demo, treat every article as a number. Then multiply all the articles you don't want by 0, and the article you want by 1, and add them all together.

The server just sees that it's multiplying every article by a secret number. It can't tell what the number is. It can't tell if the output is "encrypted article" or "encrypted 000000..."

Then the server adds them all up. If the client asked for no articles, the result will be "encrypted 000000..." If the client asked for one article, the result will be that article, encrypted. If the client asked for multiple, the result will be a garbled mush of overlapping articles, encrypted. The server can't tell the difference. It just knows it has an encrypted number.

Re:Show HN: Read Wikipedia privately using homomorphic encry... by dheera on Wednesday June 08, 2022 @03:08PM (#31672455)
Thank you. I really wish the paper started with exactly what you wrote as the abstract.
Re:Show HN: Read Wikipedia privately using homomorphic encry... by barkingcat on Wednesday June 08, 2022 @04:37PM (#31673684)
does revealing that you accessed something from the index vs nothing a leak of information?
Re:Show HN: Read Wikipedia privately using homomorphic encry... by Dylan16807 on Wednesday June 08, 2022 @09:50PM (#31676754)
The server can't tell if or which articles you accessed in a query.

If the server has removed an article, then it's possible it would send back a broken response to you, but the server would not be able to tell if that happened. There would only be an information leak if you reacted to the broken response.

If you mean observing that you made a query at all, versus not making a query, sure that's observable.

Re:Show HN: Read Wikipedia privately using homomorphic encry... by blintz on Wednesday June 08, 2022 @01:51PM (#31671335)
The server has a snapshot of Wikipedia, sitting in memory. The server is blind to which article is requested because it computes a homomorphic dot product between an encrypted one-hot vector (encrypted under a key that only the client knows) and the total set of articles in plaintext. The encrypted query does not reveal anything about the requested index (ie it is semantically secure).

The 'magic' of homomorphic encryption is that the server is able to take an encrypted one-hot vector of bits, and a vector of plaintext articles, compute a homomorphic dot product, and produce a single ciphertext encoding the single desired plaintext article. This single output ciphertext is crucially also encrypted under the client's secret key, so it reveals nothing to the server.

Re:Show HN: Read Wikipedia privately using homomorphic encry... by rkagerer on Thursday June 09, 2022 @03:10AM (#31678372)
Thanks. I knew homomorphic encryption let's you do math on encrypted data without knowing its contents. But it hadn't occurred to me you can keep one side of the arithmetic in plaintext. It also helped when gojomo pointed out that every query touches every byte of the full dataset.

So basically (if I've got this right and at the risk of over-simplifying): Client computes a bit mask and encrypts it, sends that to the server, and says "do a big multiplication of this against Wikipedia content". That leaves only the relevant portion in the encrypted result, which only the client can decrypt.

How does the client know which bits in the initial "mask" (aka one-hot vector) to set? Does it have to download a full index of article titles? (So in a sense this is just a big retrieval system that pulls an array element based on its index, not a freeform search tool).

Re:Show HN: Read Wikipedia privately using homomorphic encry... by blintz on Thursday June 09, 2022 @05:07PM (#31686897)
Yes, all of the mapping of article titles to index happens locally.

If the index got too large, we could use a hash to bucket things, but this incurs some waste and would only support exact article title matches.

Yes, it is definitely not a freeform search tool.

Re:Show HN: Read Wikipedia privately using homomorphic encry... by philipkglass on Wednesday June 08, 2022 @02:24PM (#31671878)
Don't you have to pad the output ciphertext size to match the largest article you could possibly request from the set of articles? Or is a fixed-size output an inherent property of homomorphic encryption schemes? Otherwise it seems to reveal something to the server just by the size of the ciphertext (since WP articles vary in size).
Re:Show HN: Read Wikipedia privately using homomorphic encry... by Dylan16807 on Wednesday June 08, 2022 @02:30PM (#31671967)
The output is always going to be fixed size.

The nicer way to look at homomorphic encryption is like math, but the more literal way is like a bunch of logic gates. There are N output wires. You control the bits on the input wires. Nothing you do will change the number of wires.

Re:Show HN: Read Wikipedia privately using homomorphic encry... by blintz on Wednesday June 08, 2022 @03:09PM (#31672467)
Yes, every item needs to be the same size. We batch the articles into 100KB chunks, and we split articles larger than this into multiple chunks.
Re:Show HN: Read Wikipedia privately using homomorphic encry... by aildours on Wednesday June 08, 2022 @03:25PM (#31672708)
Wouldn't you then have to send out multiple ciphertexts (for articles >100 KB)? Which would leak something about the size of the article...
Re:Show HN: Read Wikipedia privately using homomorphic encry... by blintz on Wednesday June 08, 2022 @04:06PM (#31673257)
You would. It’s important for the client to pace it’s requests in a way that does not reveal too much (for example, the client should not just request both chunks of the article at the same time). The best thing to do would probably be to have a ‘load more’ button at the bottom of a very long article that makes a separate request.

If you think about it, the pacing of user queries could always reveal something (if there’s a long gap between quarries, perhaps it’s a dense mathematics article?). So the best we can hope for is pacing requests either randomly, or for even further protection, perhaps making dummy requests on a fixed cadence.

Re:Show HN: Read Wikipedia privately using homomorphic encry... by gojomo on Wednesday June 08, 2022 @01:50PM (#31671320)
The server already has a full copy of (its subset of) Wikipedia.

Every query touches every byte of that snapshot, in the same way... but the homomorphic-encryption math distills that down to just the fragment the client requested.

And it does so without giving even the CPU executing that math any hint of what bytes/ranges/topics survive the math. The much-smaller – but still, at every server step, encrypted – result is then sent to the client, which performs the decryption.

It's moon-math magic.

Re:Show HN: Read Wikipedia privately using homomorphic encry... by yarg on Wednesday June 08, 2022 @08:18PM (#31676178)
Can this functionality be implemented as a peer-to-peer (or federated) service?

I'm assuming it'll depend on breaking down questions into hierarchical sub-questions that can either be recomposed locally or in another homomorphic context. But can that sort of thing be done without data-leaks, or prohibitively expensive inter-node communication?

Are there any introductory resources (that you know of) on homomorphic encryption and compute that'll turn this into less of a mind-fuck?

Re:Show HN: Read Wikipedia privately using homomorphic encry... by px43 on Wednesday June 08, 2022 @09:44PM (#31676715)
NuCypher is doing some really fun stuff in this space: https://www.nucypher.com

Basically, you upload encrypted blobs to a P2P network, and you can issue special proxy-re-encryption keys to people that allows them to download the encrypted content, without revealing any of the content to people running the nodes (who store and replicate the data). You can also do really interesting things like revoking keys to remove access for people who haven't downloaded the blob yet.

Re:Show HN: Read Wikipedia privately using homomorphic encry... by blintz on Wednesday June 08, 2022 @08:24PM (#31676221)
It would be very cool to federate this! I am particularly interested in applications to DHTs/Kademlia, especially for things like IPFS.

Since this has only recently become practical, there is a bit of dearth of resources on it at the moment. I’m going to try to do my part and write a blog post at some point.

Re:Show HN: Read Wikipedia privately using homomorphic encry... by Labo333 on Wednesday June 08, 2022 @02:24PM (#31671885)
I understand that you do some kind of dot product (with two steps, Regev and GSW). However, it looks to me that those steps involve fixed dimension vectors.

- How do you handle variable length data? Do you need to pad it?

- What is the memory overhead of the storage of encrypted data?

I think that at least for video data, the streaming scheme "leaks" the size of the encrypted data with the number of streaming packets.

Re:Show HN: Read Wikipedia privately using homomorphic encry... by blintz on Wednesday June 08, 2022 @03:15PM (#31672552)
Yeah, every record needs to be the same size. For the demo, we batch the articles into 100KB chunks. We do a good job packing, where we put many small articles into a 100KB chunk, and we split large articles into many 100KB chunks. This packing is pretty efficient, roughly 90% of space is not wasted.

The memory overhead is significant but not prohibitive… we have to keep something like a 5-8x larger encoded database in memory, but this overhead is from encoding the plaintext in a special format to allow a fast dot product, not from inefficiency in the packing.

Re:Show HN: Read Wikipedia privately using homomorphic encry... by lucb1e on Wednesday June 08, 2022 @04:16PM (#31673377)
Is it not possible to determine which article(s) the user downloaded based on the memory locations read? Of course, multiple small articles from within the same 100KB cannot be said, but for any medium to large article, you'd be able to make a good guess (if there are a handful of articles there) or an exact match (if there is <=1 article in that chunk) no?

Or does the server go through a large chunk of its memory (say, at least a quarter of all of Wikipedia) and perform some oblivious computation on all of that data (applying the result modulo this 100KB return buffer)? That sounds very resource-intensive, at least for something large like Wikipedia (a doctor's office with some information pages of a few KB each could more easily do such a thing).

In the latter case, is each request unique (does it involve some sort of IV that the client can xor out of the data again) or could an index be built similar to a list of hashed PIN codes mapped back to plain text numbers?

Edit: I had already read some comments but just two comments further would have been my answer... :) https://news.ycombinator.com/item?id=31669630

> > With a proper implementation of PIR, the server still needs to scan through the entire encrypted dataset (this is unavoidable, otherwise its I/O patterns would leak information)

Now let's see if I can also find the answer regarding the ability to build a lookup table...

Edit #2: found that also! https://news.ycombinator.com/item?id=31669924

> One query for one item in the database is indistinguishable (without the client’s key) from another query for the same item later; in other words, it’s similar to something like the guarantee of CBC or GCM modes, where as long as you use it correctly, it is secure even if the attacker can see many encryptions of its choosing.

That is some cool stuff indeed. I'm going to have to up my game when building or reviewing privacy-aware applications. Sure, a file sharing service is not going to practically allow this, but I'm sure that with this knowledge, I will come across places where it makes sense from both a usefulness (e.g. medical info) and practicality (data set size) perspective.

Re:Show HN: Read Wikipedia privately using homomorphic encry... by MauranKilom on Wednesday June 08, 2022 @06:05PM (#31674977)
> Sure, a file sharing service is not going to practically allow this

Well, as the author points out here [0], it doesn't actually translate to exorbitant cost increases when almost all the cost is in bandwidth rather than compute. A file sharing service rather seems like an ideal example (assuming you can derive additional revenue from the privacy promises).

[0]: https://news.ycombinator.com/item?id=31673122

Re:Show HN: Read Wikipedia privately using homomorphic encry... by lucb1e on Friday June 10, 2022 @03:35PM (#31698509)
I'd be interested in the calculation there. How many movies does the server store in the first place? Computing over all of Netflix (just their movies, not even the series) for every request, even if you could then obtain the full movie with just one request, seems almost prohibitive. I'm also assuming the author counted on the server being busy the whole time (on-demand pricing) and not having to have spare capacity idling for when multiple requests come in at the same time.

For me, compute has always been by far my expense, and that's without homomorphic encryption! Buying a server or the monthly rental (e.g. VPS) costs is where most of my budget goes. Next on the expense list are a few domain names, and probably about as much in electricity if we're considering the at-home scenario. Bandwidth is usually included, be it with the VPS or with the server I run at home (since I want that internet uplink for normal use anyway).

Re:Show HN: Read Wikipedia privately using homomorphic encry... by throwaway81523 on Wednesday June 08, 2022 @08:06PM (#31676096)
If you say a malicious server can't determine which article was retrieved, is that private information retrieval (PIR)? Something must be different here. I thought there was a theorem that for single-server PIR to work, the client has to download the entire DB, which is the right way to read Wikipedia privately anyway.
Re:Show HN: Read Wikipedia privately using homomorphic encry... by blintz on Wednesday June 08, 2022 @08:16PM (#31676165)
This is PIR. You do have to download the whole database for information-theoretic security, but not for computational security. If you assume the hardness of some problem (in this case, lattices, but it is also possible from RSA, ECC, etc) it is possible to do much better than simply downloading the entire database.
Re:Show HN: Read Wikipedia privately using homomorphic encry... by throwaway81523 on Wednesday June 08, 2022 @09:11PM (#31676506)
Does the server have to scan the whole database on every query? If not, doesn't the disk access pattern tell you what the query was? I had thought you had to download the whole DB even for computational PIR, but hmm, maybe not in some cases where there is only 1 client with a secret.
Re:Show HN: Read Wikipedia privately using homomorphic encry... by blintz on Wednesday June 08, 2022 @09:14PM (#31676529)
Yes, the whole database is scanned to answer a single query.
Re:Show HN: Read Wikipedia privately using homomorphic encry... by fragmede on Saturday June 11, 2022 @12:26AM (#31701918)
Well but you get into the security space and license your server db technology for shit like IoT lights. I don't want the company knowing if my lights are on or off, but if they had a homomorphic encrypted backend and app, I might trust it.
Re:Show HN: Read Wikipedia privately using homomorphic encry... by fragmede on Saturday June 11, 2022 @08:01AM (#31703854)
To get press and earn legitimacy, make a hacking challenge: put up pcaps and a $1 million prize if anyone can break it.
Re:Show HN: Read Wikipedia privately using homomorphic encry... by j2kun on Wednesday June 08, 2022 @03:24PM (#31672687)
Do you have a blog or Twitter? I'd like to keep up with any other cool projects you're working on!
Re:Show HN: Read Wikipedia privately using homomorphic encry... by blintz on Wednesday June 08, 2022 @03:40PM (#31672911)
Not at the moment, but will probably make a blog post or something to explain how it all works at a slightly higher level than the paper.

When it’s done it’ll be at https://samirmenon.com/.

Re:Show HN: Read Wikipedia privately using homomorphic encry... by cobbzilla on Wednesday June 08, 2022 @11:20PM (#31677248)
Fantastic project.

Have you considered running (# of cpus) parallel scanners continuously? An inbound query “hops on” the the least-loaded scanner; at each article/chunk the scanner runs all the queries; each query “hops off” and returns after it has completed the cycle through the entire DB.

Re:Show HN: Read Wikipedia privately using homomorphic encry... by blintz on Wednesday June 08, 2022 @11:29PM (#31677282)
I do indeed use all 6 cores of my server simultaneously, and the caching on the database part of memory is quite effective. If I had a little spare cash I might just purchase some more CPUs :-)
Re:Show HN: Read Wikipedia privately using homomorphic encry... by sedatk on Wednesday June 08, 2022 @07:26PM (#31675787)
> As a real product, you’d probably want to distribute a signed client executable (or Electron app) since otherwise, a malicious server could simply deliver bad client JS on the fly.

Arguably, a malicious server could deliver a bad executable too.

Re:Show HN: Read Wikipedia privately using homomorphic encry... by blintz on Wednesday June 08, 2022 @08:20PM (#31676195)
Yeah, I mean you generally have to go with trust on first use at some point. You can also do code signing, check hashes, build from source, compare multiple sources, etc. All the standard software supply chain security measures.
Re:Show HN: Read Wikipedia privately using homomorphic encry... by sizzle on Thursday June 09, 2022 @02:19AM (#31678078)
This sounds like the ultimate anti-user profiling and targeted advertising solution. I hope google and other advertising giants can’t stop this. Thoughts?
Re:Show HN: Read Wikipedia privately using homomorphic encry... by ddjsn111 on Wednesday June 08, 2022 @04:12PM (#31673334)
How does the server select the article in a way that we can be sure they don't record the article sent back? Are the articles encrypted on the server too?
Re:Show HN: Read Wikipedia privately using homomorphic encry... by sp332 on Wednesday June 08, 2022 @04:17PM (#31673393)
Yes, in fact the article number is not even decrypted by the server, so the server doesn't know which article you asked for!
Re:Show HN: Read Wikipedia privately using homomorphic encry... by kaoD on Wednesday June 08, 2022 @04:51PM (#31673931)
How is this not vulnerable to side-channel attacks like disk-access patterns?

Could I, as a malicious server, request myself a target article and correlate that with legitimate user requests?

Re:Show HN: Read Wikipedia privately using homomorphic encry... by sodality2 on Wednesday June 08, 2022 @04:56PM (#31674019)
> With a proper implementation of PIR, the server still needs to scan through the entire encrypted dataset (this is unavoidable, otherwise its I/O patterns would leak information)

https://news.ycombinator.com/item?id=31669370 (not original poster)