pqblocks-jwe-audit
High-throughput JSON Web Encryption (JWE) cryptographic policy auditor enforcing CNSA 2.0 and NIST FIPS 203 PQC standards.
Overview
pqblocks-jwe-audit is an ultra-fast, zero-dependency policy enforcement tool for auditing JSON Web Encryption (JWE) structures (RFC 7516) against post-quantum cryptography standards.
It enables API gateways, security proxies, identity providers, and compliance pipelines to inspect incoming and outgoing JWE tokens in microseconds, flagging quantum-vulnerable key exchange algorithms and validating post-quantum compliance.
Standards Alignment
- RFC 7516: JSON Web Encryption (JWE) Compact & JSON Serialization.
- RFC 7518: JSON Web Algorithms (JWA).
- NIST FIPS 203: Module-Lattice-Based Key-Encapsulation Mechanism (ML-KEM-768, ML-KEM-1024).
- NSA CNSA 2.0: Commercial National Security Algorithm Suite 2.0 quantum migration timeline and requirements.
Installation
pip install pqblocks-jwe-audit
Dependencies
Requires Python 3.11+. Pure Python with zero external dependencies (dependencies = []).
Quickstart
from pqblocks_jwe_audit import audit_jwe, ComplianceStandard
# Inspect an incoming JWE compact token
jwe_token = "eyJhbGciOiJSU0EtT0FFUC0yNTYiLCJlbmMiOiJBMjU2R0NNIn0.dummy_key.dummy_iv.dummy_ct.dummy_tag"
result = audit_jwe(jwe_token, standards=[ComplianceStandard.CNSA_2_0])
print(f"Compliant: {result.compliant}")
print(f"Flagged Algorithms: {result.flagged_algorithms}")
# Compliant: False
# Flagged Algorithms: ['RSA-OAEP-256']
Features
- Microsecond Policy Auditing: Audits headers in ~4.15 microseconds (>240,000 evaluations/second).
- Zero Runtime Dependencies: Uses Python standard library (
json,base64,enum,typing). - Comprehensive Policy Profiles: Built-in support for NIST FIPS 203, NSA CNSA 2.0, and strict post-quantum requirements.
- Fail-Secure Validation: Rejects malformed headers, unapproved algorithms, and legacy RSA/ECC schemes.
Documentation
- BENCHMARKS.md - Performance metrics and batch throughput.
- TESTING.md - Test harness details and 100% test coverage.
- EVIDENCE.md - Cryptographic policy and standard references.
- VERIFICATION_REPORT.md - Multi-python verification log.
- USE_CASES.md - Integration recipes for API gateways and microservices.
- SECURITY_NOTES.md - Security scope and parser considerations.
- AGENTS.md - Automated verification and integration instructions.
- CHANGELOG.md - Release history.
License
Metadata
Release files for pqblocks-jwe-audit 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pqblocks_jwe_audit-0.1.0.tar.gz | 12.1 kB | Without provenance | Details for pqblocks_jwe_audit-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pqblocks_jwe_audit-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pqblocks_jwe_audit-0.1.0-py3-none-any.whl |
Total release size: 23.4 kB
Release files / pqblocks_jwe_audit-0.1.0.tar.gz
| Download URL | pqblocks_jwe_audit-0.1.0.tar.gz |
|---|---|
| Size | 12.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
75296fefc31110eea856882394b997a64e5cbaf59a30021261d9e4002c4038b8
|
|
BLAKE2b-256 checksum How to use checksums |
8c6bc25d4cd8640dd95afcf736e8f241a19a13f7b1dbcf4f66fc44d2bce0cc03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pqblocks_jwe_audit-0.1.0-py3-none-any.whl
| Download URL | pqblocks_jwe_audit-0.1.0-py3-none-any.whl |
|---|---|
| Size | 11.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7bef484eda411d0e1b1b627a4f0f65cc45903609a3cdf947967bf4aefe488b26
|
|
BLAKE2b-256 checksum How to use checksums |
8fdc983540dd12b95b4bc72c518ed0f39869281279384c209f90692264c8e6bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for pqblocks-jwe-audit 0.1.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.