152 points · by 0xedb · 6y ago · 36 comments
I just wanted to say that I think we packaged some cool demos in the toolkit. One is the privacy preserving search we debuted in the MacOS toolkit we put out a few weeks ago, and this one also has a fully encrypted neural network inference over credit card fraud data. If you like encryption, or like the idea of encrypted machine learning check it out! We built all the special dependencies for you, along with an integrated IDE setup to run the examples trivially. The encrypted ML example also uses a brand new, fresh out of the IBM research kitchen, encrypted machine learning library that makes it work.
This stuff is not fiction it is real and you can run it today if you want! Our toolkit is based on Docker and comes in Ubuntu, Fedora, and CentOS. You can even pull the docker images from Docker Hub. IF you want to see more of this effort show us some love on GitHub and Docker Hub by smashing that star button! Instructions are in the readme. Most people who know docker can get up to speed and running in less than 10 minutes. https://github.com/IBM/fhe-toolkit-linux/.
Monitoring the entirety of the internet for good questions and comments is not one of my superpowers. If anyone has questions get in touch with us on slack directly. The development team is here to help. Questions are great, we are trying to get together an FAQ. Hit us up on Slack here: https://app.slack.com/client/T0133ARBGBV#/. We want your feedback, questions, and ideas to help spread the word.
P.S. Thanks to user Darkstryder and throw0101a who commented below! You did some nice explanation for KaiserPros question, and shared some nice links for this community!
Surely, that means you also support equality tests. With that, it’s easy to build a lookup table, and the whole thing devolves to a glorified Caesar cipher. (With a permutation function instead of a rotation.)
What security guarantees does this library provide? What’s the attacker model? I see nothing about this on the front page of your github repo, or in the press releases.
Edit: For instance, can it tolerate chosen plaintext attacks? In a naive scheme:
If an attacker can get the cipher text for “1”, then they can compute 1+1=2, giving them the ciphertext for 2, and then, inductively, all the natural numbers.
The premise of FHE is that you send both data and code encrypted to a 3rd party system for execution and you can assume that an attacker has control of it. The attacker will see a series of seemingly random steps that mutate seemingly random data and send an encrypted response that can only be verified by the client. You don't have the answer in advance but you have a way of validating that the calculation was performed correctly as asked and the answer can be trusted. A statistical attack can be avoided since the client has the option to rotate the encryption keys without the 3rd party's knowledge although I'm not an expert so any mathematical comment is welcome.
My knowledge here is limited, but the short summary is that if done correctly FHE just looks like random execution on random data and that's what eliminates most attacks.
(I saw the one about machine learning, but thats broad and vague.)
From these operations (add and mul) you can create a NAND gate using the formula 1 - A * B (assuming A and B are matrices containing encrypted bits) and create any arbitrary boolean circuit from there. These circuits works on the encrypted data without the need to decrypt it.
(there is an additional step called bootstrapping that most schemes require in order to allow circuits of unlimited depth but I won’t get into that in such a short answer)
Seeing that one can NAND things, everything makes a lot more sense.
> In this paper we present an electronic voting system based on homomorphic encryption to ensure privacy, confidentiality in the voting. Our proposal offers all the advantages of the multiplicatively homomorphic encryption cryptosystems. The proposed voting scheme is suitable for multi-candidate elections as well as for elections in which contains neutral votes.
* https://ieeexplore.ieee.org/document/7492759
Others:
> * Securing Data Stored in the Cloud. Using homomorphic encryption, you can secure the data that you store in the cloud while also retaining the ability to calculate and search ciphered information that you can later decrypt without compromising the integrity of the data as a whole.
> * Enabling Data Analytics in Regulated Industries. Homomorphic encryption allows data to be encrypted and outsourced to commercial cloud environments for research and data-sharing purposes while protecting user or patient data privacy. […]
* https://www.venafi.com/blog/homomorphic-encryption-what-it-a...
White paper from a Microsoft crypto conference:
* http://homomorphicencryption.org/white_papers/applications_h...
Personally, I think it is the most applicable to the corporate "giants" of the world: now they can feel more free to offer each other services that operate on data that would normally be considered too risky to share, like financial data or private customer data. When the data is secured through FHE, there's no risk to letting anyone else run computations on it in order to provide you with value.
Run the scenario you describe, and people being intrusive, rent-collecting bullies that they can be, and do you think the sole-sourcing of "giants" will be a tame and orderly affair ?
There are two directions to take that thought at least.. one is, what did previous groups do in past times that did create positive results; and second, a tech games-theory approach to de-centralization mixed with special purpose business entities, with real checks and balances.
Personally, I assume that business cannot be trusted over time to keep the consumer of services best result in mind.
Practicality is a problem. You cannot have random access without performing some kind of linear scan over an array (all of which is expressed as a polynomial), so most software will perform extremely poorly. The actual cryptosystems are reasonable in terms of performance, but still carry a significant overhead. Even for ML tasks you are probably looking at 100-1000x performance overhead.
Some tasks intrinsically require a lot of random access to a large memory, meaning a memory larger than your fast CPU, and there is no way to buffer enough state inside the small memory of the CPU to make the random access non-random. (Note, random access here really means data-dependent addresses that don't follow patterns you can predict without doing the computation; they are not really random.)
For those tasks, address traffic from the CPU to the memory reveals information even if the data is encrypted, and this is the reason why it is said to require a linear scan of memory to perform random access while hiding the address of interest.
A more extreme version of this occurs with scanning large databases without revealing what you're looking for.
I'm not sure if the full linear scan is really essential, or if there's a way of representing data in memory (or data store) differently that relaxes the full scan requirement. E.g. by having the memory itself do some polynomial processing.
My final comment on performance is that the way the code is generally structured it makes sense to do things in batches in parallel as opposed to doing individual atomic transactional data operations, but I think theres a lot of room to explore in the performance and optimization space.
I think better reference examples, and a common platform to run examples on will foster the healthy exchange ideas and will help advance the art a lot. One of my personal goals for the toolkit is to provide people with demos to run (and with community help or a massive outpouring of interest and or funds to my benevolent corporate overlord), and help explore these tradeoffs using demos which are better than trivial complexity. Some computer scientist, software engineer, or applied mathematician might get interested in this subject and get hacking because we tried to make it easier to experiment.
We know we COULD do a lot with this stuff (tons of applications or ways to use FHE), but few ARE doing things with this to solve real problems.
Oh and if anyone wants, of course IBM can be contacted if you have a business problem you want to discuss, or need corporate education and such on these things. For non corporate folks, this toolkit gives EVERYONE access to some baseline reference technology. Stepping away from the corporate perspective, speaking as an individual and an individual and maintainer of the repo, soon I hope some more baseline educational materials if the community help engage with us to understand questions and better explain things. Reactions to this toolkit and inquiry from potential clients will really help us accelerate this work.
Thanks for the continued interest in the hacker community and I wish we had time to respond to every interesting comment here!
So general-purpose, apparently. Just slow.
From a few minutes of Googling, I can't find any obvious benchmarks.
[1]: https://arstechnica.com/gadgets/2020/07/ibm-completes-succes...
Edit: which, AIUI, means any function where you can a) prove it halts, and b) recursion and loops are converted into loops that execute for a constant number of loops known at compile time.
If I had some data encrypted with these tools, which I made public for multiple entities to process, is it possible for me to allow them to add data to the encrypted system? i.e., is there a way for multiple entities to add more data to the encrypted data (and do calculations with the encrypted contents) while only one party is able to extract the results of the whole resulting collection of data?
I have to say that a related question I have is how to get the opposite : making sure the third party only used the inputs I gave them and did not replaced them with their own, and making sure they processed these inputs through the exact program I gave them and not an altered version of it.
I have rough ideas about how one could do something like this but if anybody had a reference to literature on the topic, that would be great.