Ask HN: Is there a solution for homomorphic encryption in Postgres?

1 points by I_am_tiberius ↗ HN
I learned about homomorphic encryption a while ago. It looks like a great chance for SaaS companies because it significantly improves the security of its customers' sensitive data. I haven't found any existing postgres extensions or native postgres solutions supporting homomorphic encryption. Does anyone know of any projects being developed or already available? I only know about enquo (https://news.ycombinator.com/item?id=33386921), but its documentation is not clear, and I'm not sure if it uses homomorphic encryption.

4 comments

[ 2.8 ms ] story [ 22.8 ms ] thread
Why would you want to use homomorphic encryption on the backend db? If the database is entirely opaque, just use text files since the entire point of a database is negated.
Because using homomorphic encryption you can encrypt sensitive information (like a numeric column) and still do arithmetic operations on it while it's encrypted.
Uh, I don’t think so. Maybe there are some classes of homomorphic encryption where that is possible, but it’s not a general property of it. For example, you can’t do that with Witness Encryption which is a type of homomorphic encryption.
I'm no expert, so please excuse my methods of research. Here's what chatgpt tells me: "Yes, homomorphic encryption allows you to perform certain types of computations on encrypted data without needing to decrypt it first. This includes operations such as addition and multiplication, depending on the type of homomorphic encryption used.

For your specific case of summing up values in a numeric column of a database, homomorphic encryption is indeed applicable. If you encrypt each value in the column using a homomorphic encryption scheme, you can then sum these encrypted values. The result of this operation will be an encrypted value that, when decrypted, will reveal the sum of the original plaintext values. ypes of Homomorphic Encryption

There are mainly three types of homomorphic encryption:

    Partial Homomorphic Encryption (PHE): Allows only one type of operation (either addition or multiplication) an unlimited number of times. An example is RSA.

    Somewhat Homomorphic Encryption (SHE): Allows both addition and multiplication, but only a limited number of times.

    Fully Homomorphic Encryption (FHE): Enables both addition and multiplication on encrypted data an unlimited number of times. This is the most versatile form but also the most computationally intensive."