Skip to content

feat(algo): classical strength by NIST's method (ENH-001 spec and calculator) - #16

Merged
khalid-offset merged 2 commits into
mainfrom
docs/enh-001-cipher-strength
Oct 18, 2026
Merged

khalid-offset merged 2 commits into
mainfrom
docs/enh-001-cipher-strength

Conversation

@khalid-offset

@khalid-offset khalid-offset commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

The review and enhancement spec for "why is strength not shown for the detected ciphers?": ENH-001. It now includes §5, how NIST calculates strength, reproduced.

Calculator (internal/algo/strength.go)

Key type Method Source
RSA and finite-field DH GNFS: E(L) = (1.923·∛(L ln2)·∛((ln(L ln2))²) − 4.69)/ln2, rounded to the nearest multiple of eight FIPS 140-3 IG D.B, as stated in SP 800-56B Rev. 2 App. D
Elliptic curves half the base-point order's bit length SP 800-186 §3
Symmetric ciphers and hashes the published tables SP 800-57 Pt 1 Tables 2 and 3

The tests reproduce SP 800-56B Table 4 (2048 → 110.1 → 112 … 8192 → 201.7 → 200), SP 800-56A Table 26 (the ffdhe groups) and SP 800-186 Table 1 exactly.

Not yet wired into the UI, CLI, API or CBOM: that follows owner approval of the spec and OD-1.

Review of why cipher strength is shown only as an uncited four-word heuristic
on the TLS report and PDF, and nowhere else (CLI, Inventory, SSH, groups,
keys, API, CBOM); single DES is rated Weak, not Insecure. Proposes one cited
model (NIST SP 800-57 Part 1 Rev. 5 Table 2, RFC 9325) in the catalogue and
evaluation, shown on every surface, with acceptance tests.
GNFS estimate for RSA and finite-field DH (FIPS 140-3 IG D.B, as stated in
SP 800-56B Rev. 2 Appendix D), rounded to the nearest multiple of eight;
elliptic curves at half the order's bit length (SP 800-186); symmetric
ciphers and hashes from SP 800-57 Part 1 Tables 2 and 3. Tests reproduce
SP 800-56B Table 4, SP 800-56A Table 26 and SP 800-186 Table 1 exactly.
ENH-001 gains the derivation and worked examples.
@khalid-offset khalid-offset changed the title docs(product): ENH-001, classical strength for every detected algorithm ENH-001: classical strength by NIST's method (spec + calculator) Oct 18, 2026
@khalid-offset khalid-offset changed the title ENH-001: classical strength by NIST's method (spec + calculator) feat(algo): classical strength by NIST's method (ENH-001 spec and calculator) Oct 18, 2026
@khalid-offset
khalid-offset merged commit 38f9a0e into main Oct 18, 2026
23 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant