Skip to content

Commit dd638ab

Browse files
committed
Added SUBSET_KEY description
1 parent fc81381 commit dd638ab

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ option(USE_CONCRETE "Use the parameter set proposed in CONCRETE" OFF)
1818
option(USE_TFHE_RS "Use the parameter set proposed in TFHE-rs" OFF)
1919
option(USE_TERNARY "Use ternary secret keys" OFF)
2020
option(USE_COMPRESS "Use compressed ciphertexts" OFF)
21+
option(USE_SUBSET_KEY "Use subset key" OFF)
2122

2223
option(USE_TERNARY_CMUX "Use ternary cmux" OFF)
2324
option(USE_KEY_BUNDLE "Use key bundle algorithm" OFF)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[![Test](https://github.com/virtualsecureplatform/TFHEpp/actions/workflows/test.yml/badge.svg)](https://github.com/virtualsecureplatform/TFHEpp/actions/workflows/test.yml)
22
# TFHEpp
3-
TFHEpp is full Scracthed pure C++ Ver. of TFHE. TFHEpp is slightly(about 10%) faster than original [TFHE implementation](https://github.com/tfhe/tfhe). In addition to that, THFEpp supports [Circuit Bootstrapping](https://eprint.iacr.org/2018/421), [Programable Boootstrapping many LUT](https://eprint.iacr.org/2021/729), and [Modifed Chen's Packing](https://eprint.iacr.org/2024/1318) (We call it as annihilate key switching in our code).
3+
TFHEpp is full Scracthed pure C++ Ver. of TFHE. TFHEpp is slightly(about 10%) faster than original [TFHE implementation](https://github.com/tfhe/tfhe). In addition to that, THFEpp supports [Circuit Bootstrapping](https://eprint.iacr.org/2018/421), [Programable Boootstrapping many LUT](https://eprint.iacr.org/2021/729), [Partial Key](https://eprint.iacr.org/2023/979) (Named as subset key in the code),and [Modifed Chen's Packing](https://eprint.iacr.org/2024/1318) (We call it as annihilate key switching in our code).
44
We also includes partial support for B/FV, written in include/bfv++.hpp.
55
TFHEpp depends on AVX2 because we use SPQLIOS FMA. If you want run TFHEpp without AVX2, see spqlios++ branch. It include pure C++ implementation of SPQLIOS as header only library, but slow.
66

src/key.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ lweKey::lweKey()
1616
for (typename lvlhalfparam::T &i : lvlhalf) i = lvlhalfgen(generator);
1717
for (typename lvl1param::T &i : lvl1) i = lvl1gen(generator);
1818
for (typename lvl2param::T &i : lvl2) i = lvl2gen(generator);
19+
#ifdef USE_SUBSET_KEY
20+
for(int i = 0; i < lvl1param::k*lvl1param::n; i++) lvl2[i] = lvl1[i];
21+
#endif
1922
}
2023

2124
template <class P>

0 commit comments

Comments
 (0)