Transactions on Cryptographic Hardware and Embedded Systems, Volume 2024
Improved Circuit Synthesis with Multi-Value Bootstrapping for FHEW-like Schemes
README
fhewsyn
Netlist repository for the paper Improved Circuit Synthesis with Multi-Value Bootstrapping for FHEW-like Schemes by Johannes Mono, Kamil Kluczniak, and Tim Güneysu [1].
Netlists
The directory data/
contains the following netlists:
- addX: Add two X-bit numbers.
- calculator: Simple 16-bit calculator supporting addition, substraction and multiplication.
- constX: Add a X-bit constant to a X-bit number.
- image: Process an 8x8 grayscale image using a Gaussian blur, sharpening, or ricker wavelet.
- relu: Computes the ReLU of a 16-bit integer.
- sqrt: Computes the square root of a 16-bit integer.
- strrev: Reverses an array of characters of up to 8 characters.
- structs: Computes the sum for a 32-bit integer field in a multi-dimensional array of structs, each dimension is upper bounded by 2.
- sum: Computes the sum of two 32-bit integers.
- sum3d: Computes the sum for a three-dimensional array of 8-bit integers with maximum dimensions 2, 3, 2.
Reproduce
You need Yosys (we used commit 7ce5011c24bc4c605578bb16576cadf79373e23f
) and HAL (we used commit fdbea579c21d56028730b86740cf124d2bc38639
).
We also use the python packages functools
, natsort
, collections
, and re
.
You can reproduce netlist generation as follows where X
is the maximum look-up table size:
./build.sh boolean -a
./build.sh lut -aX
./build.sh lutfa -aX
For X = 2
, you have to comment in line 3 in src/lut.ys
and src/lutfa.ys
, otherwise Yosys will still generate three-bit look-up tables.
For FHE-Deck's dependencies, see fhe-deck-core/README.md
.
You can generate, build, and run the benchmarking code as follows:
./bench.sh
cd fhe-deck-core
cmake -S . -B build
cmake --build build
bench/run.sh
Cite
@article{fhewsyn,
author = {Johannes Mono and Kamil Kluczniak and Tim G{\"{u}}neysu},
title = {Improved Circuit Synthesis with Amortized Bootstrapping for {FHEW}-like Schemes},
journal = {IACR Cryptol. ePrint Arch.},
pages = {1223},
year = {2023},
url = {https://eprint.iacr.org/2023/1223},
timestamp = {Fri, 08 Sep 2023 15:28:09 +0200},
biburl = {https://dblp.org/rec/journals/iacr/MonoKG23.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}