Skip to content

Hybrid PQ-CP-ABE Library — Version 5.2.1

Note

IMPORTANT NOTICE: - From Version 4.0, this library natively supports and includes Post-Quantum Cryptography (PQC). - If your project DOES NOT need PQC (to save space, avoid liboqs dependencies, or minimize performance overhead), please download and use Version 3.1 from the Releases page.

Version 5.2.1 focuses on Windows build reliability, native release automation, complete dependency packaging, and explicit project licensing. The stable core remains AC17/TKN20 with ML-DSA-87 signatures; this release does not introduce a new encryption scheme or change the ciphertext format.

Windows build fixes

  • Fixed false dependency-build failures caused by Windows PowerShell losing a child process's exit code. Actual failures now identify the dependency and exit code.
  • Replaced Get-FileHash with streaming .NET SHA-256 for dependency fingerprints and the ready marker. Windows PowerShell workers also prioritize their own module directory when inheriting a PowerShell 7 CI environment.
  • Fixed MSYS GNU Make invoking cmd.exe with rewritten flags and escaped quotes. C/C++ builds continue to use MSVC x64; MinGW is used only for the Go TKN20 bridge behind its C ABI DLL.
  • Made object-directory creation a shared Make prerequisite to avoid parallel builds failing when several compiler jobs create the same directory.
  • Matched Crypto++ and liboqs to the native library's /MD runtime, resolving the LNK4098 runtime conflict.
  • Removed byte-identical duplicate archive members from the Rust static library while relocating its COFF indexes and preserving its symbols, resolving LNK4006 warnings when building the combined static library.
  • Enabled UTF-8 source decoding for MSVC dependency builds to resolve C4819.
  • Stopped detecting cl.exe as a generic assembler in liboqs CMake builds.
  • Consolidated liboqs's MSVC optimization-barrier warning at configuration time instead of repeating it for each object file. The upstream fallback remains unchanged; this limitation has not been eliminated.

Crypto++ static and DLL outputs

On Windows, make deps now produces all three Crypto++ artifacts together in build/deps/windows/lib/cryptopp/:

  • libcryptopp.lib: static library used by the native core.
  • cryptopp.dll: ordinary, non-FIPS DLL exposing the upstream DLL API.
  • cryptopp.lib: import library for DLL consumers.

The ordinary DLL uses the shared CRT allocation functions instead of legacy MSVCRT allocator discovery. Its power-up algorithm self-tests run without the legacy Win32 MAC-generation tool. The compliance-enabled upstream path retains its integrity check. The x64 DLL also uses a suitable image base with ASLR.

Build commands and integration

  • make test and make tests now run the same test suite.
  • make clean and make clean-deps print the affected directories and a completion message.
  • Windows builds retain and publish libhybrid-pq-cp-abe_dll.lib, the import library needed to consume the native DLL through MSVC.
  • macOS shared-library builds use an @rpath install name.

Windows consumers still need the compatible Microsoft Visual C++ runtime. The TKN20 runtime dependency, libcpabe_tkn20.dll, must remain available beside the consuming executable or through its configured DLL search path.

GitHub release workflow

The release workflow now builds from source on native runners, instead of packaging historical binaries from obsolete paths. It targets:

Platform Architecture Toolchain
Windows x86_64 MSVC x64
Linux x86_64 GCC
macOS Intel x86_64 Apple Clang
macOS Apple Silicon arm64 Apple Clang
  • Pushing a v* tag or publishing a GitHub Release triggers the build.
  • A manual workflow run builds Actions artifacts without publishing a release.
  • Native tests must pass before packaging. Missing binaries, empty files, and Git LFS pointers cause packaging to fail.
  • Packages include the CLI, public/dependency headers, static/shared libraries, individual dependency libraries, and available third-party license notices.
  • The packager checks that the extracted CLI runs and that the extracted shared library loads and exposes its version.
  • Linux dependency packages retain SONAME aliases; macOS packaged dylibs receive relocatable install names and ad-hoc signatures.
  • All four ZIP packages must be present before publication. Release assets also include SHA256SUMS.txt.

License

  • Added the official Apache License 2.0 text for original project code, with Copyright 2026 Thien Lai.
  • Added NOTICE and clarified the license scope in the README.
  • Third-party code retains its own terms, including CoverCrypt's bundled BUSL-1.1 license. The root license does not relicense dependencies.

Validation status before release

  • Windows native suite: 35 tests passed during the build-fix validation.
  • Crypto++ DLL: AES and SHA-256 known-answer checks, RNG use, and power-up self-tests passed through a real MSVC-linked DLL consumer.
  • Workflow syntax and expressions: checked with actionlint 1.7.12.
  • Release packaging: 6 automated tests passed, covering platform layouts, missing DLL import libraries, LFS pointers, unsafe versions, epoch timestamps, and the requirement for all four release archives.
  • A Windows ZIP was built, extracted, and checked by running its CLI and loading its shared library.
  • Linux and both macOS targets still require validation on GitHub-hosted runners. These notes do not claim that their native builds have already passed. Commit the workflow and supporting files before testing the workflow or creating the v5.2.1 tag.