[HN Gopher] Concrete: A fully homomorphic encryption compiler
___________________________________________________________________
Concrete: A fully homomorphic encryption compiler
Author : zacchj
Score : 76 points
Date : 2023-05-05 08:38 UTC (1 days ago)
(HTM) web link (www.zama.ai)
(TXT) w3m dump (www.zama.ai)
| xrd wrote:
| Compare to Google's here:
|
| https://jeremykun.com/2023/02/13/googles-fully-homomorphic-e...
|
| It's a really fun write up. I prefer the syntax of Google's. But
| Zama is doing great work.
|
| I really enjoyed the podcast with them here. It clarified a lot
| for me about the intersection of FHE and ZK.
|
| https://zeroknowledge.fm/248-2/
| eachro wrote:
| Does anyone know of a good reference to get up to speed on FHE in
| ML?
| detrites wrote:
| If you just want to dive right in, this example from Concrete
| ML's repository is very clear:
|
| https://github.com/zama-ai/concrete-ml#a-simple-concrete-ml-...
| eachro wrote:
| Ah I should have been a bit more clear. I'm interested in how
| FHE actually works and the steps needed to transform general
| computation to its FHE equivalent.
| mmastrac wrote:
| I started working on a CPU that was designed for FHE about 10
| years ago, inspired by the ShapeCPU paper around that time [1]
| [2]. I've been waiting for someone to make a better gate-to-FHE
| compiler for some time.
|
| [1] https://github.com/mmastrac/oblivious-cpu [2]
| https://hcrypt.com/shape-cpu/
|
| FHE becomes a lot more interesting when you can hide the
| structure of your computation behind a VM.
| royjacobs wrote:
| This reminds me of one of those software protection libraries. I
| think it was by Syncrosoft, the company that used to protect
| software like Cubase before it got acquired by the manufacturer
| of Cubase, Steinberg.
|
| Basically you'd write your algorithms in C++ but instead of using
| the built-in types like int or float you'd use custom types that
| had all of their operators overloaded. Your code would look
| pretty similar to what you'd have before (modulo the type
| definitions) but when compiled your algorithm would turn into an
| incredibly inscrutable state machine where some parts of the
| state machine would come from some kind of protection dongle.
| Pretty effective.
| blintz wrote:
| Concrete is really impressive and permissively licensed. The ML
| library has a FHE version of (a subset of) scikit-learn, which I
| honestly thought I'd see in another 5+ years. Like look at this
| example: # Now we train in the clear and
| quantize the weights model = LogisticRegression(n_bits=8)
| model.fit(X_train, y_train) # We can simulate the
| predictions in the clear y_pred_clear =
| model.predict(X_test) # We then compile on a
| representative set model.compile(X_train) #
| Finally we run the inference on encrypted inputs !
| y_pred_fhe = model.predict(X_test, fhe="execute")
| print("In clear :", y_pred_clear) print("In FHE :",
| y_pred_fhe) print(f"Similarity: {int((y_pred_fhe ==
| y_pred_clear).mean()*100)}%")
|
| There's some ways to go on performance, but the ergonomics of
| using FHE are already pretty good!
___________________________________________________________________
(page generated 2023-05-06 23:00 UTC)