iack-framework 0.2.0__tar.gz → 0.3.1__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.
Files changed (38) hide show
  1. iack_framework-0.3.1/NOTICE +9 -0
  2. iack_framework-0.3.1/PKG-INFO +80 -0
  3. iack_framework-0.3.1/README.md +65 -0
  4. {iack_framework-0.2.0 → iack_framework-0.3.1}/pyproject.toml +7 -5
  5. iack_framework-0.3.1/src/iack/__init__.py +2 -0
  6. iack_framework-0.3.1/src/iack/mappings/__init__.py +2 -0
  7. {iack_framework-0.2.0 → iack_framework-0.3.1}/src/iack/mappings/csf_mapping.py +17 -2
  8. iack_framework-0.3.1/src/iack/metrics/__init__.py +2 -0
  9. {iack_framework-0.2.0 → iack_framework-0.3.1}/src/iack/metrics/model.py +3 -0
  10. iack_framework-0.3.1/src/iack/metrics/pqc.py +263 -0
  11. iack_framework-0.3.1/src/iack/outputs/__init__.py +2 -0
  12. {iack_framework-0.2.0 → iack_framework-0.3.1}/src/iack/outputs/report_writer.py +4 -1
  13. iack_framework-0.3.1/src/iack/validators/__init__.py +2 -0
  14. {iack_framework-0.2.0 → iack_framework-0.3.1}/src/iack/validators/assessment_validator.py +3 -1
  15. iack_framework-0.3.1/src/iack_framework.egg-info/PKG-INFO +80 -0
  16. {iack_framework-0.2.0 → iack_framework-0.3.1}/src/iack_framework.egg-info/SOURCES.txt +4 -0
  17. {iack_framework-0.2.0 → iack_framework-0.3.1}/src/iack_framework.egg-info/entry_points.txt +1 -0
  18. iack_framework-0.3.1/tests/test_artifact_integrity.py +76 -0
  19. {iack_framework-0.2.0 → iack_framework-0.3.1}/tests/test_cli_smoke.py +14 -4
  20. {iack_framework-0.2.0 → iack_framework-0.3.1}/tests/test_csf_mapping.py +27 -3
  21. {iack_framework-0.2.0 → iack_framework-0.3.1}/tests/test_model.py +1 -0
  22. iack_framework-0.3.1/tests/test_pqc.py +151 -0
  23. {iack_framework-0.2.0 → iack_framework-0.3.1}/tests/test_report_writer.py +1 -2
  24. {iack_framework-0.2.0 → iack_framework-0.3.1}/tests/test_validator.py +2 -4
  25. iack_framework-0.2.0/PKG-INFO +0 -86
  26. iack_framework-0.2.0/README.md +0 -72
  27. iack_framework-0.2.0/src/iack/__init__.py +0 -0
  28. iack_framework-0.2.0/src/iack/mappings/__init__.py +0 -0
  29. iack_framework-0.2.0/src/iack/metrics/__init__.py +0 -0
  30. iack_framework-0.2.0/src/iack/outputs/__init__.py +0 -0
  31. iack_framework-0.2.0/src/iack/validators/__init__.py +0 -0
  32. iack_framework-0.2.0/src/iack_framework.egg-info/PKG-INFO +0 -86
  33. {iack_framework-0.2.0 → iack_framework-0.3.1}/LICENSE +0 -0
  34. {iack_framework-0.2.0 → iack_framework-0.3.1}/setup.cfg +0 -0
  35. {iack_framework-0.2.0 → iack_framework-0.3.1}/src/iack_framework.egg-info/dependency_links.txt +0 -0
  36. {iack_framework-0.2.0 → iack_framework-0.3.1}/src/iack_framework.egg-info/requires.txt +0 -0
  37. {iack_framework-0.2.0 → iack_framework-0.3.1}/src/iack_framework.egg-info/top_level.txt +0 -0
  38. {iack_framework-0.2.0 → iack_framework-0.3.1}/tests/test_pipeline_integration.py +0 -0
@@ -0,0 +1,9 @@
1
+ IACK Framework
2
+ Copyright 2026 Félix Antonio Cepeda
3
+
4
+ This product includes software developed by Félix Antonio Cepeda
5
+ (https://github.com/Anthonybryan2021/iack-framework, https://iack.ai).
6
+
7
+ IACK™ is a trademark of Félix Antonio Cepeda. The Apache License 2.0 does
8
+ not grant permission to use this name except as required for reasonable
9
+ and customary use in describing the origin of the work (Section 6).
@@ -0,0 +1,80 @@
1
+ Metadata-Version: 2.4
2
+ Name: iack-framework
3
+ Version: 0.3.1
4
+ Summary: Integrity-Authenticity-Confidentiality-Key management cybersecurity framework
5
+ Author-email: Félix Antonio Cepeda <felicepeda@hotmail.com>
6
+ License-Expression: Apache-2.0
7
+ Requires-Python: >=3.11
8
+ Description-Content-Type: text/markdown
9
+ License-File: LICENSE
10
+ License-File: NOTICE
11
+ Provides-Extra: dev
12
+ Requires-Dist: pytest>=8.0; extra == "dev"
13
+ Requires-Dist: ruff>=0.5.0; extra == "dev"
14
+ Dynamic: license-file
15
+
16
+ # IACK™ Framework
17
+
18
+ **IACK** stands for **Integrity, Authenticity, Confidentiality, Key Management**: the four security properties it assesses.
19
+
20
+ *Motto: Integrate · Analyze · Collaborate · Protect.*
21
+
22
+ IACK is an open-source framework for evidence-based security assessment. Each metric has a score, a weight, a pass threshold and the evidence behind it. IACK validates that input, scores it with an explicit formula, and produces repeatable, interpretable and auditable results.
23
+
24
+ > **Limit:** results are only as accurate as the assessed values and the evidence behind them. IACK makes them transparent and checkable; it does not make them true.
25
+
26
+ See [docs/DEFINITION.md](docs/DEFINITION.md) for the full definition, what IACK does not do, and which ideas are still research.
27
+
28
+ ## Install
29
+
30
+ ```powershell
31
+ python -m pip install -e .
32
+ ```
33
+
34
+ ## Import
35
+
36
+ ```python
37
+ from iack.metrics import model
38
+ from iack.validators import assessment_validator
39
+ from iack.mappings import csf_mapping
40
+ from iack.outputs import report_writer
41
+ ```
42
+
43
+ ## Example inputs
44
+
45
+ - `examples/assessment-input.json`
46
+ - `examples/expected-output.json`
47
+
48
+ ## Run tests
49
+
50
+ ```powershell
51
+ pytest
52
+ ```
53
+
54
+ ## Package layout
55
+
56
+ The package is distributed from `src/iack/` only. Legacy root-level modules are not part of the wheel.
57
+
58
+ ## Command line
59
+
60
+ ```powershell
61
+ iack-validate examples/assessment-input.json # check the input
62
+ iack-score examples/assessment-input.json # weighted score and per-metric results
63
+ iack-report examples/assessment-input.json # JSON, CSV and Markdown reports in data/output/
64
+ iack-map-csf examples/assessment-input.json # add NIST CSF function mapping
65
+ iack-pqc examples/pqc-inventory.json --weight 0.1 # post-quantum readiness metrics (Key Management)
66
+ ```
67
+
68
+ `iack-pqc` reads a cryptographic inventory and prints three Key Management metrics: inventory coverage, harvest-now-decrypt-later exposure and post-quantum migration progress. Add them to your assessment and rebalance the weights so they sum to 1. The inventory must state its assumption for the years until a cryptographically relevant quantum computer, with a source. See [docs/DEFINITION.md](docs/DEFINITION.md#post-quantum-readiness-key-management).
69
+
70
+ ## Citation
71
+
72
+ If you use IACK in your work, please cite it. GitHub shows a **Cite this repository** button generated from [CITATION.cff](CITATION.cff).
73
+
74
+ ## License and copyright
75
+
76
+ Copyright 2026 Félix Antonio Cepeda.
77
+
78
+ Licensed under the [Apache License, Version 2.0](LICENSE). If you redistribute IACK or a derivative work, you must keep the copyright notice and the attribution in [NOTICE](NOTICE).
79
+
80
+ IACK™ is a trademark of Félix Antonio Cepeda. The license does not grant permission to use the IACK name, except to describe the origin of the work.
@@ -0,0 +1,65 @@
1
+ # IACK™ Framework
2
+
3
+ **IACK** stands for **Integrity, Authenticity, Confidentiality, Key Management**: the four security properties it assesses.
4
+
5
+ *Motto: Integrate · Analyze · Collaborate · Protect.*
6
+
7
+ IACK is an open-source framework for evidence-based security assessment. Each metric has a score, a weight, a pass threshold and the evidence behind it. IACK validates that input, scores it with an explicit formula, and produces repeatable, interpretable and auditable results.
8
+
9
+ > **Limit:** results are only as accurate as the assessed values and the evidence behind them. IACK makes them transparent and checkable; it does not make them true.
10
+
11
+ See [docs/DEFINITION.md](docs/DEFINITION.md) for the full definition, what IACK does not do, and which ideas are still research.
12
+
13
+ ## Install
14
+
15
+ ```powershell
16
+ python -m pip install -e .
17
+ ```
18
+
19
+ ## Import
20
+
21
+ ```python
22
+ from iack.metrics import model
23
+ from iack.validators import assessment_validator
24
+ from iack.mappings import csf_mapping
25
+ from iack.outputs import report_writer
26
+ ```
27
+
28
+ ## Example inputs
29
+
30
+ - `examples/assessment-input.json`
31
+ - `examples/expected-output.json`
32
+
33
+ ## Run tests
34
+
35
+ ```powershell
36
+ pytest
37
+ ```
38
+
39
+ ## Package layout
40
+
41
+ The package is distributed from `src/iack/` only. Legacy root-level modules are not part of the wheel.
42
+
43
+ ## Command line
44
+
45
+ ```powershell
46
+ iack-validate examples/assessment-input.json # check the input
47
+ iack-score examples/assessment-input.json # weighted score and per-metric results
48
+ iack-report examples/assessment-input.json # JSON, CSV and Markdown reports in data/output/
49
+ iack-map-csf examples/assessment-input.json # add NIST CSF function mapping
50
+ iack-pqc examples/pqc-inventory.json --weight 0.1 # post-quantum readiness metrics (Key Management)
51
+ ```
52
+
53
+ `iack-pqc` reads a cryptographic inventory and prints three Key Management metrics: inventory coverage, harvest-now-decrypt-later exposure and post-quantum migration progress. Add them to your assessment and rebalance the weights so they sum to 1. The inventory must state its assumption for the years until a cryptographically relevant quantum computer, with a source. See [docs/DEFINITION.md](docs/DEFINITION.md#post-quantum-readiness-key-management).
54
+
55
+ ## Citation
56
+
57
+ If you use IACK in your work, please cite it. GitHub shows a **Cite this repository** button generated from [CITATION.cff](CITATION.cff).
58
+
59
+ ## License and copyright
60
+
61
+ Copyright 2026 Félix Antonio Cepeda.
62
+
63
+ Licensed under the [Apache License, Version 2.0](LICENSE). If you redistribute IACK or a derivative work, you must keep the copyright notice and the attribution in [NOTICE](NOTICE).
64
+
65
+ IACK™ is a trademark of Félix Antonio Cepeda. The license does not grant permission to use the IACK name, except to describe the origin of the work.
@@ -4,14 +4,14 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "iack-framework"
7
- version = "0.2.0"
7
+ version = "0.3.1"
8
8
  description = "Integrity-Authenticity-Confidentiality-Key management cybersecurity framework"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
11
- license = "MIT"
12
- license-files = ["LICENSE"]
11
+ license = "Apache-2.0"
12
+ license-files = ["LICENSE", "NOTICE"]
13
13
  authors = [
14
- { name = "Felix Cepeda", email = "felicepeda@hotmail.com" }
14
+ { name = "Félix Antonio Cepeda", email = "felicepeda@hotmail.com" }
15
15
  ]
16
16
  dependencies = []
17
17
 
@@ -20,6 +20,7 @@ iack-validate = "iack.validators.assessment_validator:main"
20
20
  iack-score = "iack.metrics.model:main"
21
21
  iack-map-csf = "iack.mappings.csf_mapping:main"
22
22
  iack-report = "iack.outputs.report_writer:main"
23
+ iack-pqc = "iack.metrics.pqc:main"
23
24
 
24
25
  [project.optional-dependencies]
25
26
  dev = [
@@ -28,6 +29,7 @@ dev = [
28
29
  ]
29
30
 
30
31
  [tool.pytest.ini_options]
32
+ pythonpath = [".", "src"]
31
33
  testpaths = ["tests"]
32
34
 
33
35
  [tool.ruff]
@@ -36,4 +38,4 @@ line-length = 100
36
38
  [tool.setuptools.packages.find]
37
39
  where = ["src"]
38
40
  include = ["iack*"]
39
- namespaces = false
41
+ namespaces = false
@@ -0,0 +1,2 @@
1
+ # Copyright 2026 Félix Antonio Cepeda
2
+ # SPDX-License-Identifier: Apache-2.0
@@ -0,0 +1,2 @@
1
+ # Copyright 2026 Félix Antonio Cepeda
2
+ # SPDX-License-Identifier: Apache-2.0
@@ -1,10 +1,12 @@
1
+ # Copyright 2026 Félix Antonio Cepeda
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
1
4
  import json
2
5
  import sys
3
6
  from pathlib import Path
4
7
 
5
8
  from iack.metrics.model import score_assessment
6
9
 
7
-
8
10
  DOMAIN_TO_CSF = {
9
11
  "confidentiality": {
10
12
  "csf_function": "Protect",
@@ -21,6 +23,14 @@ DOMAIN_TO_CSF = {
21
23
  "csf_code": "DE",
22
24
  "rationale": "Integrity issues often require monitoring, verification, and detection of unauthorized changes."
23
25
  },
26
+ "key_management": {
27
+ "csf_function": "Protect",
28
+ "csf_code": "PR",
29
+ "rationale": (
30
+ "Key lifecycle management (generation, storage, rotation, retirement) "
31
+ "supports data security and credential protection outcomes."
32
+ ),
33
+ },
24
34
  "governance": {
25
35
  "csf_function": "Govern",
26
36
  "csf_code": "GV",
@@ -34,11 +44,16 @@ DOMAIN_TO_CSF = {
34
44
  }
35
45
 
36
46
 
47
+ def normalize_domain(domain: str) -> str:
48
+ """Return the canonical domain key, e.g. "Key Management" -> "key_management"."""
49
+ return "_".join(str(domain).strip().lower().replace("-", " ").split())
50
+
51
+
37
52
  def apply_csf_mapping(result: dict) -> dict:
38
53
  mapped_results = []
39
54
 
40
55
  for metric in result["metric_results"]:
41
- domain = metric["domain"]
56
+ domain = normalize_domain(metric["domain"])
42
57
  mapping = DOMAIN_TO_CSF.get(
43
58
  domain,
44
59
  {
@@ -0,0 +1,2 @@
1
+ # Copyright 2026 Félix Antonio Cepeda
2
+ # SPDX-License-Identifier: Apache-2.0
@@ -1,3 +1,6 @@
1
+ # Copyright 2026 Félix Antonio Cepeda
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
1
4
  import json
2
5
  import sys
3
6
  from pathlib import Path
@@ -0,0 +1,263 @@
1
+ # Copyright 2026 Félix Antonio Cepeda
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ """Post-quantum readiness metrics for the Key Management pillar.
5
+
6
+ Turns a cryptographic inventory into three IACK metrics:
7
+
8
+ - KM-PQC-01 Cryptographic inventory coverage
9
+ - KM-PQC-02 Harvest-now-decrypt-later (HNDL) exposure
10
+ - KM-PQC-03 Post-quantum migration progress
11
+
12
+ Algorithm classification follows NIST FIPS 203/204/205 (ML-KEM, ML-DSA, SLH-DSA),
13
+ SP 800-208 (LMS, XMSS) and NIST IR 8547, which deprecates quantum-vulnerable public-key
14
+ algorithms (RSA, DH, ECDH, DSA, ECDSA, EdDSA) after 2030 and disallows them after 2035.
15
+ Symmetric algorithms and hashes (AES, ChaCha20, SHA-2, SHA-3, HMAC) are not treated as
16
+ quantum-vulnerable, in line with IR 8547.
17
+
18
+ HNDL exposure uses Mosca's inequality: data protected today by a quantum-vulnerable
19
+ algorithm is exposed if shelf_life + migration_time > years_to_crqc. The number of years
20
+ until a cryptographically relevant quantum computer (CRQC) is an assumption that the
21
+ assessor must state, with its source. IACK does not predict it.
22
+
23
+ Limits: the metrics are only as accurate as the inventory. IACK does not discover
24
+ cryptography, test implementations, or verify the evidence cited for each asset.
25
+ """
26
+ from __future__ import annotations
27
+
28
+ import argparse
29
+ import json
30
+ import re
31
+ import sys
32
+ from pathlib import Path
33
+
34
+ PQC_TOKENS = ("MLKEM", "MLDSA", "SLHDSA", "FNDSA", "HQC", "LMS", "HSS", "XMSS")
35
+ VULNERABLE_TOKENS = (
36
+ "RSA", "ECDSA", "ECDH", "EDDSA", "ED25519", "ED448", "X25519", "X448", "ECC",
37
+ "P256", "P384", "P521", "SECP", "BRAINPOOL", "FFDH", "DHE", "DH", "DSA",
38
+ )
39
+ SYMMETRIC_TOKENS = (
40
+ "AES", "CHACHA20", "SHA2", "SHA224", "SHA256", "SHA384", "SHA512", "SHA3",
41
+ "HMAC", "SHAKE", "KMAC",
42
+ )
43
+
44
+ CONFIDENTIALITY_USES = ("key_establishment", "encryption")
45
+ VALID_USES = (*CONFIDENTIALITY_USES, "signature")
46
+
47
+ CATEGORY_VULNERABLE = "quantum_vulnerable"
48
+ CATEGORY_HYBRID = "hybrid"
49
+ CATEGORY_PQC = "post_quantum"
50
+ CATEGORY_SYMMETRIC = "symmetric"
51
+
52
+
53
+ def classify_algorithm(name: str) -> str | None:
54
+ """Classify an algorithm name. Returns None when the name is not recognised."""
55
+ key = re.sub(r"[^A-Z0-9]", "", str(name).upper())
56
+ if not key:
57
+ return None
58
+ has_pqc = any(token in key for token in PQC_TOKENS)
59
+ stripped = key
60
+ for token in PQC_TOKENS:
61
+ stripped = stripped.replace(token, "")
62
+ has_vulnerable = any(token in stripped for token in VULNERABLE_TOKENS)
63
+ if has_pqc:
64
+ return CATEGORY_HYBRID if has_vulnerable else CATEGORY_PQC
65
+ if has_vulnerable:
66
+ return CATEGORY_VULNERABLE
67
+ if any(token in key for token in SYMMETRIC_TOKENS):
68
+ return CATEGORY_SYMMETRIC
69
+ return None
70
+
71
+
72
+ def _is_number(value) -> bool:
73
+ return isinstance(value, (int, float)) and not isinstance(value, bool)
74
+
75
+
76
+ def validate_inventory(inventory: dict) -> list[str]:
77
+ errors: list[str] = []
78
+ for field in ("inventory_id", "assessment_date", "systems_total", "assumptions", "assets"):
79
+ if field not in inventory:
80
+ errors.append(f"Missing top-level field: {field}")
81
+
82
+ total = inventory.get("systems_total")
83
+ if not isinstance(total, int) or isinstance(total, bool) or total < 1:
84
+ errors.append("systems_total must be a positive integer")
85
+
86
+ assumptions = inventory.get("assumptions") or {}
87
+ years = assumptions.get("years_to_crqc")
88
+ if not _is_number(years) or years <= 0:
89
+ errors.append("assumptions.years_to_crqc must be a positive number")
90
+ if not str(assumptions.get("source", "")).strip():
91
+ errors.append("assumptions.source must state where the years_to_crqc assumption comes from")
92
+
93
+ assets = inventory.get("assets")
94
+ if not isinstance(assets, list) or not assets:
95
+ errors.append("assets must be a non-empty list")
96
+ return errors
97
+
98
+ seen_ids: set[str] = set()
99
+ for index, asset in enumerate(assets, start=1):
100
+ label = asset.get("asset_id", f"Asset #{index}")
101
+ for field in ("asset_id", "system", "algorithm", "use", "evidence"):
102
+ if field not in asset:
103
+ errors.append(f"{label} missing field: {field}")
104
+ if asset.get("asset_id") in seen_ids:
105
+ errors.append(f"{label} is duplicated")
106
+ seen_ids.add(asset.get("asset_id"))
107
+
108
+ if "algorithm" in asset and classify_algorithm(asset["algorithm"]) is None:
109
+ errors.append(f"{label} algorithm not recognised: {asset['algorithm']!r}")
110
+ if "use" in asset and asset["use"] not in VALID_USES:
111
+ errors.append(f"{label} use must be one of {', '.join(VALID_USES)}")
112
+ if asset.get("use") in CONFIDENTIALITY_USES:
113
+ for field in ("data_shelf_life_years", "migration_time_years"):
114
+ value = asset.get(field)
115
+ if not _is_number(value) or value < 0:
116
+ errors.append(f"{label} {field} must be a number >= 0")
117
+ evidence = asset.get("evidence")
118
+ if not isinstance(evidence, list) or not evidence:
119
+ errors.append(f"{label} must include at least one evidence item")
120
+
121
+ if isinstance(total, int) and not isinstance(total, bool) and total >= 1:
122
+ systems = {a.get("system") for a in assets}
123
+ if len(systems) > total:
124
+ errors.append(f"assets cover {len(systems)} systems but systems_total is {total}")
125
+
126
+ if not any(
127
+ a.get("use") in CONFIDENTIALITY_USES
128
+ and classify_algorithm(a.get("algorithm", "")) not in (None, CATEGORY_SYMMETRIC)
129
+ for a in assets
130
+ ):
131
+ errors.append(
132
+ "no public-key key_establishment or encryption assets: HNDL exposure cannot be assessed"
133
+ )
134
+ return errors
135
+
136
+
137
+ def _evidence(assets: list[dict]) -> list[str]:
138
+ seen: list[str] = []
139
+ for asset in assets:
140
+ for item in asset["evidence"]:
141
+ if item not in seen:
142
+ seen.append(item)
143
+ return seen
144
+
145
+
146
+ def compute_pqc_metrics(inventory: dict, weight: float, threshold: float = 0.7) -> list[dict]:
147
+ """Return the three post-quantum readiness metrics in IACK assessment format.
148
+
149
+ Raises ValueError if the inventory is invalid.
150
+ """
151
+ errors = validate_inventory(inventory)
152
+ if errors:
153
+ raise ValueError("; ".join(errors))
154
+
155
+ assets = inventory["assets"]
156
+ years_to_crqc = inventory["assumptions"]["years_to_crqc"]
157
+ category = {a["asset_id"]: classify_algorithm(a["algorithm"]) for a in assets}
158
+
159
+ public_key = [a for a in assets if category[a["asset_id"]] != CATEGORY_SYMMETRIC]
160
+ confidentiality = [a for a in public_key if a["use"] in CONFIDENTIALITY_USES]
161
+ exposed = [
162
+ a for a in confidentiality
163
+ if category[a["asset_id"]] == CATEGORY_VULNERABLE
164
+ and a["data_shelf_life_years"] + a["migration_time_years"] > years_to_crqc
165
+ ]
166
+ migrated = [a for a in public_key if category[a["asset_id"]] in (CATEGORY_PQC, CATEGORY_HYBRID)]
167
+ systems = sorted({a["system"] for a in assets})
168
+
169
+ def metric(metric_id, name, score, evidence, details):
170
+ return {
171
+ "metric_id": metric_id,
172
+ "metric_name": name,
173
+ "domain": "key_management",
174
+ "weight": weight,
175
+ "threshold": threshold,
176
+ "confidence_rule": "evidence_count",
177
+ "score": round(score, 4),
178
+ "evidence": evidence,
179
+ "details": details,
180
+ }
181
+
182
+ metrics = [
183
+ metric(
184
+ "KM-PQC-01", "Cryptographic inventory coverage",
185
+ len(systems) / inventory["systems_total"], _evidence(assets),
186
+ {"systems_inventoried": len(systems), "systems_total": inventory["systems_total"]},
187
+ ),
188
+ metric(
189
+ "KM-PQC-02", "Harvest-now-decrypt-later exposure",
190
+ 1 - len(exposed) / len(confidentiality), _evidence(confidentiality),
191
+ {
192
+ "rule": (
193
+ "exposed if quantum-vulnerable and "
194
+ "data_shelf_life_years + migration_time_years > years_to_crqc"
195
+ ),
196
+ "years_to_crqc": years_to_crqc,
197
+ "years_to_crqc_source": inventory["assumptions"]["source"],
198
+ "confidentiality_assets": len(confidentiality),
199
+ "exposed_assets": [a["asset_id"] for a in exposed],
200
+ },
201
+ ),
202
+ metric(
203
+ "KM-PQC-03", "Post-quantum migration progress",
204
+ len(migrated) / len(public_key), _evidence(public_key),
205
+ {
206
+ "public_key_assets": len(public_key),
207
+ "post_quantum_or_hybrid": [a["asset_id"] for a in migrated],
208
+ "quantum_vulnerable": [
209
+ a["asset_id"]
210
+ for a in public_key
211
+ if category[a["asset_id"]] == CATEGORY_VULNERABLE
212
+ ],
213
+ },
214
+ ),
215
+ ]
216
+ return metrics
217
+
218
+
219
+ def main(argv: list[str] | None = None) -> int:
220
+ parser = argparse.ArgumentParser(
221
+ description="Compute IACK post-quantum readiness metrics from a cryptographic inventory."
222
+ )
223
+ parser.add_argument("inventory", help="path to the cryptographic inventory JSON")
224
+ parser.add_argument(
225
+ "--weight",
226
+ type=float,
227
+ required=True,
228
+ help="weight for each metric; rebalance the assessment's weights so they sum to 1",
229
+ )
230
+ parser.add_argument(
231
+ "--threshold", type=float, default=0.7, help="pass threshold for each metric (default 0.7)"
232
+ )
233
+ parser.add_argument("--output", help="write the metrics to this file instead of printing")
234
+ args = parser.parse_args(argv)
235
+
236
+ path = Path(args.inventory)
237
+ if not path.exists():
238
+ print(f"Input file not found: {path}")
239
+ return 1
240
+ if not (0 <= args.weight <= 1 and 0 <= args.threshold <= 1):
241
+ print("--weight and --threshold must be between 0 and 1")
242
+ return 1
243
+
244
+ inventory = json.loads(path.read_text(encoding="utf-8-sig"))
245
+ try:
246
+ metrics = compute_pqc_metrics(inventory, args.weight, args.threshold)
247
+ except ValueError as exc:
248
+ print("Inventory validation failed:")
249
+ for error in str(exc).split("; "):
250
+ print(f"- {error}")
251
+ return 1
252
+
253
+ text = json.dumps(metrics, indent=2)
254
+ if args.output:
255
+ Path(args.output).write_text(text + "\n", encoding="utf-8")
256
+ print(f"Wrote: {args.output}")
257
+ else:
258
+ print(text)
259
+ return 0
260
+
261
+
262
+ if __name__ == "__main__":
263
+ sys.exit(main())
@@ -0,0 +1,2 @@
1
+ # Copyright 2026 Félix Antonio Cepeda
2
+ # SPDX-License-Identifier: Apache-2.0
@@ -1,4 +1,7 @@
1
- import csv
1
+ # Copyright 2026 Félix Antonio Cepeda
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
4
+ import csv
2
5
  import json
3
6
  import sys
4
7
  from pathlib import Path
@@ -0,0 +1,2 @@
1
+ # Copyright 2026 Félix Antonio Cepeda
2
+ # SPDX-License-Identifier: Apache-2.0
@@ -1,8 +1,10 @@
1
+ # Copyright 2026 Félix Antonio Cepeda
2
+ # SPDX-License-Identifier: Apache-2.0
3
+
1
4
  import json
2
5
  import sys
3
6
  from pathlib import Path
4
7
 
5
-
6
8
  REQUIRED_TOP_LEVEL = ["assessment_id", "system_name", "assessment_date", "metrics"]
7
9
  REQUIRED_METRIC_FIELDS = [
8
10
  "metric_id",
@@ -0,0 +1,80 @@
1
+ Metadata-Version: 2.4
2
+ Name: iack-framework
3
+ Version: 0.3.1
4
+ Summary: Integrity-Authenticity-Confidentiality-Key management cybersecurity framework
5
+ Author-email: Félix Antonio Cepeda <felicepeda@hotmail.com>
6
+ License-Expression: Apache-2.0
7
+ Requires-Python: >=3.11
8
+ Description-Content-Type: text/markdown
9
+ License-File: LICENSE
10
+ License-File: NOTICE
11
+ Provides-Extra: dev
12
+ Requires-Dist: pytest>=8.0; extra == "dev"
13
+ Requires-Dist: ruff>=0.5.0; extra == "dev"
14
+ Dynamic: license-file
15
+
16
+ # IACK™ Framework
17
+
18
+ **IACK** stands for **Integrity, Authenticity, Confidentiality, Key Management**: the four security properties it assesses.
19
+
20
+ *Motto: Integrate · Analyze · Collaborate · Protect.*
21
+
22
+ IACK is an open-source framework for evidence-based security assessment. Each metric has a score, a weight, a pass threshold and the evidence behind it. IACK validates that input, scores it with an explicit formula, and produces repeatable, interpretable and auditable results.
23
+
24
+ > **Limit:** results are only as accurate as the assessed values and the evidence behind them. IACK makes them transparent and checkable; it does not make them true.
25
+
26
+ See [docs/DEFINITION.md](docs/DEFINITION.md) for the full definition, what IACK does not do, and which ideas are still research.
27
+
28
+ ## Install
29
+
30
+ ```powershell
31
+ python -m pip install -e .
32
+ ```
33
+
34
+ ## Import
35
+
36
+ ```python
37
+ from iack.metrics import model
38
+ from iack.validators import assessment_validator
39
+ from iack.mappings import csf_mapping
40
+ from iack.outputs import report_writer
41
+ ```
42
+
43
+ ## Example inputs
44
+
45
+ - `examples/assessment-input.json`
46
+ - `examples/expected-output.json`
47
+
48
+ ## Run tests
49
+
50
+ ```powershell
51
+ pytest
52
+ ```
53
+
54
+ ## Package layout
55
+
56
+ The package is distributed from `src/iack/` only. Legacy root-level modules are not part of the wheel.
57
+
58
+ ## Command line
59
+
60
+ ```powershell
61
+ iack-validate examples/assessment-input.json # check the input
62
+ iack-score examples/assessment-input.json # weighted score and per-metric results
63
+ iack-report examples/assessment-input.json # JSON, CSV and Markdown reports in data/output/
64
+ iack-map-csf examples/assessment-input.json # add NIST CSF function mapping
65
+ iack-pqc examples/pqc-inventory.json --weight 0.1 # post-quantum readiness metrics (Key Management)
66
+ ```
67
+
68
+ `iack-pqc` reads a cryptographic inventory and prints three Key Management metrics: inventory coverage, harvest-now-decrypt-later exposure and post-quantum migration progress. Add them to your assessment and rebalance the weights so they sum to 1. The inventory must state its assumption for the years until a cryptographically relevant quantum computer, with a source. See [docs/DEFINITION.md](docs/DEFINITION.md#post-quantum-readiness-key-management).
69
+
70
+ ## Citation
71
+
72
+ If you use IACK in your work, please cite it. GitHub shows a **Cite this repository** button generated from [CITATION.cff](CITATION.cff).
73
+
74
+ ## License and copyright
75
+
76
+ Copyright 2026 Félix Antonio Cepeda.
77
+
78
+ Licensed under the [Apache License, Version 2.0](LICENSE). If you redistribute IACK or a derivative work, you must keep the copyright notice and the attribution in [NOTICE](NOTICE).
79
+
80
+ IACK™ is a trademark of Félix Antonio Cepeda. The license does not grant permission to use the IACK name, except to describe the origin of the work.
@@ -1,4 +1,5 @@
1
1
  LICENSE
2
+ NOTICE
2
3
  README.md
3
4
  pyproject.toml
4
5
  src/iack/__init__.py
@@ -6,6 +7,7 @@ src/iack/mappings/__init__.py
6
7
  src/iack/mappings/csf_mapping.py
7
8
  src/iack/metrics/__init__.py
8
9
  src/iack/metrics/model.py
10
+ src/iack/metrics/pqc.py
9
11
  src/iack/outputs/__init__.py
10
12
  src/iack/outputs/report_writer.py
11
13
  src/iack/validators/__init__.py
@@ -16,9 +18,11 @@ src/iack_framework.egg-info/dependency_links.txt
16
18
  src/iack_framework.egg-info/entry_points.txt
17
19
  src/iack_framework.egg-info/requires.txt
18
20
  src/iack_framework.egg-info/top_level.txt
21
+ tests/test_artifact_integrity.py
19
22
  tests/test_cli_smoke.py
20
23
  tests/test_csf_mapping.py
21
24
  tests/test_model.py
22
25
  tests/test_pipeline_integration.py
26
+ tests/test_pqc.py
23
27
  tests/test_report_writer.py
24
28
  tests/test_validator.py
@@ -1,5 +1,6 @@
1
1
  [console_scripts]
2
2
  iack-map-csf = iack.mappings.csf_mapping:main
3
+ iack-pqc = iack.metrics.pqc:main
3
4
  iack-report = iack.outputs.report_writer:main
4
5
  iack-score = iack.metrics.model:main
5
6
  iack-validate = iack.validators.assessment_validator:main