Installation
cryptopp-modern is distributed as source releases. Download the latest release package, build, and install on Windows, Linux, and macOS.
Downloads
Latest Release (2025.12.0)
| File | Description |
|---|---|
| cryptopp-modern-2025.12.0.zip | Source release |
| cryptopp-modern-2025.12.0.zip.sig | GPG signature (binary) |
| cryptopp-modern-2025.12.0.zip.asc | GPG signature (ASCII) |
| cryptopp-modern-2025.12.0.zip.sha256 | SHA256 checksum |
Verify Download
# Verify GPG signature
gpg --verify cryptopp-modern-2025.12.0.zip.sig cryptopp-modern-2025.12.0.zip
# Verify SHA256 checksum
sha256sum -c cryptopp-modern-2025.12.0.zip.sha256- All Releases: Release History
Build Systems
cryptopp-modern can be built with either CMake or the provided GNUmakefile, with additional Visual Studio and nmake options on Windows. Choose the option that best fits your development environment.
| Build System | Best For |
|---|---|
| CMake | IDE integration, presets, find_package() support |
| GNUmakefile | Traditional Make-based workflows, Linux/macOS |
| Visual Studio | Native Windows development with full IDE |
| nmake | Windows command-line builds without IDE |
Building with CMake
CMake is one of the supported build systems for cryptopp-modern. It provides IDE integration, presets for common configurations, and proper find_package() support for consuming projects.
Linux / macOS
# Download and extract release
cd /tmp
wget https://github.com/cryptopp-modern/cryptopp-modern/releases/download/2025.12.0/cryptopp-modern-2025.12.0.zip
unzip -q cryptopp-modern-2025.12.0.zip -d cryptopp
cd cryptopp
# Configure with default preset (Release, Ninja)
cmake --preset=default
# Build
cmake --build build/default -j$(nproc)
# Run tests
./build/default/cryptest.exe v
# Install
sudo cmake --install build/default --prefix /usr/localWindows (MSVC)
# Download and extract release, then in the extracted folder:
# Configure with MSVC preset
cmake --preset=msvc
# Build Release configuration
cmake --build build\msvc --config Release
# Run tests
.\build\msvc\Release\cryptest.exe v
# Install (run as Administrator)
cmake --install build\msvc --prefix C:\cryptoppWindows (MinGW)
# Download and extract release, then in the extracted folder:
# Configure with default preset
cmake --preset=default
# Build (use -j4 or similar if nproc is unavailable)
cmake --build build/default -j$(nproc)
# Run tests
./build/default/cryptest.exe vCMake Presets
The project includes pre-configured build presets:
| Preset | Generator | Build Type | Description |
|---|---|---|---|
default | Ninja | Release | Default build for Linux/macOS/MinGW |
debug | Ninja | Debug | Debug build with symbols |
msvc | Visual Studio 17 2022 | - | Windows MSVC build |
msvc-release | Visual Studio 17 2022 | Release | MSVC release build |
no-asm | Ninja | Release | Pure C++ (no assembly) |
# List all available presets
cmake --list-presetsCMake Options
| Option | Default | Description |
|---|---|---|
CRYPTOPP_BUILD_TESTING | ON | Build the test executable |
CRYPTOPP_INSTALL | ON | Generate install targets |
CRYPTOPP_DISABLE_ASM | OFF | Disable all assembly optimisations |
CRYPTOPP_USE_OPENMP | OFF | Enable OpenMP for parallel algorithms |
# Example: Build without assembly
cmake -B build -DCRYPTOPP_DISABLE_ASM=ON
cmake --build buildBuilding with GNUmakefile
The GNUmakefile provides a straightforward Make-based build for cryptopp-modern, suitable for classic command-line workflows and packaging scripts.
Linux
# Prepare build environment
sudo apt-get update
sudo apt-get install -y \
build-essential \
g++ \
make \
wget \
unzip
# Download and extract
cd /tmp
wget https://github.com/cryptopp-modern/cryptopp-modern/releases/download/2025.12.0/cryptopp-modern-2025.12.0.zip
unzip -q cryptopp-modern-2025.12.0.zip -d cryptopp
cd cryptopp
# Build and install
make -j$(nproc)
sudo make install PREFIX=/usr/local
sudo ldconfig
# Verify installation
./cryptest.exe vWindows (MinGW)
# Download release from:
# https://github.com/cryptopp-modern/cryptopp-modern/releases/download/2025.12.0/cryptopp-modern-2025.12.0.zip
# Extract the zip file
# Open MinGW terminal and navigate to extracted folder
# Build (use -j4 or similar if nproc is unavailable)
mingw32-make.exe -j$(nproc)
# Test
./cryptest.exe vmacOS
# Download and extract
cd /tmp
curl -L -O https://github.com/cryptopp-modern/cryptopp-modern/releases/download/2025.12.0/cryptopp-modern-2025.12.0.zip
unzip -q cryptopp-modern-2025.12.0.zip -d cryptopp
cd cryptopp
# Build and install
make -j$(sysctl -n hw.ncpu)
sudo make install PREFIX=/usr/local
# Verify installation
./cryptest.exe vBuilding with Visual Studio
Visual Studio provides native Windows development with full IDE support, debugging, and IntelliSense.
# Clone or download the source
git clone https://github.com/cryptopp-modern/cryptopp-modern.git
cd cryptopp-modern
# Open cryptest.sln in Visual Studio
# Build → Build Solution (Ctrl+Shift+B)The solution includes projects for:
cryptlib- Static librarycryptdll- Dynamic library (DLL)cryptest- Test executable
Building with nmake
nmake provides Windows command-line builds without requiring the full Visual Studio IDE, using the MSVC compiler toolchain.
# Open "Developer Command Prompt for VS" or "x64 Native Tools Command Prompt"
# Clone or download the source
git clone https://github.com/cryptopp-modern/cryptopp-modern.git
cd cryptopp-modern
# Build
nmake /f cryptest.nmake
# Test
cryptest.exe vBuilding from Git Source
Note: For most users, we recommend using the release packages. Building from git is intended for developers who want to contribute or test unreleased changes.
Linux / macOS (GNUmakefile)
git clone https://github.com/cryptopp-modern/cryptopp-modern.git
cd cryptopp-modern
make -j$(nproc)
sudo make install PREFIX=/usr/local
sudo ldconfig # Linux onlyLinux / macOS / Windows (CMake)
git clone https://github.com/cryptopp-modern/cryptopp-modern.git
cd cryptopp-modern
cmake --preset=default
cmake --build build/defaultWindows (MinGW)
git clone https://github.com/cryptopp-modern/cryptopp-modern.git
cd cryptopp-modern
mingw32-make.exe -j10Prerequisites
All Platforms
- C++11 (or newer) compatible compiler
For CMake Builds
- CMake 3.20 or higher
- Ninja (recommended) or Make
Linux
- GCC 4.8+ or Clang 3.4+
- GNU Make (for GNUmakefile builds)
Install on Ubuntu/Debian:
sudo apt-get update
sudo apt-get install build-essential cmake ninja-buildInstall on Fedora/RHEL:
sudo dnf install gcc-c++ make cmake ninja-buildmacOS
- Xcode Command Line Tools
xcode-select --install
brew install cmake ninja # For CMake buildsWindows
For CMake builds:
For GNUmakefile builds:
For Visual Studio builds:
- Visual Studio 2022 (or 2019) with “Desktop development with C++” workload
For nmake builds:
- Visual Studio Build Tools (includes nmake and MSVC compiler)
Build Configuration
Static Library (Default)
The default make command produces libcryptopp.a, a static library:
makeThis produces libcryptopp.a which can be linked statically into your applications.
Dynamic/Shared Library
make dynamicThis produces libcryptopp.so on Linux, libcryptopp.dylib on macOS, or libcryptopp.dll on Windows.
Debug Build
make CXXFLAGS="-g -O0"Custom C++ Standard
# Build with C++11
make CXXFLAGS="-DNDEBUG -g2 -O3 -std=c++11"
# Build with C++17
make CXXFLAGS="-DNDEBUG -g2 -O3 -std=c++17"Custom Installation Location
# Install to custom prefix
make install PREFIX=/opt/cryptopp-modern
# Install to user directory (no sudo needed)
make install PREFIX=$HOME/.localVerify Installation
Run the validation tests:
# Quick validation
./cryptest.exe v
# Full test vectors
./cryptest.exe tv allExpected output:
All tests passed!Using in Your Project
Compiler Flags
# Compile
g++ -std=c++11 myapp.cpp -I/usr/local/include -L/usr/local/lib -lcryptopp
# With static linking
g++ -std=c++11 myapp.cpp -I/usr/local/include -L/usr/local/lib -lcryptopp -staticCMake (find_package)
If you built cryptopp-modern with CMake and installed it, you can use find_package():
cmake_minimum_required(VERSION 3.20)
project(MyApp)
find_package(cryptopp-modern REQUIRED)
add_executable(myapp main.cpp)
target_link_libraries(myapp PRIVATE cryptopp::cryptopp)Build your project:
cmake -B build -DCMAKE_PREFIX_PATH=/path/to/cryptopp-install
cmake --build buildCMake (Manual)
If you installed with GNUmakefile or need manual configuration:
cmake_minimum_required(VERSION 3.10)
project(MyApp)
set(CMAKE_CXX_STANDARD 11)
find_library(CRYPTOPP_LIB cryptopp PATHS /usr/local/lib)
include_directories(/usr/local/include)
add_executable(myapp main.cpp)
target_link_libraries(myapp ${CRYPTOPP_LIB})Makefile
CXX = g++
CXXFLAGS = -std=c++11 -I/usr/local/include
LDFLAGS = -L/usr/local/lib -lcryptopp
myapp: main.cpp
$(CXX) $(CXXFLAGS) -o myapp main.cpp $(LDFLAGS)
Advanced Build Options
For advanced build options including sanitisers, code coverage, SIMD feature flags, and more, see the detailed documentation in the source distribution:
CMAKE.md- Full CMake build system referenceGNUMAKEFILE.md- Full GNUmakefile build system reference
Next Steps
- Quick Start Guide - Get started with your first program
- Beginner’s Guide - Complete tutorial for beginners
- Security Concepts - Essential security practices