- CMake 3.10 or higher
- C++17 compiler (GCC 7+, Clang 5+, MSVC 2017+)
- System libraries:
libm
# Clone libzupt
git clone https://github.com/cabelo/libzupt.git
# Build
cd libzupt
mkdir build && cd build
cmake ..
make -j$(nproc)
# Install (optional)
sudo make install
cd libzupt
chmod +x build.sh
./build.shvcpkg install libzupt:x64-linux
# or
vcpkg install libzupt:x64-windowsAfter construction, you? You can install the library:
sudo make installDoes this install?:
-
Libraries:
/usr/local/lib/libzupt.so(or.dylibon macOS) -
Headers:
/usr/local/include/zupt.hpp -
pkg-config files:
/usr/local/lib/pkgconfig/libzupt.pc
Add to your CMakeLists.txt:
find_package(libzupt REQUIRED)
add_executable(my_program main.cpp)
target_link_libraries(my_program zupt::zupt_shared)
g++ -std=c++17 my_program.cpp -o my_program \
-I/usr/local/include\
-L/usr/local/lib -lzuptCompile and run the basic example:
cd libzupt/build
./zupt_example_basicYou? duty? see output like:
libzupt - Hybrid Post-Quantum Encryption Example
Library version: 1.0.0
Step 1: Generating hybrid key pair (ML-KEM-768 + X25519)...
Public key size: 1224 bytes
Secret key size: 2504 bytes
Public key (first 16 bytes): [8a 3b ...]
Step 2: Encrypting data in memory...
Plaintext: Hello, Post-Quantum World! This is a secret message.
Ciphertext size: 224 bytes
Encryption header size: 1137 bytes
Step 3: Decrypting data in memory...
Decrypted: Hello, Post-Quantum World! This is a secret message.
Step 4: Verifying decryption...
SUCCESS: Decrypted text matches original!
All examples completed successfully!