Documentation Index
Fetch the complete documentation index at: https://mintlify.com/octra-labs/pvac_hfhe_cpp/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before installing PVAC-HFHE, ensure your development environment meets these requirements:C++17 compiler
You need a compiler that supports C++17 or later:
- GCC: Version 9 or higher
- Clang: Version 10 or higher
- MSVC: Visual Studio 2019 or higher
Clone the repository
PVAC-HFHE is a header-only library, so installation is straightforward:Project structure
After cloning, your directory should look like this:Include in your project
PVAC-HFHE is header-only, so you just need to add the include path:Compiler flags explained
| Flag | Purpose |
|---|---|
-std=c++17 | Enable C++17 standard support (required) |
-O2 | Enable optimization level 2 for better performance |
-march=native | Use CPU-specific instructions (PCLMUL, AVX, etc.) |
-I./include | Add the include directory to the compiler search path |
Verify installation
Test your installation by building and running the examples:Run basic usage example
Integration methods
Method 1: Direct include path
Add the PVAC-HFHE include directory to your compiler flags:Method 2: Copy headers to system path
Copy headers to your system include directory:-I flag:
Method 3: CMake integration
For CMake projects, add the include directory:CMakeLists.txt
Troubleshooting
Compiler error: 'std::optional' not found
Compiler error: 'std::optional' not found
This indicates your compiler doesn’t fully support C++17. Update to:
- GCC 9 or higher
- Clang 10 or higher
- MSVC 2019 or higher
Undefined reference errors during linking
Undefined reference errors during linking
PVAC-HFHE is header-only and doesn’t require linking. Ensure you’re including
pvac/pvac.hpp in your source files.Slow performance
Slow performance
Ensure you’re compiling with optimization flags:
- Add
-O2or-O3for optimization - Add
-march=nativeto enable CPU-specific instructions - Check that your CPU supports PCLMUL instructions
Cannot find pvac/pvac.hpp
Cannot find pvac/pvac.hpp
Verify the include path is correct:
Next steps
Quickstart guide
Build your first homomorphic encryption application.
Basic operations
Learn the fundamental operations for working with encrypted data.