
DEB is a homomorphic encryption, decryption, and key generation library implementing the CKKS scheme.
- Secret-key generation and management
- Encryption and decryption operations
- Evaluation(public)-key generation and management
- Serialization support for encrypted objects and keys
cmake --preset release
cmake --build --preset releaseThe project uses CMake presets for configuration. Available presets:
- release: Optimized build with
-O3optimization - debug: Debug build with symbols and no optimization
You can also configure custom builds:
# Configure with custom options
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON
# Build
cmake --build build
# Install
cmake --build build --target installBUILD_SHARED_LIBS: Build a shared library instead of a static one. (default: OFF)DEB_BUILD_BENCHMARK: Build the benchmark suite. (default: OFF)DEB_BUILD_DOXYGEN: Build the documentation with Doxygen. (default: OFF)DEB_BUILD_EXAMPLES: Build the example programs. (default: ON)DEB_BUILD_TEST: Build the test suite. (default: ON)DEB_BUILD_WITH_OMP: Build with OpenMP support. (default: ON)DEB_INSTALL: Install the deb library and headers. (default: ON)DEB_INSTALL_ALEA: Install the alea library when installing deb. (default: OFF)DEB_INSTALL_FLATBUFFERS: Install the flatbuffers library when installing deb. (default: OFF)DEB_RUNTIME_RESOURCE_CHECK: Enable runtime resource check. (default: ON)
Run all tests:
ctest --preset all-testRun specific test suites:
cd build
ctest -R <test_name_pattern>The examples/ directory contains sample programs demonstrating various features of the DEB library:
-
KeyGeneration.cpp: Demonstrates how to generate secret keys and evaluation keys
./build/examples/KeyGeneration
-
EnDecryption.cpp: Shows basic encryption and decryption operations with a single secret key
./build/examples/EnDecryption
-
EnDecryption-MultiSecret.cpp: Demonstrates encryption and decryption with multi-secret parameter
./build/examples/EnDecryption-MultiSecret
-
SeedOnlySecretKey.cpp: Shows how to generate and use seed-only secret keys for efficient key storage
./build/examples/SeedOnlySecretKey
-
Serialization.cpp: Demonstrates how to serialize and deserialize encrypted objects and keys
./build/examples/Serialization
All examples are automatically built when DEB_BUILD_EXAMPLES=ON (default). Run them from the build directory after building the project.
deb is licensed under the Apache License 2.0, which means that you are free to get and use it for commercial and non-commercial purposes as long as you fulfill its conditions.
See the LICENSE file for more details.