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.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

Previously in 2026.7.0

  • SLH-DSA external interface: FIPS 205 external pure signatures interoperate with OpenSSL, X.509, and CMS; signatures are not compatible with 2026.3.0 through 2026.6.0 (details)
  • SLH-DSA context support: SLHDSA_MessageAccumulator::SetContext for explicit-context signing
  • Stateful-signing hardening: LMS/HSS sign paths fail closed on invalid state reservations; reservations are bound to their issuing store
  • FileStateStore hardening: state-file size validation on open, zero-capacity rejection, and POSIX exclusive locking

Previously in 2026.6.0

  • LMS/HSS (SP 800-208): stateful hash-based signatures with durable state management (guide)
  • FileStateStore: reference durable backend for signing state persistence
  • PK_StatefulSigner: explicit stateful signing framework (not interchangeable with PK_Signer)
  • PQC Save/Load coverage: DER round-trip validation tests added for ML-KEM, ML-DSA, and SLH-DSA keys
  • Android CI: build coverage extended to x86_64 and x86 ABIs alongside the existing ARM lanes

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;
}