This project demonstrates a simple, toy implementation of fully homomorphic encryption (FHE) in C++. It supports encryption, decryption, homomorphic addition, multiplication, and simulated bootstrapping (noise reset).
- Toy FHE scheme (not secure for real use)
- Arbitrary integer message support (within modulus limits)
- Homomorphic addition and multiplication
- Bootstrapping (noise reset by decrypting and re-encrypting)
- Large random prime modulus for improved demonstration security
cmake -S . -B build
cmake --build build./build/fhe_app.exe
./build/fhe_test.exe-
src/fhe.hpp,src/fhe.cpp: FHE implementation. -
src/main.cpp: Example usage -
tests/test.cpp: Sample tests
This code is for educational purposes only. For real FHE, use libraries like Microsoft SEAL or HElib e.t.c.