kpf432-shield 1.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- kpf432_shield-1.2.0/LICENSE.md +20 -0
- kpf432_shield-1.2.0/PKG-INFO +106 -0
- kpf432_shield-1.2.0/README.md +78 -0
- kpf432_shield-1.2.0/kpf432_shield.egg-info/PKG-INFO +106 -0
- kpf432_shield-1.2.0/kpf432_shield.egg-info/SOURCES.txt +9 -0
- kpf432_shield-1.2.0/kpf432_shield.egg-info/dependency_links.txt +1 -0
- kpf432_shield-1.2.0/kpf432_shield.egg-info/entry_points.txt +2 -0
- kpf432_shield-1.2.0/kpf432_shield.egg-info/top_level.txt +1 -0
- kpf432_shield-1.2.0/kpf432_shield.py +2384 -0
- kpf432_shield-1.2.0/pyproject.toml +53 -0
- kpf432_shield-1.2.0/setup.cfg +4 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# OMNISAVALON Dual-Shield License (ASL-ULPF Continuum)
|
|
2
|
+
|
|
3
|
+
Author & Copyright Holder: **Ihor Dietochevskyi (Игорь Деточевский / Ігор Дєточевський • OMNISAVALON)**.
|
|
4
|
+
|
|
5
|
+
## 1. Open-Source & Research Grant (Free)
|
|
6
|
+
|
|
7
|
+
You may use, study, copy, modify, and distribute this software free of charge for:
|
|
8
|
+
- Personal, educational, and academic research purposes;
|
|
9
|
+
- Open-Source software distributed under an OSI-approved license;
|
|
10
|
+
- Non-commercial evaluation of post-quantum hybrid verification and CIRG algorithm diversity scanning.
|
|
11
|
+
|
|
12
|
+
Attribution to **Ihor Dietochevskyi (OMNISAVALON)** must remain intact in all copies and derivative works.
|
|
13
|
+
|
|
14
|
+
## 2. Commercial CI/CD & Proprietary Team Use (`€49` Team / `€99` Enterprise)
|
|
15
|
+
|
|
16
|
+
Use inside proprietary commercial production CI/CD pipelines, commercial SaaS products, or closed-source corporate compliance workflows requires a Commercial Team or Enterprise License from OMNISAVALON (one-time fee, zero recurring subscription, zero tracking).
|
|
17
|
+
|
|
18
|
+
## 3. Warranty
|
|
19
|
+
|
|
20
|
+
This software is provided as-is without warranty of any kind. Zero tracking or hidden network beacons are included.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: kpf432-shield
|
|
3
|
+
Version: 1.2.0
|
|
4
|
+
Summary: Zero-dependency PQC algorithm diversity auditor (CycloneDX CBOM, SARIF 2.1.0, ASN.1 DER X.509, OpenSSH, TLS), tiered crypto-agility ratchet, and dual-orthogonal SHAKE256 signer.
|
|
5
|
+
Author: Ihor Dietochevskyi (OMNISAVALON)
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/OMNISAVALON/kpf432-pqc-shield
|
|
8
|
+
Project-URL: Repository, https://github.com/OMNISAVALON/kpf432-pqc-shield
|
|
9
|
+
Project-URL: Issues, https://github.com/OMNISAVALON/kpf432-pqc-shield/issues
|
|
10
|
+
Project-URL: Changelog, https://github.com/OMNISAVALON/kpf432-pqc-shield/blob/main/ROADMAP.md
|
|
11
|
+
Keywords: post-quantum-cryptography,pqc,cbom,sarif,nis2,devsecops,x509,shake256,module-lwe,wots-plus
|
|
12
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: Information Technology
|
|
16
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Topic :: Security :: Cryptography
|
|
24
|
+
Requires-Python: >=3.10
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE.md
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
|
|
29
|
+
# KPF-432 Multi-Basis PQC Shield, Perimeter Auditor & Crypto-Agility (`v1.2.0`)
|
|
30
|
+
|
|
31
|
+
- **Runtime:** Pure Python 3.12 stdlib CLI (`0` `pip` dependencies, `0` network calls, `0` tracking) + `14,467 B` `#![no_std]` Rust `WASM32` browser verifier
|
|
32
|
+
- **Hash / XOF:** Standard FIPS 202 `SHAKE256` (`hashlib.shake_256` in CLI, `Keccak-f[1600]` in Rust WASM32)
|
|
33
|
+
- **Author:** **Ihor Dietochevskyi (OMNISAVALON)** — *Part of the OMNISAVALON engineering ecosystem.* ([ROADMAP](ROADMAP.md))
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## What KPF-432 Does (`v1.2.0`)
|
|
38
|
+
|
|
39
|
+
1. **DevSecOps PQC Readiness & CIRG Diversity Scanner (CI/CD Ready):**
|
|
40
|
+
- Scans source code (`.py`, `.rs`, `.js`, `.ts`, `.go`, `.java`, `.c`, `.cpp`, etc.), dependency manifests (`package.json`, `Cargo.toml`, `pyproject.toml`, `requirements.txt`, `go.mod`, `pom.xml`), and configs separately from documentation (`scoring_basis: code_and_manifests`).
|
|
41
|
+
- Detects `CLASSICAL_ONLY_QUANTUM_EXPOSED` (`RSA`, `ECDSA`, `Ed25519`, `X25519`) and `LATTICE_MONOCULTURE_RISK` (structured-lattice PQC deployed without hash-based or code-based fallback).
|
|
42
|
+
- Exports **CycloneDX 1.6 CBOM** (`--cbom`, including infra `certificate` and `protocol` assets), **SARIF 2.1.0** (`--sarif`, with `baselineState`), README **SVG badges** (`--badge`), and Markdown compliance certificates sealed with `SHAKE256` (`--cert-md`).
|
|
43
|
+
2. **Infrastructure Perimeter Scanner (0 External ASN.1/OpenSSL Packages):**
|
|
44
|
+
- **Pure-Python ASN.1 DER X.509 PEM Parser:** Decodes certificate OIDs (`RSA` with exact modulus bit length e.g. `RSA-1024`/`RSA-2048`, `sha1WithRSAEncryption`, `ECDSA`, `Ed25519`, plus NIST `ML-DSA` & `SLH-DSA`) directly from DER bytes.
|
|
45
|
+
- **OpenSSH Wire Key Parser:** Extracts exact RSA bit lengths from `ssh-rsa`, `ssh-dss`, `ecdsa-*`, and `ssh-ed25519` public keys in `authorized_keys`, `known_hosts`, and `.pub` files.
|
|
46
|
+
- **TLS / SSH / Container / Kubernetes Hardening:** Flags `TLSv1.0`/`TLSv1.1`, `TLSv1.2`-without-`TLSv1.3`, weak ciphers, missing hybrid PQC KEM groups (`X25519MLKEM768` / `mlkem768x25519-sha256`), `cert-manager` classical keys, `openssl genrsa` in `Dockerfiles`, and committed PEM private-key blocks.
|
|
47
|
+
3. **Tiered Crypto-Agility Gates (`observe` -> `hybrid` -> `enforce`) & Ratchet Baseline:**
|
|
48
|
+
- Adopt PQC progressively without breaking legacy production builds: start in `--mode observe`, record a repo snapshot via `--write-baseline`, block new classical/infra regressions in PRs with `--baseline` (exit code `5`, SARIF `baselineState: new`), transition via `--mode hybrid`, and lock in full multi-basis readiness with `--mode enforce`.
|
|
49
|
+
4. **Deterministic Unicode / BiDi Hygiene Gate (`--fail-on-hygiene`):**
|
|
50
|
+
- Catches **CVE-2021-42574 BiDi override/isolate controls** (`U+202A..U+202E`, `U+2066..U+2069`), **zero-width invisible characters** (`U+200B..U+200D`, `U+2060`), and unexpected **stray CJK UI tokens** (such as `U+6536 U+8D77` collapse-button glyphs) across code, configs, and manifests with line/column/codepoint reporting in SARIF 2.1.0. Pass `--allow-cjk` for CJK-localized repositories.
|
|
51
|
+
5. **Reference Dual-Orthogonal Hybrid Signer (`Module-LWE AND Stateful WOTS+/Merkle`):**
|
|
52
|
+
- **Root 1 (Algebraic Lattice):** `Module-LWE / Module-SIS` over `Z_8380417[X]/(X^256 + 1)` with `k=4, l=4, eta=2, tau=39, gamma1=131072`, unbiased rejection sampling, and negacyclic NTT.
|
|
53
|
+
- **Root 2 (Stateful Hash Tree):** Stateful `WOTS+` (`w=16, 67` chains) + `Merkle Tree` (`H=6, 64` one-time leaves in CLI; `H=4` in browser demo) over `SHAKE256`, with strict monotonic `next_leaf_idx` persistence and exhaustion guards (`STATEFUL_WOTS_LEAVES_EXHAUSTED`).
|
|
54
|
+
- Verification uses strict conjunction (`AND`): both roots must validate independently.
|
|
55
|
+
|
|
56
|
+
> **Security & Scope Notice:** The CI/CD scanner (`--audit`, `--cbom`, `--sarif`, `--fail-on-hygiene`) is production-ready for repository posture and hygiene gating. The bundled dual-root signer is a compact, zero-dependency reference/research implementation over `SHAKE256` — it is **not** wire-compatible with NIST FIPS 204 (`ML-DSA`) or FIPS 205 (`SLH-DSA`). For regulated production artifact signing, pair it with audited FIPS 204 + FIPS 205 implementations.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Quick Start (Zero `pip` Runtime Dependencies)
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# 0. Optional one-command CLI install directly from GitHub release tag (PyPI package: kpf432-shield)
|
|
64
|
+
pip install git+https://github.com/OMNISAVALON/kpf432-pqc-shield.git@v1.2.0
|
|
65
|
+
kpf432-shield --self-test
|
|
66
|
+
|
|
67
|
+
# 1. Or run the single file directly with zero installation: Verify SHAKE256 KAT, dual-root sign/verify, ASN.1 DER X.509 & ratchet
|
|
68
|
+
python3 kpf432_shield.py --self-test
|
|
69
|
+
|
|
70
|
+
# 2. Audit repository + TLS/SSH/X.509 perimeter in progressive ratchet mode
|
|
71
|
+
python3 kpf432_shield.py --audit ./src --mode observe --write-baseline kpf432-baseline.json
|
|
72
|
+
python3 kpf432_shield.py --audit ./src \
|
|
73
|
+
--mode hybrid \
|
|
74
|
+
--baseline kpf432-baseline.json \
|
|
75
|
+
--out cirg-report.json \
|
|
76
|
+
--cbom cirg-cbom.json \
|
|
77
|
+
--sarif cirg-audit.sarif \
|
|
78
|
+
--badge cirg-badge.svg \
|
|
79
|
+
--cert-md cirg-certificate.md \
|
|
80
|
+
--fail-on-hygiene \
|
|
81
|
+
--min-score 70
|
|
82
|
+
|
|
83
|
+
# 3. Generate a reference hybrid keypair and sign/verify sequentially (stateful next_leaf_idx persists in key.json)
|
|
84
|
+
python3 kpf432_shield.py --keygen --out kpf432-keys.json
|
|
85
|
+
python3 kpf432_shield.py --sign release.tar.gz --key kpf432-keys.json --out release.kpf432.sig.json
|
|
86
|
+
python3 kpf432_shield.py --verify release.tar.gz --pub kpf432-keys.json --sig release.kpf432.sig.json
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## GitHub Action (`OMNISAVALON/kpf432-pqc-shield@v1`)
|
|
92
|
+
|
|
93
|
+
See [`example-release-workflow.yml`](example-release-workflow.yml) to enforce minimum CIRG diversity scores and Unicode BiDi hygiene while generating `cirg-audit.sarif`, `cirg-cbom.json`, and `cirg-badge.svg` in CI.
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Licensing (`ASL-ULPF` Dual-License)
|
|
98
|
+
|
|
99
|
+
| Tier | Scope | Price |
|
|
100
|
+
| :--- | :--- | :---: |
|
|
101
|
+
| **Open-Source Core** | Personal use, academic research, and OSI-approved Open-Source projects (`kpf432_shield.py` CLI + WASM32 verifier) | **Free (`€0`)** |
|
|
102
|
+
| **Team Commercial CI/CD License** | Proprietary commercial repositories, automated CI/CD SARIF/CBOM & perimeter ratchet gates | [**`€49` Polar.sh**](https://buy.polar.sh/polar_cl_dMJIX55p4wxqCdtNOTFGPjTMPGaX86vIQkfft1rtcET) • [**Creem.io**](https://www.creem.io/product/prod_1vddNqCkFlV2mEtsWQ3Sle) |
|
|
103
|
+
| **Enterprise Shield Pack** | Organization-wide CI/CD deployment across unlimited internal pipelines | [**`€99` Polar.sh**](https://buy.polar.sh/polar_cl_KiMfZlY08hU1e02FaTKBTMyTw74g9RTWQT82Z37UKpY) • [**Creem.io**](https://www.creem.io/product/prod_7JPr4qr8WgvcO2CdEN6MMI) |
|
|
104
|
+
| **Express PQC, TLS/SSH & CBOM Audit (NIS2 Ready)** | Full repository + X.509/TLS/SSH/K8s perimeter audit within 48h (CycloneDX 1.6 CBOM, SARIF 2.1.0, `--baseline` ratchet JSON, migration plan + Team license) | [**`€199` Polar.sh**](https://buy.polar.sh/polar_cl_12XyL6B6CjbyReKFtgIYy4A6F9OhqRWnKgTYB4Y1PjY) • [**Creem.io**](https://www.creem.io/product/prod_2W6uqL4g0ePSYsqfayOUJ7) |
|
|
105
|
+
|
|
106
|
+
Interactive browser WASM32 verifier: `https://omnisavalon-kpf432-pqc-site.static.hf.space/` — see `LICENSE.md` for full terms.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# KPF-432 Multi-Basis PQC Shield, Perimeter Auditor & Crypto-Agility (`v1.2.0`)
|
|
2
|
+
|
|
3
|
+
- **Runtime:** Pure Python 3.12 stdlib CLI (`0` `pip` dependencies, `0` network calls, `0` tracking) + `14,467 B` `#![no_std]` Rust `WASM32` browser verifier
|
|
4
|
+
- **Hash / XOF:** Standard FIPS 202 `SHAKE256` (`hashlib.shake_256` in CLI, `Keccak-f[1600]` in Rust WASM32)
|
|
5
|
+
- **Author:** **Ihor Dietochevskyi (OMNISAVALON)** — *Part of the OMNISAVALON engineering ecosystem.* ([ROADMAP](ROADMAP.md))
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## What KPF-432 Does (`v1.2.0`)
|
|
10
|
+
|
|
11
|
+
1. **DevSecOps PQC Readiness & CIRG Diversity Scanner (CI/CD Ready):**
|
|
12
|
+
- Scans source code (`.py`, `.rs`, `.js`, `.ts`, `.go`, `.java`, `.c`, `.cpp`, etc.), dependency manifests (`package.json`, `Cargo.toml`, `pyproject.toml`, `requirements.txt`, `go.mod`, `pom.xml`), and configs separately from documentation (`scoring_basis: code_and_manifests`).
|
|
13
|
+
- Detects `CLASSICAL_ONLY_QUANTUM_EXPOSED` (`RSA`, `ECDSA`, `Ed25519`, `X25519`) and `LATTICE_MONOCULTURE_RISK` (structured-lattice PQC deployed without hash-based or code-based fallback).
|
|
14
|
+
- Exports **CycloneDX 1.6 CBOM** (`--cbom`, including infra `certificate` and `protocol` assets), **SARIF 2.1.0** (`--sarif`, with `baselineState`), README **SVG badges** (`--badge`), and Markdown compliance certificates sealed with `SHAKE256` (`--cert-md`).
|
|
15
|
+
2. **Infrastructure Perimeter Scanner (0 External ASN.1/OpenSSL Packages):**
|
|
16
|
+
- **Pure-Python ASN.1 DER X.509 PEM Parser:** Decodes certificate OIDs (`RSA` with exact modulus bit length e.g. `RSA-1024`/`RSA-2048`, `sha1WithRSAEncryption`, `ECDSA`, `Ed25519`, plus NIST `ML-DSA` & `SLH-DSA`) directly from DER bytes.
|
|
17
|
+
- **OpenSSH Wire Key Parser:** Extracts exact RSA bit lengths from `ssh-rsa`, `ssh-dss`, `ecdsa-*`, and `ssh-ed25519` public keys in `authorized_keys`, `known_hosts`, and `.pub` files.
|
|
18
|
+
- **TLS / SSH / Container / Kubernetes Hardening:** Flags `TLSv1.0`/`TLSv1.1`, `TLSv1.2`-without-`TLSv1.3`, weak ciphers, missing hybrid PQC KEM groups (`X25519MLKEM768` / `mlkem768x25519-sha256`), `cert-manager` classical keys, `openssl genrsa` in `Dockerfiles`, and committed PEM private-key blocks.
|
|
19
|
+
3. **Tiered Crypto-Agility Gates (`observe` -> `hybrid` -> `enforce`) & Ratchet Baseline:**
|
|
20
|
+
- Adopt PQC progressively without breaking legacy production builds: start in `--mode observe`, record a repo snapshot via `--write-baseline`, block new classical/infra regressions in PRs with `--baseline` (exit code `5`, SARIF `baselineState: new`), transition via `--mode hybrid`, and lock in full multi-basis readiness with `--mode enforce`.
|
|
21
|
+
4. **Deterministic Unicode / BiDi Hygiene Gate (`--fail-on-hygiene`):**
|
|
22
|
+
- Catches **CVE-2021-42574 BiDi override/isolate controls** (`U+202A..U+202E`, `U+2066..U+2069`), **zero-width invisible characters** (`U+200B..U+200D`, `U+2060`), and unexpected **stray CJK UI tokens** (such as `U+6536 U+8D77` collapse-button glyphs) across code, configs, and manifests with line/column/codepoint reporting in SARIF 2.1.0. Pass `--allow-cjk` for CJK-localized repositories.
|
|
23
|
+
5. **Reference Dual-Orthogonal Hybrid Signer (`Module-LWE AND Stateful WOTS+/Merkle`):**
|
|
24
|
+
- **Root 1 (Algebraic Lattice):** `Module-LWE / Module-SIS` over `Z_8380417[X]/(X^256 + 1)` with `k=4, l=4, eta=2, tau=39, gamma1=131072`, unbiased rejection sampling, and negacyclic NTT.
|
|
25
|
+
- **Root 2 (Stateful Hash Tree):** Stateful `WOTS+` (`w=16, 67` chains) + `Merkle Tree` (`H=6, 64` one-time leaves in CLI; `H=4` in browser demo) over `SHAKE256`, with strict monotonic `next_leaf_idx` persistence and exhaustion guards (`STATEFUL_WOTS_LEAVES_EXHAUSTED`).
|
|
26
|
+
- Verification uses strict conjunction (`AND`): both roots must validate independently.
|
|
27
|
+
|
|
28
|
+
> **Security & Scope Notice:** The CI/CD scanner (`--audit`, `--cbom`, `--sarif`, `--fail-on-hygiene`) is production-ready for repository posture and hygiene gating. The bundled dual-root signer is a compact, zero-dependency reference/research implementation over `SHAKE256` — it is **not** wire-compatible with NIST FIPS 204 (`ML-DSA`) or FIPS 205 (`SLH-DSA`). For regulated production artifact signing, pair it with audited FIPS 204 + FIPS 205 implementations.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Quick Start (Zero `pip` Runtime Dependencies)
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
# 0. Optional one-command CLI install directly from GitHub release tag (PyPI package: kpf432-shield)
|
|
36
|
+
pip install git+https://github.com/OMNISAVALON/kpf432-pqc-shield.git@v1.2.0
|
|
37
|
+
kpf432-shield --self-test
|
|
38
|
+
|
|
39
|
+
# 1. Or run the single file directly with zero installation: Verify SHAKE256 KAT, dual-root sign/verify, ASN.1 DER X.509 & ratchet
|
|
40
|
+
python3 kpf432_shield.py --self-test
|
|
41
|
+
|
|
42
|
+
# 2. Audit repository + TLS/SSH/X.509 perimeter in progressive ratchet mode
|
|
43
|
+
python3 kpf432_shield.py --audit ./src --mode observe --write-baseline kpf432-baseline.json
|
|
44
|
+
python3 kpf432_shield.py --audit ./src \
|
|
45
|
+
--mode hybrid \
|
|
46
|
+
--baseline kpf432-baseline.json \
|
|
47
|
+
--out cirg-report.json \
|
|
48
|
+
--cbom cirg-cbom.json \
|
|
49
|
+
--sarif cirg-audit.sarif \
|
|
50
|
+
--badge cirg-badge.svg \
|
|
51
|
+
--cert-md cirg-certificate.md \
|
|
52
|
+
--fail-on-hygiene \
|
|
53
|
+
--min-score 70
|
|
54
|
+
|
|
55
|
+
# 3. Generate a reference hybrid keypair and sign/verify sequentially (stateful next_leaf_idx persists in key.json)
|
|
56
|
+
python3 kpf432_shield.py --keygen --out kpf432-keys.json
|
|
57
|
+
python3 kpf432_shield.py --sign release.tar.gz --key kpf432-keys.json --out release.kpf432.sig.json
|
|
58
|
+
python3 kpf432_shield.py --verify release.tar.gz --pub kpf432-keys.json --sig release.kpf432.sig.json
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## GitHub Action (`OMNISAVALON/kpf432-pqc-shield@v1`)
|
|
64
|
+
|
|
65
|
+
See [`example-release-workflow.yml`](example-release-workflow.yml) to enforce minimum CIRG diversity scores and Unicode BiDi hygiene while generating `cirg-audit.sarif`, `cirg-cbom.json`, and `cirg-badge.svg` in CI.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Licensing (`ASL-ULPF` Dual-License)
|
|
70
|
+
|
|
71
|
+
| Tier | Scope | Price |
|
|
72
|
+
| :--- | :--- | :---: |
|
|
73
|
+
| **Open-Source Core** | Personal use, academic research, and OSI-approved Open-Source projects (`kpf432_shield.py` CLI + WASM32 verifier) | **Free (`€0`)** |
|
|
74
|
+
| **Team Commercial CI/CD License** | Proprietary commercial repositories, automated CI/CD SARIF/CBOM & perimeter ratchet gates | [**`€49` Polar.sh**](https://buy.polar.sh/polar_cl_dMJIX55p4wxqCdtNOTFGPjTMPGaX86vIQkfft1rtcET) • [**Creem.io**](https://www.creem.io/product/prod_1vddNqCkFlV2mEtsWQ3Sle) |
|
|
75
|
+
| **Enterprise Shield Pack** | Organization-wide CI/CD deployment across unlimited internal pipelines | [**`€99` Polar.sh**](https://buy.polar.sh/polar_cl_KiMfZlY08hU1e02FaTKBTMyTw74g9RTWQT82Z37UKpY) • [**Creem.io**](https://www.creem.io/product/prod_7JPr4qr8WgvcO2CdEN6MMI) |
|
|
76
|
+
| **Express PQC, TLS/SSH & CBOM Audit (NIS2 Ready)** | Full repository + X.509/TLS/SSH/K8s perimeter audit within 48h (CycloneDX 1.6 CBOM, SARIF 2.1.0, `--baseline` ratchet JSON, migration plan + Team license) | [**`€199` Polar.sh**](https://buy.polar.sh/polar_cl_12XyL6B6CjbyReKFtgIYy4A6F9OhqRWnKgTYB4Y1PjY) • [**Creem.io**](https://www.creem.io/product/prod_2W6uqL4g0ePSYsqfayOUJ7) |
|
|
77
|
+
|
|
78
|
+
Interactive browser WASM32 verifier: `https://omnisavalon-kpf432-pqc-site.static.hf.space/` — see `LICENSE.md` for full terms.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: kpf432-shield
|
|
3
|
+
Version: 1.2.0
|
|
4
|
+
Summary: Zero-dependency PQC algorithm diversity auditor (CycloneDX CBOM, SARIF 2.1.0, ASN.1 DER X.509, OpenSSH, TLS), tiered crypto-agility ratchet, and dual-orthogonal SHAKE256 signer.
|
|
5
|
+
Author: Ihor Dietochevskyi (OMNISAVALON)
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/OMNISAVALON/kpf432-pqc-shield
|
|
8
|
+
Project-URL: Repository, https://github.com/OMNISAVALON/kpf432-pqc-shield
|
|
9
|
+
Project-URL: Issues, https://github.com/OMNISAVALON/kpf432-pqc-shield/issues
|
|
10
|
+
Project-URL: Changelog, https://github.com/OMNISAVALON/kpf432-pqc-shield/blob/main/ROADMAP.md
|
|
11
|
+
Keywords: post-quantum-cryptography,pqc,cbom,sarif,nis2,devsecops,x509,shake256,module-lwe,wots-plus
|
|
12
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: Information Technology
|
|
16
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Topic :: Security :: Cryptography
|
|
24
|
+
Requires-Python: >=3.10
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE.md
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
|
|
29
|
+
# KPF-432 Multi-Basis PQC Shield, Perimeter Auditor & Crypto-Agility (`v1.2.0`)
|
|
30
|
+
|
|
31
|
+
- **Runtime:** Pure Python 3.12 stdlib CLI (`0` `pip` dependencies, `0` network calls, `0` tracking) + `14,467 B` `#![no_std]` Rust `WASM32` browser verifier
|
|
32
|
+
- **Hash / XOF:** Standard FIPS 202 `SHAKE256` (`hashlib.shake_256` in CLI, `Keccak-f[1600]` in Rust WASM32)
|
|
33
|
+
- **Author:** **Ihor Dietochevskyi (OMNISAVALON)** — *Part of the OMNISAVALON engineering ecosystem.* ([ROADMAP](ROADMAP.md))
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## What KPF-432 Does (`v1.2.0`)
|
|
38
|
+
|
|
39
|
+
1. **DevSecOps PQC Readiness & CIRG Diversity Scanner (CI/CD Ready):**
|
|
40
|
+
- Scans source code (`.py`, `.rs`, `.js`, `.ts`, `.go`, `.java`, `.c`, `.cpp`, etc.), dependency manifests (`package.json`, `Cargo.toml`, `pyproject.toml`, `requirements.txt`, `go.mod`, `pom.xml`), and configs separately from documentation (`scoring_basis: code_and_manifests`).
|
|
41
|
+
- Detects `CLASSICAL_ONLY_QUANTUM_EXPOSED` (`RSA`, `ECDSA`, `Ed25519`, `X25519`) and `LATTICE_MONOCULTURE_RISK` (structured-lattice PQC deployed without hash-based or code-based fallback).
|
|
42
|
+
- Exports **CycloneDX 1.6 CBOM** (`--cbom`, including infra `certificate` and `protocol` assets), **SARIF 2.1.0** (`--sarif`, with `baselineState`), README **SVG badges** (`--badge`), and Markdown compliance certificates sealed with `SHAKE256` (`--cert-md`).
|
|
43
|
+
2. **Infrastructure Perimeter Scanner (0 External ASN.1/OpenSSL Packages):**
|
|
44
|
+
- **Pure-Python ASN.1 DER X.509 PEM Parser:** Decodes certificate OIDs (`RSA` with exact modulus bit length e.g. `RSA-1024`/`RSA-2048`, `sha1WithRSAEncryption`, `ECDSA`, `Ed25519`, plus NIST `ML-DSA` & `SLH-DSA`) directly from DER bytes.
|
|
45
|
+
- **OpenSSH Wire Key Parser:** Extracts exact RSA bit lengths from `ssh-rsa`, `ssh-dss`, `ecdsa-*`, and `ssh-ed25519` public keys in `authorized_keys`, `known_hosts`, and `.pub` files.
|
|
46
|
+
- **TLS / SSH / Container / Kubernetes Hardening:** Flags `TLSv1.0`/`TLSv1.1`, `TLSv1.2`-without-`TLSv1.3`, weak ciphers, missing hybrid PQC KEM groups (`X25519MLKEM768` / `mlkem768x25519-sha256`), `cert-manager` classical keys, `openssl genrsa` in `Dockerfiles`, and committed PEM private-key blocks.
|
|
47
|
+
3. **Tiered Crypto-Agility Gates (`observe` -> `hybrid` -> `enforce`) & Ratchet Baseline:**
|
|
48
|
+
- Adopt PQC progressively without breaking legacy production builds: start in `--mode observe`, record a repo snapshot via `--write-baseline`, block new classical/infra regressions in PRs with `--baseline` (exit code `5`, SARIF `baselineState: new`), transition via `--mode hybrid`, and lock in full multi-basis readiness with `--mode enforce`.
|
|
49
|
+
4. **Deterministic Unicode / BiDi Hygiene Gate (`--fail-on-hygiene`):**
|
|
50
|
+
- Catches **CVE-2021-42574 BiDi override/isolate controls** (`U+202A..U+202E`, `U+2066..U+2069`), **zero-width invisible characters** (`U+200B..U+200D`, `U+2060`), and unexpected **stray CJK UI tokens** (such as `U+6536 U+8D77` collapse-button glyphs) across code, configs, and manifests with line/column/codepoint reporting in SARIF 2.1.0. Pass `--allow-cjk` for CJK-localized repositories.
|
|
51
|
+
5. **Reference Dual-Orthogonal Hybrid Signer (`Module-LWE AND Stateful WOTS+/Merkle`):**
|
|
52
|
+
- **Root 1 (Algebraic Lattice):** `Module-LWE / Module-SIS` over `Z_8380417[X]/(X^256 + 1)` with `k=4, l=4, eta=2, tau=39, gamma1=131072`, unbiased rejection sampling, and negacyclic NTT.
|
|
53
|
+
- **Root 2 (Stateful Hash Tree):** Stateful `WOTS+` (`w=16, 67` chains) + `Merkle Tree` (`H=6, 64` one-time leaves in CLI; `H=4` in browser demo) over `SHAKE256`, with strict monotonic `next_leaf_idx` persistence and exhaustion guards (`STATEFUL_WOTS_LEAVES_EXHAUSTED`).
|
|
54
|
+
- Verification uses strict conjunction (`AND`): both roots must validate independently.
|
|
55
|
+
|
|
56
|
+
> **Security & Scope Notice:** The CI/CD scanner (`--audit`, `--cbom`, `--sarif`, `--fail-on-hygiene`) is production-ready for repository posture and hygiene gating. The bundled dual-root signer is a compact, zero-dependency reference/research implementation over `SHAKE256` — it is **not** wire-compatible with NIST FIPS 204 (`ML-DSA`) or FIPS 205 (`SLH-DSA`). For regulated production artifact signing, pair it with audited FIPS 204 + FIPS 205 implementations.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Quick Start (Zero `pip` Runtime Dependencies)
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# 0. Optional one-command CLI install directly from GitHub release tag (PyPI package: kpf432-shield)
|
|
64
|
+
pip install git+https://github.com/OMNISAVALON/kpf432-pqc-shield.git@v1.2.0
|
|
65
|
+
kpf432-shield --self-test
|
|
66
|
+
|
|
67
|
+
# 1. Or run the single file directly with zero installation: Verify SHAKE256 KAT, dual-root sign/verify, ASN.1 DER X.509 & ratchet
|
|
68
|
+
python3 kpf432_shield.py --self-test
|
|
69
|
+
|
|
70
|
+
# 2. Audit repository + TLS/SSH/X.509 perimeter in progressive ratchet mode
|
|
71
|
+
python3 kpf432_shield.py --audit ./src --mode observe --write-baseline kpf432-baseline.json
|
|
72
|
+
python3 kpf432_shield.py --audit ./src \
|
|
73
|
+
--mode hybrid \
|
|
74
|
+
--baseline kpf432-baseline.json \
|
|
75
|
+
--out cirg-report.json \
|
|
76
|
+
--cbom cirg-cbom.json \
|
|
77
|
+
--sarif cirg-audit.sarif \
|
|
78
|
+
--badge cirg-badge.svg \
|
|
79
|
+
--cert-md cirg-certificate.md \
|
|
80
|
+
--fail-on-hygiene \
|
|
81
|
+
--min-score 70
|
|
82
|
+
|
|
83
|
+
# 3. Generate a reference hybrid keypair and sign/verify sequentially (stateful next_leaf_idx persists in key.json)
|
|
84
|
+
python3 kpf432_shield.py --keygen --out kpf432-keys.json
|
|
85
|
+
python3 kpf432_shield.py --sign release.tar.gz --key kpf432-keys.json --out release.kpf432.sig.json
|
|
86
|
+
python3 kpf432_shield.py --verify release.tar.gz --pub kpf432-keys.json --sig release.kpf432.sig.json
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## GitHub Action (`OMNISAVALON/kpf432-pqc-shield@v1`)
|
|
92
|
+
|
|
93
|
+
See [`example-release-workflow.yml`](example-release-workflow.yml) to enforce minimum CIRG diversity scores and Unicode BiDi hygiene while generating `cirg-audit.sarif`, `cirg-cbom.json`, and `cirg-badge.svg` in CI.
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Licensing (`ASL-ULPF` Dual-License)
|
|
98
|
+
|
|
99
|
+
| Tier | Scope | Price |
|
|
100
|
+
| :--- | :--- | :---: |
|
|
101
|
+
| **Open-Source Core** | Personal use, academic research, and OSI-approved Open-Source projects (`kpf432_shield.py` CLI + WASM32 verifier) | **Free (`€0`)** |
|
|
102
|
+
| **Team Commercial CI/CD License** | Proprietary commercial repositories, automated CI/CD SARIF/CBOM & perimeter ratchet gates | [**`€49` Polar.sh**](https://buy.polar.sh/polar_cl_dMJIX55p4wxqCdtNOTFGPjTMPGaX86vIQkfft1rtcET) • [**Creem.io**](https://www.creem.io/product/prod_1vddNqCkFlV2mEtsWQ3Sle) |
|
|
103
|
+
| **Enterprise Shield Pack** | Organization-wide CI/CD deployment across unlimited internal pipelines | [**`€99` Polar.sh**](https://buy.polar.sh/polar_cl_KiMfZlY08hU1e02FaTKBTMyTw74g9RTWQT82Z37UKpY) • [**Creem.io**](https://www.creem.io/product/prod_7JPr4qr8WgvcO2CdEN6MMI) |
|
|
104
|
+
| **Express PQC, TLS/SSH & CBOM Audit (NIS2 Ready)** | Full repository + X.509/TLS/SSH/K8s perimeter audit within 48h (CycloneDX 1.6 CBOM, SARIF 2.1.0, `--baseline` ratchet JSON, migration plan + Team license) | [**`€199` Polar.sh**](https://buy.polar.sh/polar_cl_12XyL6B6CjbyReKFtgIYy4A6F9OhqRWnKgTYB4Y1PjY) • [**Creem.io**](https://www.creem.io/product/prod_2W6uqL4g0ePSYsqfayOUJ7) |
|
|
105
|
+
|
|
106
|
+
Interactive browser WASM32 verifier: `https://omnisavalon-kpf432-pqc-site.static.hf.space/` — see `LICENSE.md` for full terms.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
kpf432_shield
|