Skip to content

Modern Cryptography 
for C++

Actively maintained fork of Crypto++ with modern algorithms, 
better organisation, and regular security updates.

Why cryptopp-modern?

What’s New

2026.9.1

  • ARM acceleration restored: the CRC32 and PMULL feature probes could not find arm_simd.h since 2025.12.0, so default CMake and GNUmakefile builds left CRC32 and GCM multiplication on the software paths
  • Apple arm64 hardware dispatch: hardware AES, PMULL, SHA-1 and SHA-256 on Apple Silicon, with the optional CRC32, SHA-3 and SHA-512 extensions detected through sysctl
  • HSS error paths: signer caches are rebuilt after a failed signing attempt, so a retry no longer produces an invalid signature and a burned index; LMS and HSS key generation leaves the key unchanged on failure
  • Shared and static in one pass: CRYPTOPP_BUILD_STATIC alongside CRYPTOPP_BUILD_SHARED, and BUILD_SHARED_LIBS now selects the library type
  • CMake packaging and detection: the configured include directory is exported, pkg-config output is per configuration and carries the Debug postfix, the feature probes no longer fail on warnings under -Werror, a failed AVX-512 probe falls back cleanly, and a new CRYPTOPP_WERROR option turns warnings into errors for the library build

Previously in 2026.9.0

  • RFC 9802 LMS encoding: standalone LMS public keys now use the RFC form, keys saved by earlier releases still load, and HSS L=1 parameter sets are added (details)
  • PQC key hardening: failed BER decodes leave keys unchanged, unset keys refuse to encode, and ML-KEM key generation is transactional
  • FileStateStore durability: the parent directory is flushed when a state file is created on POSIX systems
  • Packaging: CRYPTOPP_INSTALL_CRYPTEST installs the cryptest tool and its data; pkg-config output handles absolute install directories

Previously in 2026.8.1

  • BLAKE3 multi-chunk fixes: digests of messages longer than 1024 bytes could be wrong on big-endian targets, while partial final blocks could depend on uninitialised stack contents on any architecture. The x86 wide hashing paths could also read outside the chaining-value stack for some exact power-of-two chunk counts
  • DEFLATE hardening: malformed streams declaring an invalid HLIT value are rejected instead of overrunning the inflator’s code-length table
  • Shared-build tests: cryptest no longer fails RTTI casts against hidden-visibility shared builds, as seen on FreeBSD with Clang and libc++

Previously in 2026.8.0

  • Unix shared libraries: CMake and GNUmakefile build libcryptopp.so and .dylib; the ELF SONAME series starts at libcryptopp.so.9
  • Mixed-parameter HSS: per-level LMS/LM-OTS parameters with HSS_SHA256_H10W4_H5W8_L2 and LM-OTS W1/W2/W4 sets (details)
  • ChaCha SIMD fix: counter carry in the NEON, SSE2, and Altivec backends; the keystream was wrong when the 32-bit block counter overflowed inside a multi-block request
  • Input validation: BLAKE3 public inputs checked at runtime; zero-length AEAD tags and invalid zero-iteration PBKDF calls rejected

Previously in 2026.7.1

  • Packaging: CMake and pkg-config files install under the library directory
  • pkg-config: libcryptopp.pc restored, with a cryptopp-modern.pc alias
  • Distribution: signed .tar.gz release (LF) alongside the .zip (CRLF); repository line endings normalised
  • Release-signing key published for archive verification

View Full Changelog

Quick Example

#include <cryptopp/blake3.h>
#include <cryptopp/hex.h>
#include <iostream>

int main() {
    CryptoPP::BLAKE3 hash;
    std::string message = "Hello, cryptopp-modern!";
    std::string digest;

    CryptoPP::StringSource(message, true,
        new CryptoPP::HashFilter(hash,
            new CryptoPP::HexEncoder(
                new CryptoPP::StringSink(digest))));

    std::cout << "BLAKE3: " << digest << std::endl;
    return 0;
}