Skip to main content

PQ-CP-ABE Python SDK

  • PyPI distribution: pq-cp-abe
  • Import: import pq_cp_abe
  • The repository root VERSION is the sole build version; installed packages read the embedded distribution metadata.
  • All 33 DLL exports listed for v6.0.1 have declared ctypes signatures and can be accessed as pq_cp_abe.native.<C_symbol>; low-level native buffers require native.freeBuffer. Python-friendly wrappers are provided for the additional AES-GCM, ML-DSA-87, setup/genkey buffer and CoverCrypt authority operations.
  • Run python bindings/python/hybrid_pq_cp_abe.py --test or python -m pq_cp_abe --test for an end-to-end, disposable Python-only self-test. It invokes all 33 native symbols, verifies roundtrips across AC17/TKN20/CoverCrypt, AES-GCM, ML-DSA and CoverCrypt authority updates. It does not build C++ or modify application keys; the temporary test files are removed automatically. Exit code 0 means PASS; a nonzero code means FAIL.

Layout

pq_cp_abe/_native.py handles ctypes loading and the C ABI, api.py exposes the existing Python API, __main__.py implements the CLI, and _libs/ holds the bundled native runtimes.

Native GitHub Release as the binary source

.github/workflows/publish-pypi.yml uses already published native ZIPs from the exact v<VERSION> GitHub Release. It does not build C++, Rust or Go and does not use local lib/ or build/artifacts/ output. stage_native.py downloads the release's SHA256SUMS.txt, verifies the archive's SHA-256 and extracts only runtime binaries.

OS Architecture Required runtime
Windows x86_64 libhybrid-pq-cp-abe.dll and libcpabe_tkn20.dll
Linux x86_64 libhybrid-pq-cp-abe.so
macOS Intel x86_64 libhybrid-pq-cp-abe.dylib
macOS Apple Silicon arm64 libhybrid-pq-cp-abe.dylib

The wheel is platform-specific and uses Python-independent py3-none-<platform> tags. Linux wheels are repaired/audited with auditwheel for manylinux; macOS wheels use delocate. Different macOS architectures are separate wheels, not incorrectly marked universal2. Windows wheels require both DLLs.

Build/check on CI

From the repository on the matching GitHub Actions runner:

python bindings/python/stage_native.py --platform windows --arch x86_64
python -m pip install build
python -m build --wheel bindings/python
python bindings/python/verify_wheel.py --wheel-dir bindings/python/dist

Substitute windows/x86_64 with the actual runner target. On Linux/macOS, repair the wheel before calling verify_wheel.py, as in the workflow.

The verifier installs the wheel outside the source checkout, checks its internal native files and version, and runs AC17/TKN20/CoverCrypt setup, user key generation and encrypt/decrypt roundtrips. Do not use a local cached binary to judge a GitHub Release.

Publishing

From GitHub Actions, run Build Python Wheels with the publish input set to false to build/test/download the wheel artifacts only.

Once all four jobs pass, configure a PyPI Trusted Publisher for this GitHub repository, workflow publish-pypi.yml, and environment pypi. Then manually dispatch the workflow with publish=true. This is opt-in: no deployment occurs on ordinary pushes or releases.

The existing native release.yml is unchanged and Python publishing is independent. Source distribution (sdist) is intentionally not published because it cannot install a functioning native runtime by itself.

For local source development, the SDK can still fall back to the repository's lib/ binaries when available. This is separate from GitHub Release staging for wheels.

Compatibility entrypoints bindings/python/hybrid_pq_cp_abe.py and bindings/python/test_api.py remain, while new callers should use pq_cp_abe.

Metadata

Release files for pq-cp-abe 6.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for pq-cp-abe 6.0.1
File Actions
pq_cp_abe-6.0.1-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for pq_cp_abe-6.0.1-py3-none-win_amd64.whl
pq_cp_abe-6.0.1-py3-none-manylinux_2_34_x86_64.whl Python 3 none Linux glibc 2.34+ x86-64 Details for pq_cp_abe-6.0.1-py3-none-manylinux_2_34_x86_64.whl
pq_cp_abe-6.0.1-py3-none-macosx_15_0_x86_64.whl Python 3 none macOS 15.0+ x86-64 Details for pq_cp_abe-6.0.1-py3-none-macosx_15_0_x86_64.whl
pq_cp_abe-6.0.1-py3-none-macosx_15_0_arm64.whl Python 3 none macOS 15.0+ ARM64 Details for pq_cp_abe-6.0.1-py3-none-macosx_15_0_arm64.whl

Total release size: 17.5 MB

Release files / pq_cp_abe-6.0.1-py3-none-win_amd64.whl

Download URL pq_cp_abe-6.0.1-py3-none-win_amd64.whl
Size 2.9 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
e40e59fc48f7a6e0ecdc295657f01d9aa8cc76cff62b59895719629437a66bd3
BLAKE2b-256 checksum
How to use checksums
506d05858be18cba2a33fe88f60eff7567752fd0a87efb6b329b53ac622c37bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Release files / pq_cp_abe-6.0.1-py3-none-manylinux_2_34_x86_64.whl

Download URL pq_cp_abe-6.0.1-py3-none-manylinux_2_34_x86_64.whl
Size 7.3 MB
Tags Linux glibc 2.34+ x86-64 Python 3
SHA-256 checksum
How to use checksums
5dcf1eff69393bc27c2368b8f6d0ae119aa4248851fb524c7dee9365ac59376c
BLAKE2b-256 checksum
How to use checksums
84146fa1bb2ff996deaeefd36ec4d569da07c2c624b0b9bcce0793f18d2cc7e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Release files / pq_cp_abe-6.0.1-py3-none-macosx_15_0_x86_64.whl

Download URL pq_cp_abe-6.0.1-py3-none-macosx_15_0_x86_64.whl
Size 3.8 MB
Tags Python 3 macOS 15.0+ x86-64
SHA-256 checksum
How to use checksums
79726a2ef5286cd7aa2a1995e5600209fde7fd4079c887e663489174db004894
BLAKE2b-256 checksum
How to use checksums
9043ded59d627bc9a41aaa9985580bcf53f37857598687f594e01c7f890ba1c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Release files / pq_cp_abe-6.0.1-py3-none-macosx_15_0_arm64.whl

Download URL pq_cp_abe-6.0.1-py3-none-macosx_15_0_arm64.whl
Size 3.5 MB
Tags Python 3 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
415c93776543e6a66478e645fee008ba15c82ad5883eeeee58d43bbd159b8036
BLAKE2b-256 checksum
How to use checksums
53c9a8cfb1055626769852fcc3a090974bf99088502e3469dbcf8f2156739595
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Security for pq-cp-abe 6.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 4 files in this release have been uploaded with provenance metadata.

Select from 4 files

Attestation for pq_cp_abe-6.0.1-py3-none-win_amd64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

6.0.1 This release

4 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page