tfhe / tfhe

TFHE: Fast Fully Homomorphic Encryption Library over the Torus
Other
1.24k stars 175 forks source link

Implement HideCPU on top of TFHE #231

Open mmastrac opened 4 years ago

mmastrac commented 4 years ago

HideCPU is a successor to ShapeCPU - an 8-bit processor built from arbitrary logic gates (~20,000 gates). It was originally built to live on XOR and AND gates and should be able to work on top of TFHE:

https://github.com/mmastrac/oblivious-cpu/tree/master/hidecpu

nindanaoto commented 4 years ago

Hello,@mmastrac

I'm grad to see you again outside HN. I'm the writer of another CPU emulator over TFHE, (https://github.com/virtualsecureplatform/kvsp) a nd another TFHE implementation. (https://github.com/virtualsecureplatform/TFHEpp)

I think this idea is not so difficult since you are currently using libScarab, which supports Bootstrapping and logical operataions, XOR and AND over Smart-Vercauteren Cryptosystem. So, your idea, just replacing XOR and AND by TFHE's ones seems to be work.The only thing I care about is how your code handling Bootstrapping because TFHE always does Bootstrapping when evaluating logic gates. This may different from libScarab.

However, I don't know Java implementation of TFHE. So, you may need wrapping TFHE by JAVA, or rewrite your code in other language.

As far as I know, existing TFHE reimplementations are following ones. https://github.com/virtualsecureplatform/TFHEpp (C++) https://github.com/virtualsecureplatform/pyFHE (Python) https://github.com/virtualsecureplatform/cuFHE (CUDA) https://github.com/nucypher/nufhe (Python wrapper of CUDA&OpenCL) https://github.com/nucypher/TFHE.jl

These projects may also helpful for you although they only accept Brainf*uck language. https://github.com/joeltg/brainfreeze https://github.com/f-prime/arcanevm

I hope these are helpful for you.