102 points · by mwilkison · 11y ago · 70 comments
I am curious how they intend to let a client run queries against a dataset that the server cannot read without the server having to send all the encrypted data over the wire, or at least an index of all the encrypted data. Which sounds limiting for large datasets.
I've been thinking a lot about this and the only way to handle the problem this tries to solve is to:
* treat the database as a collection of events
* let each event have a visibility that matches our concept of privacy (public | shared with X, Y & Z | private)
* have this communication encrypted using already existing OTR protocols (see some of Moxie Marlinspike's posts on it)
* make the database queryable on this aggregate of event data.
It's really just a case of finding the essential complexity and making it as simple, but not simpler, than that.
The annoying thing is that while it's a tough bullet to bite; it's not even that though. Something like Datomic could already get you halfway there.
We don't make such compromises (zero compromises, yes!). The way we do it is to actually traverse encrypted b-trees from the client, while b-trees are on the server. So, we pretty much split it between client and server at the lowest level of how db operates
A client can batch multiple inserts but the server cannot batch inserts from multiple clients.
Since the system is fully immutable each update would also include the state of the system it is an update to (which can be outdated.)
Essentially you're modelling human communication with each event being equivalent to a human speech act.
For most cases that would offer sufficient conflict resolution and more expensive commit strategies could be used only where more needed; much like how lattice/CALM-based programming languages such as Bloom deal with distribution.
I was recently reading a number of ORAM papers, considering to implement something as a side-project to play a bit with modern C++. The overhead is significant, but practical, i.e., far less than homomorphic encryption.
In our case, the actual computations are done on the client
What is the use case for something like this?
Is this f/oss ... similarly, what are the licensing terms?
Quick comment:
Please don't misuse the word "hack" when you actually mean "security breach". Thanks!
Yes, it will be open source once available
Thanks for the good work guys, best of luck with your project and (ad)venture.
What's the threat here?
SQL Injection? Encryption won't help. Use parameterized queries and least privilege.
Evil admin? They can just monitor the web server instead of the db.
Of course, this requires making sure that the code which the client executes is not malicious
still its more effort and more opportunistic (client needs to actually connect that day) so it is safer/reduces likelihood.
But a lot of work and issues for the security gain compared to db encryption and proper design (even thus, you know, its not a great trade off either!)
In the end I guess we need a truly client-initiated and controlled data handling. HTTP isnt exactly made for that. It tells the client how to handle and control the data, no choice is really made client-side.
This means that your 'evil admin' case is invalidated since the plaintext data is never available to the host.
Don't play with my heart, ZeroDB. Show us what you've got!
If you were to do that, HIPAA becomes MUCH easier for other healthcare IT startups using your db.
(i'm no encryption expert, just curious)
Having the key derived from your password is also possible, but I think not really that secure.
SpiderOak and Mega deal with this problem as they have e2e encrypted file storage