[Wiki]
Iyokan is a generic engine for evaluating logical circuits, such as processors, over fully homomorphic encryption like TFHE. Currently, Iyokan supports TFHEpp and cuFHE (TFHE implementation for CPU and GPU, respectively).
$ mkdir build && cd build
$ cmake -DCMAKE_BUILD_TYPE=Release ..
$ make
See binaries in build/bin/.
If you want to enable CUDA support, use CMake option IYOKAN_ENABLE_CUDA.
You may have to tell CMake where to find CUDA by CMAKE_CUDA_COMPILER and
CMAKE_CUDA_HOST_COMPILER like this:
$ cmake -DIYOKAN_ENABLE_CUDA=On -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc \
-DCMAKE_CUDA_HOST_COMPILER=/usr/bin/clang-8 \
..
CMake builds Iyokan with 128-bit security by default.
If you want weaker (but faster and more memory efficient) security,
use -DIYOKAN_80BIT_SECURITY=On.
The default TFHE parameter family uses Block Binary keys and Subset Keys
(USE_BLOCK_BINARY=ON, USE_SUBSET_KEY=ON). Existing secret/evaluation keys,
encrypted packets, and snapshots made with the former defaults are not
compatible: regenerate them after upgrading. CPU and CUDA builds use the same
split Fourier archive layout, so the regenerated artifacts can be shared
between Iyokan, Tangor, and KVSP backends.
Run Ruby script test.rb at Iyokan's root directory like this
(assume that target binaries are in build/bin/):
$ sudo gem install toml-rb
$ ruby test.rb build/bin
If you want to run slow but detailed tests including ones for CUDA support:
$ ruby test.rb build/bin slow cuda
Here, we explicitly specify two requirements to correctly synthesize the Verilog file to supported JSON format.
- The name of reset must be
resetnotrstor any other name.
- We treat ``reset'' as a special name. Currently, we remove all
reset'related logic and the DFF initalization at the beggining. If you use other name, you will see a strange initizalization behavior.
- Use only $DFF_P as a flipflop. Make it sure by running
dfflegalize -cell $_DFF_P_ 01
- At least for Yosys 0.55 (we forgot exact version for this change), the flipflop will be synthesized as $SDFF_PP0 or $SDFF_PP1 in the default setting. However, we decided to stick supporting only $DFF_P because we treat the
resetin a special manner. This might be merely interface issue, so if you really neeed $SDFF_PP0 and $SDFF_PP1, please make PR or issue.
See our wiki for tutorials and more!
