4 ms·
"Encrypted queries for an encrypted database" could be as straightforward as encrypting both the keys and values using a known public key and putting the result
by whatshisface 4y ago
"Encrypted queries for an encrypted database" could be as straightforward as encrypting both the keys and values using a known public key and putting the results in MySQL. You have to be careful with the claims made around these kinds of things because they often appear to be more complex than they are.
- hn_throwaway_99 4y agoHuh? How would you search on any encrypted fields?
- KMag 4y agoNo subfield matches, no comparisons other than == and != on the whole field, and only works with deterministic encryption... so leaks like a sieve under many threat models.
- admax88qqq 4y agolol no it's not. Up can't do a range on encrypted data. If you encrypt 5 and encrypt 10, how do you expect to compare the encrypted results to see which is greater? If all you do is key value lookup then sure. But SQL is much richer than that.
- amadvance 4y agoEven lookup is not easy to be done securely. You don't want that a malicious server/database knows that you are accessing always that record. See this discussion about how to achieve that: https://news.ycombinator.com/item?id=31668814 https://news.ycombinator.com/item?id=31668814
- teraflop 4y agoIt's not nearly that simple. If your encryption scheme is deterministic then this leaks a ton of information, because anybody with the public key can just encrypt lots of values to reconstruct a mapping between plaintexts and ciphertexts. On the other hand, if your encryption scheme isn't deterministic, then you can't predict what encrypted value you should query for.
- whatshisface 4y agoThose kinds of problems have never stopped any company from offering a service with a lot of nice graphics on the home page.
- 5ersi 4y agoAdd random data to it, so that all (equivalent) data is the same length. For example, if you have a four byte field that represents some monetary value, add four more bytes of random data and encrypt it.
- kientuong114 4y agoHow would you run queries over that?