Really fun article.
A few interesting notes for me:
Looks like there are ways to parallelize the circuit operations. I always thought one of the criticisms of FHE is that it’s crazy expensive to compute, but this indicates that you can do some optimizations that might permit you to speed things up and still maintain security.
The code to encrypt and calculate then decrypt is very compact and easy to understand. The setup step is easy as well. Very exciting example.
About the only thing i recall from my computer science courses is the concept of single entry, single exit (https://softwareengineering.stackexchange.com/a/118793)
This caught my eye:
This can cause some problem if the input code has loops with complex exit criteria (i.e., break‘s guarded by if/else)
I imagine that writing code without early returns will help the circuit do the right thing. I’ve definitely been swayed away from my rigidness about SESE since leaving the university environment, but sloppy programming can really bite you if you aren’t careful anyway.
Lastly, there is something surreal about the last example where you take a Rick Astley video that’s 9MB and it becomes 188GB after FHE. That seems like a new category of rick-rolling by some cyberpunk.